I have created a moviclip with the following [code]...
Then after pressing a button I want to delete the movieclips. I have tried[code]...
but neither actually work. The only way I have found is by doing _root[1] etc but that takes too long and it wouldn't really work because the number of movieclips created is unlimited.
I have a problem, maybe simple, with my full Flash website and a Google Map I inserted on it thanks to the Google Map API.On the frame of the scenario I want that the map appears, I inputed the below code on the AS3 actions panel (F9).
But after the map is loaded,when I change the frame by clicking on button to go to an another section of the scenario, the map stay visible...[code]...
I'm doing a website in flash and I'm creating sprtite to put image in it (child) when we clic on a link. But when we clic on another link, the child have to be removed but it doesn't. It doesn't reach theirselves (the child), so it can't be removed.em?This is my code:
Code: function sectIllustrations(event:Event) { contenu_mc.gotoAndStop("illustrations");
The problem is that this code is in a frame and when I leave the frame the MovieClips I have created will still be there. I think this is because I'm creating a global MovieClip right? If so then is there a way to declare the MovieClips as local? [code]...
I used code to get alot of the same Movieclip to the stage every 3 seconds:[code]Then i wanna remove all those Moviclips (so that i can restart the game) but everything i've tried has yet to be a success.[code]
How can I remove a playfield that I have created with attachmovie? The game that I make is minesweeper, so when I click on a bomb the playfield must dissapear! I thought is was like the code below but it doesn't work!
Code: for (i=0; i<wortel; i++) { this["square_mc"+i].removeMovieClip(); }
how do I completely remove a movieclip that is created as a new class.I have an event listener that does a removeChild like this
e.target.parent.removeChild(e.target);
is this enough or do I have to 'null' the object? I can't just do 'e.target = null' because the property is read only. Will the internal garbage collection do the rest for me if I have no references somewhere else?
my little application contain a combobox and a MC "filmstrip" in my _root. the combobox work with an xml file containing links to other xml files. Inside my MC "filmstrip" i have a script loading with a for loop the xml file selected in the combobox on the _root . In this loop i createEmptyMovieClip an attachMovies with the data of the xml selected. evrything works exept that evrytime i change my selection in the combobox it load the data on top of the previous load. I would like to delete the previous load before load the new one.. On my scene 1st frame i have only a code for scroll the movieclip filmstrip but i think is not nescessary that i show it. here is the code inside the MC fimlstrip (sorry but i put all the code). i attach an example aswell
var link1:Array = new Array(); var url:String; var theUrl:String; var whoOn:Number;
Is there a way to remove all the text fields which was created? I used instance.removeTextField() but still I see some text boxes. In my fla when I go back and forth between frames I still see there are text boxes by the text cursor appearance. I'm having trouble because the buttons can not be clicked when the text fields are there. I'm using several of these in different frames.
Im currently creating textfields in a for loop - though in this example only creating one TextField. My questions is, how do I remove the TextField child in another function? What im basically doing is, create a Textfield, addchild to a container - > then the container into another position - > then removechild and another text in the container. I've tried something like:
I'm making a game in flash and am using arrays to dynamically create items and place them inventory. LongSword is a MovieClip. I place the movieclip in the array like so:
i followed this tutorial: http:[url]....and all has work out great however, then i go onto anouther frame how do i remove all movieclips from the created game arrays?
[code]Then in another function, where I handle a rollover events for the Main Menu, where I want to remove the movieclip "target_mc" after a certain rollOut event [code]doesn't work.Now, I realise this is probably cause it's not in scope, but how would I remove a movieclip that is dynamically created in another function?
I am trying to delete a bunch of different things from the stage all at once.I have 3 dynamically created text fields and 2 dynamically created movie clips.I added them to the stage through my document class buy creating them, editing their properties and then...
1) Is it better to pre=render things say in photoshop or have flash render them?
2) if I have a field of stars that drift along; is it better to create that Star Field in photoshop as a single picture (say a .png) or to create a star in my library and add it to a movie clip and then have that drift along?
Lets say I have a blur effect on my stars and have an equivalent on the photoshop.
3) I have heard (and experienced) adding effects like blur takes a fair amount of CPU and memory so was wondering if I created the effect in photoshop and then imported the 'blurred' object into my flash if I could cut down on system resources?
When an instance variable is constructed by a constructor method, why do you need to refer to the current instance variable being created when its the only one being created? I understand assigning an expression to it but why name it "this." when it is the only object that the constructor is building? Does it have some hing to do with being able to naming that object in the Local Variable? In other words am I creating a generic object that will be named in another class?
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
In flash AS3 Do I need remove childs, if I remove the parent itseft? If I remove childs first, then remove the parent object afterall OR If I just remove parent object Will flash take same memory?
Just wondered if I remove a parent movieclip and then set it to null, will it remove all the child movieclips within it from the Display list and also from memory, or do I need to iterate through the parent movieclip removing all its children before removing the parent?
I'm dynamically creating movieclips with dynamically created movieclips inside them and am having trouble with targeting them.Below is a simplified example of what I'm trying to achieve, in the real file there are a lot more movieclips and I'm creating and naming them with a for loop.
This one is just one Sprite created inside another sprite. I can target the top level sprite named "testname". However when i try target the nested MC it throws an error.The bottom couple of traces are just test MCs I've made to make sure i got the syntax right, on targeting nested movieclips.
PHP Code:
var holder:Sprite = new test1();holder.name = "testname";this.addChild(holder);var holder2:Sprite = new test2();holder2.name = "testname2";holder.addChild(holder2);trace(getChildByName("testname").x); //this one traces finetrace(getChildByName("testname").getChildByName("testname2").x);//this throws up an errortrace(testclip1.x);trace(testclip1.testclip2.x);
I have 2 sprite which I create near the beginning of my video application. A bg and screenOverlay. On the first load of the file all is good but when I navigate away and then return to the swf my bg and screenOverlay do not get added to the displayList. I have a example up here at [url]...