Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-12-2004, 10:39 PM   #1
pilly
Registered User
 
Join Date: Feb 2004
Location: Boston
Posts: 28
Default stopping a swf from playing in main scene

I'd just like to mention - I'm very new to AS...and I apologize for such a weak post. I've searched and even tried coding for hours with no luck

I've followed the tut below - basically what happens...the "content1.swf" plays in the first scence. I'm trying to figure out how to stop "content1" from playing before the user/viewer hits button1.

Here's what the code looks like (minus the preloader from the tut).

nextMovie="content1.swf";
//load the starting movie into level 1
loadMovieNum(nextMovie,1);
//button1 actions
button1.onRelease=function(){
//this makes sure that content 1 isn't already loaded
if(nextMovie!="content1.swf"){
//set the variable that holds the name of the movie to be loaded
nextMovie="content1.swf";
//tell the currently loaded content movie to play it's outro animation
_level1.gotoAndPlay("outro");
}
}
//button2 actions
button2.onRelease=function(){
//this makes sure that content 1 isn't already loaded
if(nextMovie!="content2.swf"){
//set the variable that holds the name of the movie to be loaded
nextMovie="content2.swf";
//tell the currently loaded content movie to play it's outro animation
_level1.gotoAndPlay("outro");
}
}

Any help would be great. Thanks for reading - and again, I apologize in advance for a boring post.

http://www.tableau.com.au/tutorials/smooth_transitions/
pilly is offline   Reply With Quote
Old 02-13-2004, 01:15 AM   #2
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

You should have a stop(); action on the first frame of the content1.swf, and only start it up with the button press.
oldnewbie is offline   Reply With Quote
Old 02-13-2004, 07:54 AM   #3
pilly
Registered User
 
Join Date: Feb 2004
Location: Boston
Posts: 28
Default

Mmm...once again, thank you very much for your response. I'll have to test it out once I get home! Sorry for the stupid questions...I appreciate your help greatly!
pilly is offline   Reply With Quote
Old 02-13-2004, 05:52 PM   #4
pilly
Registered User
 
Join Date: Feb 2004
Location: Boston
Posts: 28
Default

A stop action in the first frame of content1 didnt work. It doesnt load - but when I click content2...the outro of content1 plays (the intro of content2 should play). If I can't figure it out - I'll prolly just add a precontent1 swf (something like a home link). Again, thanks for your time!
pilly is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:44 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.