Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE FLASH: Adobe Flash ForumAdobe Flash TutorialsAdobe Flash Video TutorialsWeb Streaming ForumAdobe Flash

Re: load movie clip... i think

Cow Forums : Adobe Flash
VIEW POSTS   •   ADD A NEW POST   •   SEARCH   •   CHANGE FORUM
Return to Posts Index   •   Read Entire Thread   •   Reply To This Post


Re: load movie clip... i think
by Sher Ali on Jul 1, 2008 at 6:31:45 pm

lets you have 5 movieclips and you have named all of your movieclips on the stage as mc1, mc2, mc3 etc. then you can associate an ID with each button which can be used inside the sourceGlassOver handler function to show the respective movieclip. For I give an ID value of 1 to sourceGlass_mc, like:

sourceGlass_mc.ID = 1;
sourceGlass_mc.addEventListener(MouseEvent.ROLL_OVER, sourceGlassOver);
function sourceGlassOver(event:MouseEvent):void
{
for(var i:Number=0;i<5;i++){
if( "mc"+event.currentTarget.ID == MovieClip(this.getChildByName("mc"+(i+1))).name.substr(2) ){
MovieClip(this.getChildByName("mc"+(i+1))).visible = true;
}
}
}

sourceGlass_mc.buttonMode = true;


If you are creating movieclips and buttons through actionscript then it can be more easy by storing them in arrays. There can be many other ways to achieve what you are trying to.


Sher Ali
Flash & Flex Developer
My FlashDen Portfolio
website: http://www.webeyestudio.com
blog: http://www.kabulinteractive.com/blog


Return to Posts Index   •   Read Entire Thread   •   Reply To This Post


Current Message Thread:
  • load movie clip... i think by Ari Grunzeweig on Jul 1, 2008 at 5:52:52 pm
    • Re: load movie clip... i think by Sher Ali on Jul 1, 2008 at 6:31:45 pm




Note: If you are a registered user and you do not see your name and email in the two respective fields above, you may reset your account cookies by clicking here. Your post will not be accepted if the name and email provided above are not currently registered in our database.

Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message   Entire Thread   None  


Message                Add Bold Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd Italic Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd Underline Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd Image Link Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd URL Link Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this button

Note: The following characters are HTML command characters, and may cause parts of your post to disappear, if not used correctly: < > &. To include any portion of the post in your response, highlight the desired text and hit the "Q" key. For more on how to post, click here.


Add your message signature


 


Note: By clicking "Post Direct" button above, you are agreeing to the Creative Cow's Code of Conduct.



FORUMSLIBRARYPODCASTSBLOGSMAGAZINESERVICESNEWSLETTERSNEWSSTOREEVENTS

© CreativeCOW.net All rights are reserved.

[Top]