I have a movie clip instance ("mc1") on the Stage. When the .fla file is run I want the movie clip to do something when it is clicked, so I put in the following code:
function handlemc1(event:MouseEvent):void { // do something here } mc1.addEventListener(MouseEvent.CLICK, handlemc1);
This code works fine. Now, there are times when I will want to disable "mc1" so that it doesn't respond to a click. So I execute this code in those circumstances:
mc1.enabled=false;
But this seems to do nothing. When the user clicks "mc1" the code inside "handlemc1" is executed. I even put a trace inside "handlemc1" which prints out the value of mc1.enabled. The value that is printed to the output window is "false".
I would be grateful if someone could tell me why setting "mc1.enabled=false;" did not stop "mc1" from responding to the click event. Also, is there another way to disable "mc1"?
disable a moive clip example i use arrow key to rotate a clip then when i process i want the clip to be station at there when moving again when i use arrow key again i know use the enable but i tried many time and it fail me my coding was
What will my movie clips not disable here. They are still clickable? I get my trace 24 times. what am i doing wrong. I have 24 cards all named card0_mc - card23_mc
code: function disableCards() { for (i=0; i<24; i++) { trace("in here"); this["card"+i+"_mc"].enabled=false; } }
I have a screen with transparency that pops up over a movieclip full of buttons.I need to disable the movie clip and/or buttons so they don't function when the pop up comes up.Can't get it to work with this code:
myMC._enabled=false; or myMC.myBTN._enabled=false;
I have some buttons, and above them a movie clip with a 20% transparency which I use for some graphic effects in my page. But the buttons can't be accessed (they are not working) because the layer covers them.I have used the following code to disable the graphic layer:overlay_mc.buttonMode = false;overlay_mc.enabled = false;overlay_mc.mouseEnabled = false;but none of these solves the problem. The buttons are still covered and inactive.
i have about 40 buttons in one movie clip called showmcall i have a massive movie clip that covers all of the movie clips , i've tried disabling the buttons by disabling the movie clip :
iam tring to make a new project , i just wants to know how to make a movie clip ( constant speed ) follows anther movie clip <--- "which can be moved by the user "
<<<>>>> i believe that this idea is good , that i records the X and Y postion of the User's movie clip and just make the other movie clip points at this postion and move toward it ,
how to make the other Movie clip (( which is a car ! .. so it have acceleration , speed , steering , etc )) go to this position or let us say try to??
I am attempting to disable buttons that lay under my movie that loads. This code works all the way up until I close my exit button and then the buttons do not enable again.
I have an swf with several movie clips set up to work as navigation buttons (using _up, _over and _down frame labels). The same navigation swf is used by several different HTML pages and navigates between them.
I want to pass the swf a variable with FlashVars in the object/embed script that will disable the movie clip button for the page the user is currently on.
In AS3 myClip.enabled = false; only removes the rollover behavior of the clip, but does not prevent the clip from receiving mouse events.
How can I disable the clip completely so that it does not respond to events?
if i wanted to disable something like a movie clip from being clickbale (i have already linked it to a function) if i want to diable the movie clip form being clicked unless something else has been pushed how would i do this and where would i put it? also if its not too much trouble could you explain the code a little bit
I have been having some trouble with a movie clip basically designed to act as a button for a store front for a website.This movie clip has, stored as the front of the movie (i.e. before you click in to edit the movie) the following code:
This gives the movie the hover over and out effect and animates the button so as once pressed the button expands to give a 'Product Details' view.However, when clicked the info shows up as it should but the hit area which I put into the Movie Clip is still on the info area so none of the contents on this new window are accessible and when the cursor leaves the designated info area the movie clip returns to its first stage as it would appear at the start of the animation.Is there any simple way to disable the HitArea on specific frames within a Movie Clip?
I'm making a room escape game and I've run into a problem. When an item gets added to the inventory, I'd like the user to be able to click on the item to affect another object (e.g. clicking screwdriver hides screws and displays other image) however when I add the code to the item, if the item is clicked and it's nowhere near the object it affects, the image pops up and it looks really stupid.
So what I'd like to be able to do, possibly using if and else statements or whatever's easiest, is to only have the inventory item be clickable if the movie clip of the object is affects is visible on the stage.
I have a site with a container clip which all other content loads into. When one movie loads, it has a button that I'd like to be able to click to go to another page in the site (ie. unload it's parent movie and load another swf into the same container clip.
How can I address the parent container clip and tell it to unload this movie and load another swf into it?
I have a bunch of movieclips which constantly do the following:
mc.parent.addChild(mc);
as in bring themselves on top. I want a movie clip to always stay blocking them, without adding it to the stage every frame, which is unnecessary memory usage.
Animation of the head that comes up with the crank on it is 15 frames long. The head stops at frame 15, and it begins to crank at frame 16. Do I make a keyframe at frame 16 of that still crank at its begininng position, double click it to get its own timeline, then import the other 7 images of the crank animation into this seperate timeline, animate its cycle, then go back to the main time line at frame 16 and it should play the cycle when the main timeline hits frame 16? What if I want the cycle to only crank once around and not loop? Then, what happens to this movie clip when frame 17, 18 20, 30 is playing? It takes say 2 seconds to play the crank animation so while the play head is going along after frame 16, and the crank is moving what is in its place on the main timeline after frame 16? Should I just put frames in for the length of the rest of the animation (brain and words coming out of the head)?
I have a simple animation which fades in two movie clip objects at the end. After this, the image stays static. I want both objects to be buttons to link to a website and to emailI'm not sure how to go about doing this, it seems once an object converted to a movie symbol it cannot be a button at the same time. How can I achieve this with CS4?
this will make your movie clip bounce. that i need to know is why does it bounce. i cant quite get my head around it. i start of and accelerate, hit 300 on the stage but then go up decreasing my speed by 0.8 every frame..
I know this sounds stupid, but I've worked like all the time with Flash 2004 and Flash MX. Now I got CS3, and I want to do the following. I made a MP3 player, but I want to make a 'play' icon visible when the music plays and the 'pause' icon visible when it's paused. Therefor the 'play' icon needs to be invisible,
Ok I want to make spawn able enemies and when they get in like 5 pixles in range they start to follow the player they are moving and if they switch directions it will go to another frame that will make it look like they are running in that direction. How can this be acheived?
I recall doing this, but don't remember the steps. I need to make a movie clip into a button. I recall having frames with the labels "_up, _over, and _down" But that's all I remember. I lost my book with the instructions. Does anyone have any links to tutorials on this.
I have an issue while trying to create an instance of a movie clip, in order to rotate it dynamically. How can I have a variable of type myMovieClip in which I can invoke the _rotate method?