I have a Movieclip called "Button" with two frame inside, frame 1 and 2. I want that in rollover the button go to play it's frame 2 but is not working.
On rollover the movie "Button", the mouse arrow changed to the hand but nothing happend.
nunomira, now I want to do it a little bit more complicated but is not working
I have the movie clip "Button1" inside a swf that is loading on level 4, and I want to have the script this time on level0 or the main swf but is not working
_root.level4.Button1onRollOver = function () {
this.gotoAndPlay("R_Over");
Like I said, that has to be defined after the movie loads on _level4, and Button1 exists. This means you have to preload the external movie.
code:
// preload the external movie using MovieClipLoader Class
// create MovieClipLoader Object and Listener Object
var mcl:MovieClipLoader = new MovieClipLoader();
var mcll:Object = new Object();
// when the movie finishes loading
mcll.onLoadInit = function(mc:MovieClip)
{
// mc is the target, _level4 in this case
mc.Button1.onRollOver = function()
{
this.gotoAndPlay(2);
};
};
// add the Listener Object mcll to the MovieClipLoader Object
mcl.addListener(mcll);
// load the movie TestMenu1.swf, and _level4 is the target
mcl.loadClip("TestMenu1.swf", 4);
nunomira, I created that simple testMain.fla just to get it to work so I could add the working script to my working file. but now I can't get it to work
this is my script that will load diferent movies on my working file, everything is working but I can't target the "menu.swf" on level 4. this script is similar to the one you did.
var MasterLoader:MovieClipLoader = new MovieClipLoader();
//----Creating a variable "MasterListener" (Object) That will listen or check....\\
//-------for what is heppening with the movie being load----------\\
var MasterListener:Object = new Object();
MasterLoader.addListener(MasterListener);
// when the movie starts loading, stop it, and hide it
MasterListener.onLoadStart = function(target_mc) {
target_mc._visible = false;
target_mc.stop();
};
// when the movie has loaded, play and show it
MasterListener.onLoadInit = function(target_mc) {
target_mc._visible = true;
target_mc.play();
};
This is the function you made I just change the movie label name and "mc" for "targer_mc" but is not working. Everything in this code works fine but this part, and I can't still get to target the level 4 "HomeBtn"
nunomira I tried placing the code inside onLoadInit(). and outside and is not working either.
Code:
var MasterLoader:MovieClipLoader = new MovieClipLoader();
//----Creating a variable "MasterListener" (Object) That will listen or check....\\
//-------for what is heppening with the movie being load----------\\
var MasterListener:Object = new Object();
MasterLoader.addListener(MasterListener);
// when the movie starts loading, stop it, and hide it
MasterListener.onLoadStart = function(target_mc) {
target_mc._visible = false;
target_mc.stop();
};
// when the movie has loaded, play and show it
//function swfLoaded(nextSWF, target_mc) {
MasterListener.onLoadInit = function(target_mc) {
target_mc._visible = true;
target_mc.play();
target_mc.homeBtn.onRollOver = function()
{
this.gotoAndPlay("R_Over");
};
};
MasterLoader.loadClip("Menu.swf", 4);
Any ideas why I can't control the "homeBtn" moviclip that in on "Menu.swf" level 4 ?