ActionScript 2.0 :: UnloadMovieNum,removes External Swf But Still Active?
Jan 3, 2007
So this is my beef, I use loadMovieNum("flat/1st.swf", 20); , then in frame 50, I added unloadMovieNum(20); . The external 1st.swf disappears, but where my buttons where in 1st.swf, are still active, even though you can't see them. So how do I completely remove an external swf, without being active, even though u can't see it?
I'm new here, so let's introduce myself at first: My name is Bram, I live in Holland. I am 16 years old and currently working on a little project for school. In the project you can click on stuff, and that loads an external SWF. Here is how I did that:
[Code]...
Okay. That all works, but now I want to make a button that removes the external SWF (and brings you back to the original SWF). how to do that? If you need my FLA, tell me; i'll upload it. PS: I did use search, but couldn't find anything.
I am trying to load a swf file which contains xml based image gallery on 25th frame of the timeline inside flash professional cs5.5 using actionscript 3. while doing so i'm getting this error "SecurityError: Error #2000: No active security context". Below is the as3 code:
im working on my own site im lost though i copyed and pasted so much but i cant seem to figer somthing out.i have a members sys sitting on a few frames every thing works. but the profile button, i have a total of 11 buttons that are working. i coppyed them put them all on 1 frame with there own instances that contain 3 frames?the first frame is the not active frame the 2ed is the active and 3ed is blank so it wont show. so my login code at this point is
I have a window component on my main timeline that gets called up on several instances. When the popup window appears, everything looks fine, except that the user can still click on links that are now behind the actual popup window itself. My question is how do I keep those buttons from being active while the popup window is active?
I want it to remove everyone that it hits, but it only removes the first one that hits. I am sure the answer is simple, but i am slow. Here is the code:
ActionScript Code: function removeSpawn(){ for(j=0;j<lvl1A;j++){
I'm working on a simple Flash game for school. In one level, multiple enemies spawn and the player is supposed to shoot them. I used removeChild() to get rid of the enemy that got shot, but when I click (hit) an enemy, everything on my stage gets removed; it goes completely blank.The function to populate my stage with enemies is the following:
private function Game2():void{ for (var i:uint=0; i<50; i++) { var man:MovieClip = new man_mc();
My problem is as follows, I can create as many movie clips from on function as I wish, but as soon as I try and do two different functions - it messes up for some reason :S
Basically with my game, it is required for me to create these movieclips every so often. Because of this I created a re-usable function to do the creating:
ActionScript Code: function create_note1() { note1num++;
[Code].....
As you can see there are four different functions, and there are only 4 different movieclips that are added to the stage.
My problem is like this: I can call a single note (like create_note1();) as many times as I want without any problems, but If I try create_note1(); and create_note2(); It will remove note 1 and keep only note 2 on the screen. The problem really stumps me though, because if I called something like this: create_note1();, create_note2();, create_note4(); I may have notes 1 & 4 going down the screen and note 2 will have disappeared.
im using flash text engine to display text and i noticed it removes all whitespces at the end of a string.
e.g if i set a textblock text "a random line ", it is displayed as "a random line" but if i add a . at the end of the spaces it is displayed correctly "a random line ."
whats causing it...and how to display them correctly escape() and unescape wont change anything
I was wondering if you remove a child with "removeChild" if it removes everything what was in the movieClip.I doesn't remove listeners automatically (right?). But does it remove bitmapData (from the memory) for example? Because I don't want to remove all bitmaps with the Dispose.Does it help if I initialize the garbage collector: "System.gc();".It does help with removing listeners automatically, but what about other things?On the adobe website about the GC.But it says:For the Flash Player debugger version and AIR applications only.But does this mean that if I play the SWF outside of Flash this GC doesn't do anything?
I am loading in a swf into my file, via the loader class. When I remove this child .. does all the swf remain in the memory, or is it discarded? I want to remove it entirely ..
Code: var myLoader:Loader = new Loader(); myLoader.load("thisMovie.swf"); addChild(myLoader);[code]....
I'm trying to create a button that, when first clicked, will add a MC to the stage. Then, on the second and subsequent clicks will remove the existing MC and replace it with a new one. The code I'm using is:
public function doAddItem(itemConcepto:int):void{ modalCfd = new modalCFDItems(); modalCfd.addEventListener(Event.CLOSE, closeHandler); modalCfd.addEventListener("addItemResult", addItem_resultHandler); modalCfd.addEventListener("addItemResize", addItemResize_resultHandler); [Code] ..... Does that do it, or do I have to removeEventListener explicitly?
I have a set of 5 TextFields that a user enters info into. Each has the same TextFormat applied. If the focus is set by clicking with the mouse, the TextFormat is applied and all is well. If the focus is set by tabbing, the TextFormat is not applied and a default style for the font is seen. Here's my code:
Code: var input1:TextField = new TextField(); addChild(input1)[code]...................
ok so i have this function basically it adds text to a given position in a textfield. it adds the text in the correct position but the problem is that it is screwing with the formatting i've applied to the textfield.
here is my code:
ActionScript Code: txt.text = "hello world"; // adds text at the character index specified and returns the new string. function addText(txt:TextField, txtToAdd:String, index:Number):String{
[Code].....
i also have a function which deletes but that isn't important right now. i was trying to avoid using html text but at this point i'd willing to give virtually anything a try.
When you make a simple game that maybe has a few different 'screens' like start, help, and high score, and a few levels, and you don't wish to load from external swf's. What is the best practice for making these games as far as the timeline?To just have ONE frame that add's and removes child movieclips from the stage?
I'm wondering if there is a better way to approach this than my current solution...
I have a list of items, I then retrieve another list of items. I need to compare the two lists and come up with a list of items that are existing (for update), a list that are not existing in the new list (for removal) and a list of items that are not existing in the old list (for adding).
Here is what I'm doing now - basically creating a lookup object for testing if an item exists.
I am new to AS3 and only recently have been able to understand the display list.I am trying to run this code in my file.I made two movie clips in my library. Gave them class name as "One" and "Two"Now, this is the code that I run:
Code: var one:One = new One(); var two:Two = new Two();
I have a textField that I'm populating dynamically through loadVariables. The text that is being loaded dynamically is HTML with an <img> tag. Once I autoSize the texField the image is removed.
I have a removeChild and null question. I know removeChild removes my object from the stage but stays in memory until I call null on it. My question is, if I set the object to null, do I have to removeChild it at all? For example, I have a movieclip where I addChild lots of objects to it. So If I want to completely remove all traces of said movieclip and all its children, can I just set movieClip = null, or do I have to removeChild all its children and the movieclip itself beforehand.
I'm getting rather disgruntled with Flash's contradictory statements. I just need someone to clarify one thing for me; is it true that if you apply removeMovieClip to a movieClip instance, it also removes all of its duplicate instances? When I try to apply this principle, for some bizarre reason, it only just deletes the original instance and NOT any of its duplicates:
I have a page with several input boxes and several instances of movie clips on the stage which have been added with addChild, what i want to do is make a reset buttun that clears all the input boxe and removes the movieClips so that the page looks as it did when it was first loaded but the help files are usless with a specific request like this.
-First ones instance name is grp_cb -Second ones instance name is altGrp_cb
They load data from XML.When they first load their text format are as I coded.But after I change the first one second ones text format disappears..Any idea, how can I have my comboBox text format back????
Im creating a game. When the current game has finished, I thinking to do this:
removeChild(game) game = null then game = new Game()
Doing this way, it automatically removes the games object instances? It automatically removes the games object instances events? That would be an easy way to restart the game, if yes for both questions.
Can I do like that, or I have to remove all objects and events manually?
Because of screen size, I must ensure we're only displaying necessary data to the user.I have a drop down box that contains only 5 items and I would like that when an item is selected, it doesn't appear in the drop down box (since technically it's showing twice, once at the top as the selected item and once in the list). how I would achieve this? I tried using a custom CellRender and overriding the "set selected" function to call this.visible = false if selected is true, but that simply hides the item but does not remove it from the layout of the drop down list.
In my application, I have a chart that I want to display in a TitleWindow when clicked on.
var win:TitleWindow = PopUpManager.createPopUp(this, TitleWindow, false) as TitleWindow; win.addChild(myChart); PopUpManager.bringToFront(win);
It does indeed place the chart in the titlewindow that shows up, but it removes the original chart from the parent. Then, when the titlewindow is closed, my chart is simply gone. I can't figure out how to clone the chart -- all the methods I've tried failed
Solution:
public var barChart:BarChart; public function onClick(e:Object):void {