|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ActionScript 2 - Controlling one MC from another? AS 2.0
i have two MC with two swf files loading into them on my main file. what i am trying to do is have buttons in one MC move something in the my 2nd mc. i know that the _root. will work for controlling my main file but I'm don't know how to go about controlling anything inside of other movie clips. if anyone can help out at all it would save me big time.
Thanks guys |
|
#2
|
|||
|
|||
|
Once the two files have loaded they will both have the same _root which is the top most MovieClip/document. If you give them both instance names then you can control them via _root.clip_name_one.gotoAndPlay(1); etc.
__________________
Quis custodiet ipsos custodes?
|
|
#3
|
|||
|
|||
|
ok cool i will try this out, thanks so much tann
|
|
#4
|
|||
|
|||
|
i had two more questions, the first one is the "one" in _root.clip_name_one.gotoAndPlay(1); refer to the level of the mc or is that done with the 1 in the "gotoAndPlay(1);"?
my 2nd question was how would i apply that same code you gave me to moving something to a specific _x, _y inside of "clipB" by hitting a button that is placed inside of "clipA" Last edited by mboom123 : June 23rd, 2009 at 05:04 PM. |
|
#5
|
|||
|
|||
|
the "one" was just part of a name I made up. The whole thing was made up: "clip_name_one". I thought you would of understood that which is why I didn't explain it. The gotoAndPlay was also just part of the example to show how you would call a function within the fictional clip "clip_name_one".
As for moving an object, well you'd give that object an instance name and then control it as you would normally i.e. _root.clip_name_one.movable_object._x = 50; "clip_name_one" and "movable_object" are just instance names I made up for the sake of showing you what I meant. |
|
#6
|
|||
|
|||
|
oh ok, was not sure if the "one" was part of the name or not. thanks for explain that for me tann. you are always a big help thanks much
|
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > ActionScript 2 - Controlling one MC from another? AS 2.0 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|