|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Accessing frames in Symbols
Hello everyone
I want to access parts of a movie via gotoAndPlay. This seems to be a problem, because the frame to be jumped to is in a movie (as symbol). In the flash help I found that it is possible to jump to frames in other scenes, is it also possible to jump to frames in movies as symbols? just for information, I want to create a full animated button so long, Heretic |
|
#2
|
|||
|
|||
|
If the symbol is a movie clip, you can use myMC.gotoAndPlay(1); where myMC is the name of the movie clip and 1 is the frame you want it to go to. Buttons cannot be told to play, nor can Graphics.
If you're using MX, movie clips can be assigned button properties, such as onRelease, onRollOver, etc... That's probably the best way to go. |
|
#3
|
|||
|
|||
|
thx for your reply, but it doesn't work anyway, maybe I've done something essential wrong.
Now I've made a new flash movie to try it out. it contains nothing but a movie clip as a symbol. From Frame 2 to 25 there's a shape tween, from frame 26 to 51 there's the same shape tween, just the other way round. at Frame 1, 25 und 51 there are stop commands. I've inserted the symbol into the main movie and added some actionscript code: Quote:
test is the name of the movie clip symbol. I've also tried it with _root.test.gotaAndPlay(2); Since this does'nt work, I'vr tested the RollOver with a getURL (what I can handle) and it worked. So my mistake must be somewhere around the gotoAndPlay function. Can You help me? |
|
#4
|
|||
|
|||
|
Did you give the movie clip an instance name? The instance name isn't necessarily the same thing as the library name. If you don't give it an instance name, Flash assigns it a generic one like "symbol36" or something.
ActionScript ALWAYS references the instance name, not the library name. |
|
#5
|
|||
|
|||
|
hey, thank you, it works
now I understand flash a little better. PS: I accessed the movie with '_root.test.gotoAndPlay(2)'. However, without the '_root.' it didn't work. |
|
#6
|
|||
|
|||
|
If just using test without _root didn't work, it's because you weren't calling it from the main timeline, which is what _root refers to.
Just saying test is the same thing as saying this.test, if you're calling it directly off a timeline. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Accessing frames in Symbols |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|