SwishTalk.com
 

Go Back   SwishTalk.com > .:: THE HELP DESK ::. > » Actionscript Help

Reply
 
Thread Tools Display Modes
#1   How to control All MovieClips with one code ?!  

Name: 
Eidrisha
Status: Offline
Rank: Registered User
Posts: 4
Old 01-29-2012, 03:36 AM Reply With Quote


How to make a script to stop all movieClips in the movie without knowing there number or names
as it'll be a component :
add it to any movie --> control every thing




               
 
View Public Profile Find all posts by Eidrisha Add Eidrisha to Your Contacts
#2    
 
cycle1500's Avatar

Name: 
cycle1500
Status: Offline
Rank: Oberlin, Ohio, USA
Posts: 1,498
Mood: MEAN: Do's not play well
Old 01-29-2012, 05:15 AM Reply With Quote


You don't need a component. All that is needed is a simple stop and play
Code:
 on (press) {
    stop();
}
Play code:
Code:
on (press) {
    play();
}


               
__________________
The Hairy One
Wayne helps those that helps themselves.
 
View Public Profile Send a private message to cycle1500 Find all posts by cycle1500 Add cycle1500 to Your Contacts
#3    

Name: 
OutCast**NL
Status: Offline
Rank: SWiSHer
Posts: 647
Old 01-29-2012, 11:06 AM Reply With Quote


Stop ALL movieclips:

Code:
function stop_All(mc) { 
    mc.stop(); 
        for (var i in mc) { 
            if(typeof mc[i]=="movieclip") { 
                if(mc[i]!=mc) { 
                     stop_All(mc[i]); 
                } 
            } 
        } 
}
Code:
on (release) {
    stop_All(_root)
}




               
 
View Public Profile Send a private message to OutCast**NL Visit OutCast**NL's homepage! Find all posts by OutCast**NL Add OutCast**NL to Your Contacts
#4    

Name: 
Eidrisha
Status: Offline
Rank: Registered User
Posts: 4
Old 01-29-2012, 02:00 PM Reply With Quote


Quote:
Originally Posted by cycle1500 View Post
You don't need a component. All that is needed is a simple stop and play
Code:
 on (press) {
    stop();
}
Play code:
Code:
on (press) {
    play();
}
hi !!Plz read my question again


Quote:
Originally Posted by OutCast**NL View Post
Stop ALL movieclips:

Code:
function stop_All(mc) { 
    mc.stop(); 
        for (var i in mc) { 
            if(typeof mc[i]=="movieclip") { 
                if(mc[i]!=mc) { 
                     stop_All(mc[i]); 
                } 
            } 
        } 
}
Code:
on (release) {
    stop_All(_root)
}

Exactly what i need
Thankssssssssssssssssssssssssssssssss for ur great help


               
 
View Public Profile Find all posts by Eidrisha Add Eidrisha to Your Contacts
Advertisement:





Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump