-
on(click) does nothing?
on(click){
loadVariablesNum("http://190.168.1.4/functions.asp?func=chkLogin", 0, "POST");
gotoAndPlay(2);
}
How come the above code does nothing when assigned to a component button in Flash MX 2004?
Say I take out the loadvariablesnum and just have:
on(click){
gotoandplay(2);
}
That doesn't do anything either.. What's happening here?
*sigh* I miss Flash 5...
-
Senior Member
change click to press, or even better release in most cases. I think that should work for you.
Code:
on(press){
loadVariablesNum("http://190.168.1.4/functions.asp?func=chkLogin", 0, "POST");
gotoAndPlay(2);
}
If you choose to use release it will make it so when the user releases the button it goes, not when they first click it. It then gives them the option to not click.
"A piece of toast always lands butter side down, and a cat always lands of its feet. If one was to tie a piece of toast to the back of a cat butter side up, would it hover above the ground in perpetual indecision?"
-
Originally posted by MiLo_Anderson
change click to press, or even better release in most cases. I think that should work for you.
Code:
on(press){
loadVariablesNum("http://190.168.1.4/functions.asp?func=chkLogin", 0, "POST");
gotoAndPlay(2);
}
If you choose to use release it will make it so when the user releases the button it goes, not when they first click it. It then gives them the option to not click.
Anyone know why on(release) is no longer in the code hinting in Flash MX 2004? Milo, check this out.. Attached a basic FLA.. All it's supposed to do is upon click of "TEST ME" it goes to frame 2.
It does nothing.
The *chuckle* "very advanced complicated code" (that works fine in Flash 5) doesn't in Flash MX 2004:
*******************************
on(release){
gotoAndPlay(2);
}
*******************************
Above code attached to a button component does nada. Again.. I miss Flash 5.. I never should have upgraded.
Here's the FLA
http://www.nypm.net/test.zip
Last edited by ChandlerL; 03-16-2004 at 10:27 PM.
Chandler
-
Component buttons are different from regular buttons. If you make a button the way you did in Flash 5, the code will work just fine.
To make the component button work, you would use:
on(click){
_root.gotoAndPlay(2);
}
Last edited by rdoyle720; 03-16-2004 at 10:41 PM.
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
|