ActionScript 3.0 :: Delete/remove A Movie Clip After The Wrong Answer Button Is Clicked?
Nov 20, 2009How do I delete/remove a movie clip after the wrong answer button is clicked?
View 16 RepliesHow do I delete/remove a movie clip after the wrong answer button is clicked?
View 16 RepliesWhat I'm trying to do - remove/delete a movie-clip once a button has been pressed (Selling a tower)My problem - Is that from my limited knowledge none of the following work.
removeChild(myTower);
Turret.removeChild(myTower); - (trying to reference the class of the turret so that it can access the movieclip)
Turret.parent.removeChild(Turret)
Turret(root).removeChild(Turret)
This function is placed in the first frame of the source.fla where all main functions are.The turret has its own class defining its properties and such.Basically what i want to happen is when the button function is activated to remove the movieclip Turret and the class from running.
I am trying to build a website, and here is the logic behind my problem. I have 2 button, when user clicked on button 1 i load movie clip from library with: _parent._parent.cont.attachMovie("Page1", "e", 0, {_x:-265, _y:-250}); when user clicked on button 2, i load other movie clip. Problem: i want remove last movie clip after user clicked on button 2 and then load new movie clip but i cant...
View 9 RepliesThe code runs fine, but the problem I'm having is that the text box that is suppose to go onto of my answer buttons is behind the button itself... however, if I change two lines of code around, the answer validation code doesn't pick up the which answer was clicked (it returns undefined). This is infuriating!Look for the line "//INSERT HERE." If I take the line, "var answerField:TextField = createText(answer,answerFormat,answerSprite,0,0,450);" and put it there instead, it returns the right answers (doesn't return undefined), but I can no longer see the text. I've included the createText function as well.
private function askQuestion()
{
trace("asking question...");
[code]......
how to keep a Movieclip Btn 'Over State' to stay in the over position until another button is clicked?
View 1 RepliesAnyway what I need to do is have a movie clip finish playing when a button is clicked and then go to the frame label associated with the button. I hope I'm explaining myself ok. So if I had say 4 buttons Home Gallery About Contact If Contact is clicked then I want the Home page to play (Which is a fade out) and then go to Contact Page (which will fade in). Then If Gallery is clicked then I want Contact to fade out and then go to Gallery page and fade in.
View 6 RepliesOn looking into buttons, I understand that to get a movie clip to play when a button is clicked you simply place the movie clip on the buttons 'hit' state. Having done this it does not work? Have I read wrong? Also the movie clip has a background the full size of the stage area. So when I attach this to the button, the button changes size to the same size as the movie? (i.e. whole stage area). How do I keep the button in it's original size while still playing the movie clip with large background?
View 2 RepliesIm trying to load a movie clip when a button is clicked
heres the actionscript im using
on (release) { this._parent.loadMovie("Video.swf", "holder", 1); holder._x = 611; holder._y = -92;}
i want the swf to load into the holder MC, instead its loading the video.swf file and replacing the original swf
When you click on a button it loads the movie clip that is on the main timeline. What I want to be able to do is when you click on another button the movie clip that you are on reverses and the new movie clip loads up.
View 4 RepliesI'm using a movie clip as a button to show content on a page, effectively its like a new page of the website. Problem is, with the script im using for it, once the content is show, the button is still active and if clicked again, will re-load the content. I want a way to effectively disable the button whist the content is shown.
this.services_inner.buttonMode = true;
this.services_inner.addEventListener(MouseEvent.MOUSE_OVER, rollOver_services);
this.services_inner.addEventListener(MouseEvent.CLICK, onClick_services);
[code]........
I want to play a movie clip when I click a button.I made 3 states: inicial (how it looks before anything happens) (up)hover (plays an animation after waiting 20 frames) (over)click (plays an animation right away) (down)I placed these movie clips inside of my button's up, over, and down frames. This works great except when I click, i'll need to click and hold for my animation to get past the first frame.
View 1 RepliesI have a button that when clicked starts a movie clip(a box enlarges from very tiny to large).That works fine. How do I make the same button reverse the movie clip when clicked again?
View 13 RepliesI have created a delete button and have linked it to a text box along with another button that displays "1" in the text box when clicked. I need a button that will then delete this "1" out of the text box when clicked.
View 2 RepliesAny tutorials on adding right and wrong sounds to a game? Im making this game where on a wrong answer there is a wrong sound and on a right answer a right sound! How to get the code to do this!
View 1 RepliesI have a grid with 12 movieclip buttons. When a button is pushed a answer is displayed and on the answer frame, there's a button "click for more information".
That button points to information in a frame within the mc button. However, when I test it all the buttons on the root timeline appear on top of this information, covering it up.
Also, when you move the mouse while in this "further info" area, it disappears
Basically I have a movieclip that when I roll_over it reveals two buttons that I then need to use to remove movieclips that are on the same stage as the original movie clip. So the button inside the movieclip needs to remove a different movieclip that is also up on level.I've tried this many different ways, none seem to work. The error that I keep getting is undefined property of "grey_mc." And yes I made sure it has an instance name of grey_mc on the main stage. my code looks like:
Code:
removeButton.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(event:MouseEvent) {
[code].....
Baisically I've created a button using symbol and I want the button to move a movie clip up the y axis by 4 every time it is clicked (move the movie.) I really don't know how to do this. This is what I currently have but its not ActionScript:
[Code]...
I am having a problem with a little trivia game that I am in the process of developing. What I am trying to do is have flash fade out one wrong answer at a time. All questions are being pulled from an XML file that has hundreds of questions. Keep in mind that the correct answer will not always be in the same spot. I also have it so that one question fades into another after a specific time. Here is the code
Code:
System.useCodepage = true;
//
function loadXML(loaded) {[code].....
I have several Buttons that are inside movie clip instances (so I can do onClip Event and move them around), how do I make it so when the button is clicked; it disappears.
View 2 RepliesIn my project are pages of text with each word having a button that when pressed will display a movieclip presentation about that word (its pronounciation and spelling etc..). In the project I am working on now I have over 450 unique presentations of words to deal with. I don't want to have all of these hundreds of movie clips on the stage and tell them one at a time to stop and rewind and then have one play each time a word button is pressed. That seems to be very inefficient to me.
add movieclips to the stage using addChild(movieclipname) and remove them using removeChild(movieclipname) but there is a problem. I have hundreds of unique movieclips and I don't want to have to manage hundreds of variables containing the indivudual movieclip instancess. It is a real pain having to figure out what instance is still on the stage before i delete it.In Adobe Director all I have to do is this:
What i want to happen seems quite simple yet i keep getting the error "access of undefined property" when what i'm trying to remove is in fact defined in the same class but it obviously cannot gain access to it.
I want to remove a MovieClip from the stage once a button has been clicked.The MovieClip is created in the same class as my button function i created. The button works fine but whatever i try to put within the function to remove the MovieClip cause the error i mentioned at the start.
I want a movie clip to delete a movie clip when one rollsover the other.
View 16 RepliesI am having trouble loading an image where i really want. Here is the code that i am using:
[Code]...
The CELL movie clip it has 3 more movieclips inside, i want to load the image in a particular one inside the CELL movie clip... the previous code works, but seams that it is loading in the cell movie clip... The other 3 movieclips are A, B, C... i want to load the image in cell.c
do to the lack of good on Kongregate, I have come here =D
if(_root.row2.block1._x == _root.row1.block1._x)
{
_root.row2.block1.removeMovieClip();
[code]....
okay, in my game, at the end of a level, the player runs into a finish movieclip, the problem is, when the player goes to the next frame, it brings the finish movie clip to the middle of the stage, i tried to remove the movieclip but it dident work, also i have the finish movieclip in the next frame, just in a different place
View 1 RepliesI want to press any keyboard key to delete movie clip - how do I go about it? This is what I have for mouse click
bubble_mc.addEventListener(MouseEvent.CLICK,rotateBall);
trace("ball working");
function rotateBall(e:MouseEvent):void { ball_mc.rotation+=5;}
addEventListener(Event.ENTER_FRAME, ballMove);
I need to know how to the lead a empty movieclip that i made with ASi already tried deletemovieclip is there any other way
View 6 Repliesin shared object Delete specific Items i her store MovieClip int shared object then show Movie Clips in the posistion x and y wit text field which hold the string value the problem is i cant delete specific movie clip from shared object this code
seevoo._visible = false;
user_co = SharedObject.getLocal("coment");
i=1;
///////////////// if condition to out if the value of shared object undefiend ///////////////
[code]....
I'm trying to get my movie clip to ease into position with the below AS and then delete the actions, but it's not working. What am I doing wrong?
[Code]...
Hi, I'm making a simple target shooting game in Flash CS3, and need to know how to make it so when you click on a movie clip, it adds 1 to a dynamic text box reading 00.
View 1 Replies