View Full Version : (MX) Interactive Movie Clips
kingfish
June 30th, 2003, 11:29 PM
I've been wracking my brain over this and I'm getting nowhere. Hopefully, someone can understand this and give me a few pointers.
I've managed to create an master swf which loads other, smaller swf files at the click of a button. I'm using the loadmovie command and loading them into other layers. I need for those smaller movies to be able to control elements of the original movie. For example:
Mainmovie.swf contains a graphic object called graphic_1
At a button click, Submovie.swf is loaded into layer one.
I need to make graphic_1 invisible when Submovie.swf reaches frame 15.
Is there any way Submovie can influence the _visible or _alpha properties of an object located in Mainmovie? I've tried several different ways to do this with no luck.
Hopefully, a more learned master can shed some light on the problem.
Thanks,
kode
July 1st, 2003, 02:32 AM
first off, if you're actually using a Graphic symbol, change its behaviour to MovieClip. a Graphic symbol has no properties or methods.
to reference the instance, as long as it is located in the main timeline, you use _root.
_root.graphic_1._visible = false;
kingfish
July 1st, 2003, 10:22 AM
Thanks for the response. Apparently, I'm still doing something screwy. Here is the exact script that calls the submovie:
on (press) {
loadMovie("switch_web.swf", 2);
gotoAndStop(5);
}
The clip switch_web.swf uses the following code:
onClipEvent (load) {
play();
}
And at frame #15 in the actions layer:
_root.backmask._visible = false;
backmask is set as a movie clip and exists in its own layer. For some reason, it remains visible no matter what I do.
Any more thoughts as to what I'm doing wrong? I really appreciate the help.
kode
July 1st, 2003, 11:01 AM
nope, i don't know what could be wrong... can you attach your FLA's? :)
kingfish
July 1st, 2003, 01:43 PM
The original files were too large to attach, so I've recreated simple files that experience the same problem. The main file test.swf loads bounce.swf, which in turn should make an object invisible in the root timeline.
Hopefully, I've attached the files correctly.
kingfish
July 1st, 2003, 01:44 PM
Here's the second fla file
Thanks again!
Voetsjoeba
July 1st, 2003, 01:59 PM
You forgot to give the movieclip an instance name. Click on the movieclip, then look in the properties panel, on the left, there's a box that says <instance name>. There, you have to fill in the instance name of the movieclip. That would be backmask. Otherwise, the movieclip won't be recognised.
kingfish
July 1st, 2003, 02:11 PM
Thanks.
I went to test.fla, and added the instance name - I called it testinstance.
Then I went to bounce.fla and changed the script at frame 10 to read:
_root.testinstance._visible = false;
It's not working. The "test" symbol is still there throughout.
*sigh*
kode
July 1st, 2003, 10:47 PM
http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary633.html
the problem is that you're loading the movie into level 2, replace _root with _level0 and it should work. =)
and also, as Voetsjoeba mentioned, don't forget the instance name. ;)
kingfish
July 2nd, 2003, 12:35 AM
THANKS THANKS THANKS!
It works perfectly now. I think I even understand why (maybe).
I appreciate the patience and advice.
kode
July 2nd, 2003, 01:14 AM
no problem. :P
by the way, welcome to kirupa forum!! ;)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.