Page is a not externally linkable
- Code, Content, and Presentation
-- Flash and Shockwave
---- Could someone error check this?


GGR_Web - 10:56 am on Feb 18, 2009 (gmt 0)


As far as I can tell this is valid as2 code:

if (no.frame = 1) {
no.onPress = function(){
play();
no.gotoAndStop(2);
}}

if(no.frame = 2) {
no.onPress = function(){
stop();
no.gotoAndStop(1);
}}

But it doesn't quite work as expected when I preview it.
The button this is attached to fails to gotoAndStop at frame 2 of the mc and invokes the stop(); function when no.frame is one.

I suspect this needs to handled with an else if statement, but my attempts so far to create one produce 2 or 3 errors in the output dialog.


Thread source:: http://www.webmasterworld.com/flash/3852231.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com