Help me make my Flash button-inside-a-movie-clip work.
December 11, 2006 7:32 PM   Subscribe

Can someone look at my .fla file and tell me why my button inside a movie clip doesn't work?

Please don't laugh at my Flash-fu.
The only button that should work right now is the "features" button, but it doesn't. (It should gotoandplay frame 41 of the current scene.) The rollover works but not the goto.
The only other way I can think to do this is to group the three buttons and "frame" so I can motion tween them in together, but that seems like a dumb way and I don't see why this doesn't work. Thanks in advance.
posted by bradn to Computers & Internet (4 answers total)
 
Well you aren't referencing that the frame it should be going to is the root timeline - not the timeline of the movie clip.

Button AS:

on (release) {
_root.gotoAndPlay("41");
}

This works - but overall perhaps this is not the best aproach to what you are trying to achieve. But hey you can always rework it in version 2 right?
posted by gomichild at 8:02 PM on December 11, 2006


I realized I should have suggested earlier that it's a lot more convenient to label frames, than to point to an actual frame as with labels you can add and subtract from the main timeline without it affecting other code - whereas if you use frame number you are locked into the structure, and if you make changes within the timeline have to trace back and update the code.

This is especially a hassle when you have separate buttons with code attached directly to them.
posted by gomichild at 6:02 AM on December 12, 2006


Response by poster: Thanks for the help, your _root suggestion didn't work for me because there is actually a intro scene before the first scene in the file I posted, so the link would just take me back there.
I got it to work using a combination of the _parent identifier and a frame label. Hopefully this will serve my purposes.

And yeah, I'll get started on version 2 when they add "Flash Designer" to my title and another zero to my salary.
posted by bradn at 6:47 AM on December 12, 2006


That's the right way to think!
posted by gomichild at 6:54 AM on December 12, 2006


« Older How do I go from skinny to kinda buff?   |   Where did my .doc go? Newer »
This thread is closed to new comments.