Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash


ActionScript 3.0 :: Remove Instance Of Movieclip With Click?

I am using a loop to add 10 shapes to the stage, then i just want to click on one at a time, in any random order and make it alpha 0, im using this code.. it gets rid of some shapes but not all. i dont get it?

var shape:MovieClip;
for (var i:Number = 0; i < 10; i++)


View 3 Replies (Posted: February 28th, 2010)

Sponsored Links:

Related Forum Messages For Flash category:
ActionScript 3.0 :: Remove The EventListener After Click On A MovieClip?
I am trying to remove the EventListener after I click on a MovieClip so that when I rollOut of the clip the movie will stay on the "clicked" frame rather than move back to the rollOut frame.


Posted: Sep 15, 2009 8:43 AM

View 1 Replies!   View Related
Flash :: Getting Instance Of Button/movieclip On It's Click's Handler?
It used to happen in AS2.0 as follows :

my_Mc.onPress = function()
trace( this)
//output :
[my_Mc Movieclip]


Posted: Nov 25 11 at 14:21

View 2 Replies!   View Related
ActionScript 3.0 :: Click On A MC (displayed By Another Click) To Remove It?
I have coded it in a way that once the user clicks on one of the images, another movie clip is shown (from the library).This is okay, but I would also like that once the user clicks on the new Movie Clip this disappears.I guess it is necessary to know if the new movie clip is on the scene or not, since it doesn't show up until the user clicks on another already shown image. I guess this is important since we need to declare the variable and the way we do it depends on its being on the scene or not.So I have tried something like this:

if (Boolean(this.getChildByName('NewMC')))


Posted: April 23rd, 2012

View 2 Replies!   View Related
ActionScript 2.0 :: Drag And Remove Movieclip - Cant Remove Duplicate Euro's From The Stage?
I'm making a game for children where they have to pay money by dragging it on a square. It al works wel only when i pick the first coin of one euro without going over the coin of 2 euro and then pick up a 2 euro coin the one euro disappears. after then it all works fine.i cant remove my duplicate euro's from the stage when i clic on pay here is my code for the euro's the euro's are in a emty movieclip


Posted: December 20th, 2009

View 2 Replies!   View Related
ActionScript 3.0 :: Remove Action From One Instance?
Say I create a movieclip which acts like a button, meaning that it has an over state, out state etc. I then create five instance of this movieclip and give each one an instance name e.g. b1, b2, b3, b4 and b5. Is there anyway of removing the states actions of say b1 without having to create a new button just for this? I was hoping there was something like b1.turnOffEffects = true (In my dreams, lol).

Posted: Dec 15, 2010 5:16 PM

View 1 Replies!   View Related
ActionScript 3.0 :: Remove Child And Add New Instance Of It?
I have 10 thumbnails loaded using a for loop through XML. Each thumbnail is clickable and have an event listener attached. [code]...

My problem is that the images are stacking on top of each other, and never being removed.

Ideally I what to removeChild(); to the previous child added when the showPicture function runs. But I have no idea how to achieve this.

Posted: 08-11-2009, 09:14 PM

View 2 Replies!   View Related
ActionScript 3.0 :: How To Remove Object Instance
removing object instance from memory.I have created a class that move objects(movie clip) on stage. and on fram 1 i created 100 instances of this class using loop. now when user click on movie clip it should be remove from stage as well as from memory. using removeChild() it is removed from stage but it is not removed from memory. for testing i use initialy only one instance to check my code and when click it is removed from stage but not from memory. here is the code

// this code is on frame 1
function move()


i used delete and assigning null and GC but nothing works. any one who knows how to remove the object instance from memory I applied every thing but object instance is still in memory (because there is a trace in fall class which continuously running and i guess the object still exist in memory)

Posted: 07-17-2010, 11:21 AM

View 1 Replies!   View Related
ActionScript 3.0 :: Remove Instance Of Loaded SWF From Memory?
I am loading an SWF file into another parent SWF. I remove the loaded SWF using the unloadAndStop() method and set the loader to null. But the instance of the loaded SWF still remains there in the memory.

Posted: Mar 4, 2010 3:21 AM

View 2 Replies!   View Related
Flash :: Remove Instance Of Video When Finished?
I did a file/import/video and pointed to a video on my server and this is all on the first frame. On my aa layer I have the following[code]...

As you can see, when the video finishes, it hops to frame 2 and continues to the website. What started happening on a few occasions, is the timeline would randomly jump back to frame 2 for no apparent reason. I'm assuming it's because I didn't remove the instance of the video, or something along those lines? This whole issue on;y started when I introduced the video.

Posted: Mar 19 11 at 19:20

View 1 Replies!   View Related
ActionScript 2.0 :: Grab The Instance Name Of Something On Stage, Set It To A Variable Then Remove It?
im trying to grab the instance name of something on stage, set it to a variable then remove it.

iv tried:

Actionscript Code:
var something = object1something.removeMovieClip();

that works. problem is im setting variables at runtime depending on a user click.tried this too..

Actionscript Code:
var myvar;object1.onRelease = function() {myvar = this._name;}

tracing this out reveals that it is actually _level0.object1.also tried adding the string "_level0." + object1. still dosen' work.what im trying to do is click on objects. store there instance names into an array then remove them all when i do something else. such as press space.

Posted: 05-17-2011, 03:39 PM

View 1 Replies!   View Related
Actionscript 3 :: Get An Event For Close Or Remove A Instance In Flash?
package com.test{
import flash.display.Sprite;
import flash.display.MovieClip;


Posted: Dec 5 09 at 5:20

View 1 Replies!   View Related
ActionScript 3.0 :: Get Instance Name On Click?
I am loading my movie clips dynamically. Is there any way I can get the instance name of a movie clip when I click on it with a mouse?

Posted: 12-21-2009, 01:48 AM

View 2 Replies!   View Related
ActionScript 2.0 :: CS3 Movieclip Button - Click To Play, Click To Stop?
I am building a flash interface and I would like a menu where it is hidden to begin with (just a tab). You click the tab to expand it, and click again to collapse it. I've made a movieclip with animation of the menu opening up and closing, but I can't seem to work out how I'd go about making the movieclip open and close properly.

Posted: 06-21-2010, 11:54 AM

View 4 Replies!   View Related
ActionScript 3.0 :: Remove An SWF On Click?
I have a few buttons, that when clicked load in an swf, however I'm having trouble removing the swf when a different button is click (don't what swf's loaded on top of each other)[code]...

Posted: 10-20-2009, 02:50 AM

View 8 Replies!   View Related
ActionScript 3.0 :: Global Timer Control - Remove Instance Refs From Array?
I'm writing a video game and I have used timers all over the place to make everything go. Now I want to be able to pause the game, completely. Meaning, I need to stop and start all timer instances at once, or globally. So I created a Timer subclass called CustomTimer, put some statics in there, came up with the attached code. Now my problem is that I'm pretty sure I've created a memory leak, in that the instances array will just grow and wont allow or gc. So, my question is, is there an "onDestroy()" method or somesuch, that I can override, and use that moment to remove instance refs from the instances array? Or, is there a smarter way to do this? an application object with a pause method perhaps?

Posted: Sep 15, 2008 1:25 PM

View 11 Replies!   View Related
ActionScript 3.0 :: Set Instance Name To Variable On Click
I am attempting to set a movie clip's instance name to a string variable when clicked. For example: on my stage I have many mc instances named section101, section102, etc. when I click on any specific one I'd like to get the instance name (i.e. "section101") set to a string variable. So far I have:

var sectionfocus:String = new String;
addEventListener (MouseEvent.MOUSE_DOWN , setfocus );addEventListener (MouseEvent.MOUSE_UP , tracefocus );


Posted: Jan 17, 2011 1:40 PM

View 5 Replies!   View Related
ActionScript 2.0 :: Add Click Sound To Mc Instance?
The buttons of my menus are mc with instance names. I want to play a click sound on each of them on rollover.

Posted: January 17th, 2007

View 8 Replies!   View Related
Flex :: Remove Right Click Menu In Swf?
i made swf using flash 9 player if i right click swf it will shows menu like zoom in , zoom out, etc option . but i saw this site url [URL] animation swf like elephant.swf, bird.swf... not show anything .only shows reddraw option How can i do like this ?

Posted: May 25 09 at 7:16

View 6 Replies!   View Related
ActionScript 3.0 :: Click On Button And Display Instance Name?
I've been learning AS3 lately and am trying to put together an interactive map. I've brought in some map data and converted it to individual movie clips, each of which has an instance name that I'd like displayed when each clip is clicked on. ideally an informational box would appear with the name of the clip and some other info that I've specified.

What do I need to script so that if one clicks on a movie clip, the instance name is displayed?

Posted: 06-28-2010, 05:44 PM

View 1 Replies!   View Related
CS3 :: Remove Right-click Menu Item From Template?
I'm currently using a flash template for my online portfolio, but I've noticed that if you right click anywhere, it brings up the standard flash right-click menu with the following items:

Global Settings
About Flash Player 10

But directly above is a separate menu item that says "Made by JWD" and that takes you to a different website if you click it. I have the .fla file for the gallery - can I remove this menu item?

Posted: 02-06-2011, 02:12 PM

View 1 Replies!   View Related
ActionScript 1/2 :: Form Fields On Click Remove?
I have text input fields that have default text. When a user click on the field, the text diseappears... the original text remains gone.

My question is how can I make the original text reappears... If the user clicks on the clear button or has not entered anything in... it would revert back to what was orignially there .


Posted: May 30, 2010 12:23 PM

View 1 Replies!   View Related
Flash - Remove The Right Click Menu In Swf File?
how to remove the right click menu in swf file ?

Posted: Sep 8 10 at 21:01

View 1 Replies!   View Related
ActionScript 3.0 :: Remove Mc From Stage When Click To Other Pages?
Trying to remove mc from stage when click to other pages. [code]...

how do i make the images_banner.swf go away when you leave the index page and NOT return as you move to the other pages?

Posted: 09-07-2009, 10:05 PM

View 9 Replies!   View Related
Copyright 2005-08, All rights reserved