Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > Simple Stuff (Newbies)

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-22-2003, 02:54 PM   #1
wayneM
Registered User
 
Join Date: Feb 2003
Location: Virginia
Posts: 16
Default stop movie but not actionScript?

I have worked for a week trying to figure this problem out. I just cant get the script right to stop my entire swf after looking at tutorials, help, books, etc.

I have a simple .fla. One scene and one movie clip inside called "textMovie". I made a button that stops the main movie by this script:

on (release) {
_root.gotoAndStop("begin");
}

It works fine to stop the main movie UNTIL the textMovie clip begins playing.

NOW, my problem: The reflected text (from the textMovie actionScript) keeps playing even though my regular text stops after pressing the stop button. I need it all to stop. I will include some of the code for the actionScript below:

i = 1;
alpha = 1;
max = 25;
setProperty("\"/depth0\"", _visible, 0);


while (i<=max) {
duplicateMovieClip("/depth0", "depth" add i, 500-i);
setProperty("/depth" add i, _xscale, getProperty("/depth" add(i-1),_xscale)+i*alpha);
setProperty("/depth" add i , _yscale, getProperty("/depth" add(i-1),_yscale)+i*alpha);
setProperty("/depth" add i, _alpha, 10-i*(.2));
i = i+1;
}

Could you please give me the correct code to stop the entire mc and its action script code. I hope i made myself clear. Thanks
wayneM is offline   Reply With Quote
Old 02-22-2003, 09:21 PM   #2
Ricod
(@_@) -("pretty lights")
 
Ricod's Avatar
 
Join Date: Sep 2001
Location: the Netherlands
Posts: 3,982
Default

Well, you didn't tell your duplicated mcs to stop, so I guess you'll need to include it in your 'stop'-code.
ActionScript Code:
on (release) { _root.gotoAndStop("begin"); for (i=1; i<25; i++) { _root["depth"+i].stop(); } }
__________________
RicoD
Link ?
Ricod is offline   Reply With Quote
Old 02-22-2003, 10:48 PM   #3
wayneM
Registered User
 
Join Date: Feb 2003
Location: Virginia
Posts: 16
Default

Thanks Ricod! Works great! I added an "=" sign to i<max to read i<=max and it works great.

One last question? would you mind showing how to have the screen show a blank instead of one of the duplicate movie frames when it is stopped? I want to add a play button, but not sure how to clear the screen completely after the stop button is pressed.

You have been a great help! I am new to actionScript but trying to learn.

Thank you!
Wayne
wayneM is offline   Reply With Quote
Old 02-22-2003, 10:54 PM   #4
wayneM
Registered User
 
Join Date: Feb 2003
Location: Virginia
Posts: 16
Default

sorry, i meant: i<=25
wayneM is offline   Reply With Quote
Old 02-22-2003, 11:42 PM   #5
Ricod
(@_@) -("pretty lights")
 
Ricod's Avatar
 
Join Date: Sep 2001
Location: the Netherlands
Posts: 3,982
Default

If you just want a blank frame : make a frame with nothing on it and tell _root.gotoAndStop("myEmptyFrame");
__________________
RicoD
Link ?
Ricod is offline   Reply With Quote
Old 02-23-2003, 12:18 AM   #6
wayneM
Registered User
 
Join Date: Feb 2003
Location: Virginia
Posts: 16
Default

I did that. it works only for the main movie.

When i hit stop while viewing the movie clip (inside the main movie), the duplicate frame freezes on the screen. I think what it is showing is a part of this: _root["depth"+i].stop();

can you tell me how to remove this and get a blank screen?

thanks,
wayne
wayneM is offline   Reply With Quote
Old 02-23-2003, 01:12 AM   #7
Ricod
(@_@) -("pretty lights")
 
Ricod's Avatar
 
Join Date: Sep 2001
Location: the Netherlands
Posts: 3,982
Default

I believe this would do that (not sure though, as I haven't tried it myself ... ever):
ActionScript Code:
on (release) {         _root.gotoAndStop("begin");         for (i=1; i<25; i++) {                 _root["depth"+i].removeMovieClip();         } }
__________________
RicoD
Link ?
Ricod is offline   Reply With Quote
Old 02-23-2003, 07:15 PM   #8
wayneM
Registered User
 
Join Date: Feb 2003
Location: Virginia
Posts: 16
Default

well, I tried it. No success.

when i use the following code it works if i click my stop button twice. any thoughts on how to fix it?

on (release) {
_root.gotoAndStop("begin");
for (i=1; i<=25; i++) {
_root["depth"+i].removeMovieClip();

}
}
on (release) {
_root.textMovie.gotoAndStop("begin");
}



if I dont use the second "on (release)" then something in the background still plays. Your thoughts appreciated. Almost there! thanks again.
wayneM is offline   Reply With Quote
Old 02-23-2003, 07:32 PM   #9
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Hm... There's gotta be something else going on in your movie which hasn't been stated in the thread... Care to upload the sample file so that we could take a look???
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 02-23-2003, 07:44 PM   #10
wayneM
Registered User
 
Join Date: Feb 2003
Location: Virginia
Posts: 16
Default

Hi!

I can't post the .fla publicly as it includes dated material for a company sale. However, if you want to email me your email address, I will email the fla to you, and you could post your answer on a thread here. [email protected].

thanks,
wayne
wayneM 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 10:42 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.