View Full Version : Controlling an *attachedMovie*?
earph
July 22nd, 2003, 03:25 PM
Is it possible to control a MC that is attached to another MC?
Example:
-------------------------------------------------
on (release) {
_root.loader.play();
}
-------------------------------------------------
*loader* is the blank MC.... and I want to control the MC that is attached to it called *movie1*.
Is that possible? Why is it not working?
Thanks ahead of time.
e.s.x.s
July 22nd, 2003, 03:42 PM
of course, you can control the attached movie with its instance name that u give..
if your code is
loader.attachMovie("mc1","movie1",1);
you can control it with;
_root.loader.movie1
e.s.x.s
thoriphes
July 22nd, 2003, 03:51 PM
you can also use this method, which is my personal favorite:
mc = attachMovie("clip", "clip", 0);Now you can control "mc" as "clip". e.g.:
mc._xscale = 50;
earph
July 22nd, 2003, 04:34 PM
Thanks.... e.s.x.s
The code worked just fine, and I got my MC controlled.... The only problem is that the movie that is being *attached* will change a lot and I cant control straight to it.
Know what I mean?
Where you said: *_root.loader.movie1*
Depending on what button you push, it might be *movie2*, *movie3*, and so on.
So, I can exactly tell my button to control *movie1* when some other movie was loaded into it.
Does that make sense?
Thanks!
e.s.x.s
July 23rd, 2003, 04:17 AM
i can't understand well..but my answer is:
if you attached the "movie1" ,add your code:
_root.myAttachedMovie = "movie1";
and add below code to your buttons:
on(release){
if(_root.myAttachedMovie == "movie1"){
//what you want to do
}
if(_root.myAttachedMovie == "movie2"){
//what you want to do
}
if(_root.myAttachedMovie == "movie3"){
//what you want to do
}
}
earph
July 23rd, 2003, 10:45 AM
Thanks! I also found another way.... see below.
BUTTON:
--------------------------------------
_root.loader.thePath.play()
FIRST FRAME OF MOVIE THAT WAS ATTACHED
------------------------------------------------
_parent.thePath = this
Thanks for all the help.... I appreciate it.
e.s.x.s
July 23rd, 2003, 10:54 AM
u r welcome skillet:) i couldn't understand right, what u mean;) but now i understood:)
e.s.x.s
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.