ziggy
03-30-2003, 02:47 PM
Hey AS people! =)
I have a little sound player that uses OnRelease/loadMovie to load an external sound swf. I'm sending the foo variable by attaching it to the swf url.
Now I'm trying to get the totalFrames of the loaded movie, then reset my player at the last frame of the loadedMovie.
How would I get the _totalFrames from my OnRelease/Play actions here...
on (release) {
loadMovieNum("http://www.vroom360.com/swf/"_level0.foo,1);
gotoSceneAndStop("player",2);
with (player_uf) {
gotoAndPlay(2);
}
}
Then after getting the _totalFrames, I need to fire off these actions (same as my stop button) at the last frame to reset my player...
on (release) {
gotoSceneAndStop("player",1);
unloadMovieNum(1);
with (player_uf) {
gotoAndPlay(1);
}
}
I was playing with this, it doesn't work though =) & it seems like it would be checking every frame as it plays? I'd think there would be a better way so you could just parse the _totalFrames of the loaded movie, then fire the reset actions at the last frame?
if( _level1._currentframe == _level1._totalframes )
{
gotoSceneAndStop("player",1);
unloadMovieNum(1);
with (player_uf) {
gotoAndPlay(1);
}
}
Thanx a bunch, I'm slowly learnin' ;)
Cheers...ziggy
I have a little sound player that uses OnRelease/loadMovie to load an external sound swf. I'm sending the foo variable by attaching it to the swf url.
Now I'm trying to get the totalFrames of the loaded movie, then reset my player at the last frame of the loadedMovie.
How would I get the _totalFrames from my OnRelease/Play actions here...
on (release) {
loadMovieNum("http://www.vroom360.com/swf/"_level0.foo,1);
gotoSceneAndStop("player",2);
with (player_uf) {
gotoAndPlay(2);
}
}
Then after getting the _totalFrames, I need to fire off these actions (same as my stop button) at the last frame to reset my player...
on (release) {
gotoSceneAndStop("player",1);
unloadMovieNum(1);
with (player_uf) {
gotoAndPlay(1);
}
}
I was playing with this, it doesn't work though =) & it seems like it would be checking every frame as it plays? I'd think there would be a better way so you could just parse the _totalFrames of the loaded movie, then fire the reset actions at the last frame?
if( _level1._currentframe == _level1._totalframes )
{
gotoSceneAndStop("player",1);
unloadMovieNum(1);
with (player_uf) {
gotoAndPlay(1);
}
}
Thanx a bunch, I'm slowly learnin' ;)
Cheers...ziggy