-
gotoAndPlay
I'm using Flash MX 2004 on a PC. Haven't used Flash since v5 so everything is different. I'm trying to get a submit button when clicked goes to a frame within a movieclip and I don't know the updated ActionScript programming to make it do that. (The submit button in not active, all it is doing is going to a frame that says "username and password did not match.") Any help on this would be much appreciated. THANKS!!
-
Senior Member
on(release){
movieClipName.gotoAndPlay(5);
}
...but its recommended to always use framelabels instead of framenumbers.
on(release){
movieClipName.gotoAndPlay("myFrameLabel");
}
-
Here's my code I'm using but I'm getting an error:
stop();
on(release){
lounge_content.gotoAndPlay("all_drinks");
}
This is the error I get:
**Error** Symbol=drinks_menu, layer=actions, frame=86:Line 2: Mouse events are permitted only for button instances
on(release){
-
Senior Member
You have to paste the code on the button, not in a frame.
-
gotoAndPlay
That's what I thought too, but when I get into the button timeline it says in the action window 'Current selection can not have actions applied to it' What's up with that?
-
Right-click the button on stage, and select Actions. That will bring up the Actions button window, where you should add your script.
-
Alright, sorry to be a royal pain, but I desperately need this to work. My button is in a movie clip. When in the button timeline, I right click the button and these are the options I have:
Cut, Copy, Paste, Select All, Deselect All, Free Transform, Arrange, Break Apart, Distribute to Layers, Covert to Symbol, Timeline Effects, Check Spelling. I'm not sure if I'm right clicking the button in the right area.
-
I'm still on MX only, not on MX2004, and can't open a MX2004 .fla.
So save a copy of your MX2004 .fla in a MX only format, using Save As... (under File) and changing the Document Type in the Save As... window. Attach your new MX .fla here.
-
gotoAndPlay
I'm uploading the .fla file to my server. You can access it here:
http://207.76.73.31/ideaz_help.htm
Thanks for taking a look at it - our programmers have their hands tied and it's on my plate.
-
Nice try but I get the Unexpected file format error!
Did you save a copy in a MX only format, as I requested above?
If so are you on MAC?
-
gotoAndPlay
try again, it just finished uploading (there are 2 formats). I'm on a PC laptop
-
Ok! Second one works for me! Downloaded! Doesn't mean I'll find out the problem, but will have a look in a few minutes... Got to finish another thread off first!
-
Ok! well it's not frame 87 but 86, and your code should be...
code:
on(release){
_root.recipes.gotoAndPlay("all_drinks");
}
Next problem is also that there's no frame labeled "all_drinks" on frame 225 of your "recipes" (that's the instance name, not "lounge_content"!) clip. But if you label that frame with "all_drinks", it should work fine...
I've tested it with other labeled frames in the "recipes" clip and it works fine!
Last edited by oldnewbie; 10-06-2004 at 02:24 AM.
-
gotoAndPlay
oldnewbie -
I got it to work using your advice! I can't tell you how much time you've saved me. You and the staff at Flashkit have been awesome and I've used this site many times in the past and have had found answers to my questions. I hope you know your worth.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|