all groups > flash actionscript > may 2005 >
You're in the

flash actionscript

group:

script problem..


Re: script problem.. loofa
5/8/2005 12:00:00 AM
flash actionscript: no luck..
Re: script problem.. kglad
5/8/2005 12:00:00 AM
there's no problem with the script i wrote. it will do exactly what i think it
should do:

if the _root timeline is on frame 1 when the button is released the playhead
will be directed to frame 3 of the _root timeline and play; if the _root
timeline is on any frame other than 1, the playhead will move back one frame
and play.

so, what's not working?
Re: script problem.. loofa
5/8/2005 12:00:00 AM
i have no idia why it didn't work
but i changed it up a little and finally got it working
Re: script problem.. kglad
5/8/2005 12:00:00 AM
script problem.. loofa
5/8/2005 2:10:13 AM
whats wrong with this script?
on(release) {
if( _currentframe == 1 ) {
gotoAndPlay(3);
}
else {
gotoAndPlay( _currentframe - 1 );
}
}

btw theres 2 scenes, this is in the movie, the movie scene is after the
opening scene.
when the opening scene is before the movie scene it doesn't work but when the
opening scene is after the movie scene it does work.?.?. but I need the opening
before the movie.....
any ideas?
thanks,
Tommy
Re: script problem.. kglad
5/8/2005 2:39:36 AM
reference the _root timeline and you shouldn't have a problem:

on(release) {
if( _root._currentframe == 1 ) {
_root.gotoAndPlay(3);
}
else {
_root.gotoAndPlay(_root. _currentframe - 1 );
}
}
AddThis Social Bookmark Button