ActionScript 3.0 :: RemoveChild - Unable To Unload SWF

Jan 20, 2009

I have a website that I am loading two external swf into my main movie... using addChild ... I am successfully removing "gallery.swf" addChild(loader2) when I select about, contact, and or my artects button(s) however I am unable to unload "artects.swf" addChild(loaderc) when I select about or contact button(s) but it does get removed when I select portfolio button..

Here is the script:
//var fade:Tween;
//makes hand cursor enabled for buttons
aboutBtn.buttonMode=true;
aboutBtn.useHandCursor=true;
portBtn.buttonMode=true;
portBtn.useHandCursor=true;
[Code] .....

View 5 Replies


Similar Posts:


ActionScript 3.0 :: RemoveChild() Not Working - Unable To Unload File

Jul 2, 2011

i tryied all 3 methods

removeChild()
removeChildAt()
unloadAndStop();

but still m unable to unload file. Actually m loading a swf file which contains a video. The other video gets loaded but its sound continues. this is the code what i had tried:

[Code]....

View 1 Replies

ActionScript 3.0 :: Unloading Jpeg With Unload() Or RemoveChild()

Apr 30, 2010

I'm working on a project that is like a jigsaw puzzle.  The use can select from a few different puzzles that have different piece arrangements.  Once the puzzle swf file is loaded, the user can select images from a gallery to place in the pieces to make a custom puzzle where the puzzle piece movie clip that was selected masks the image that was selected.
 
So the puzzle swf loads fine and I add it to the stage with:
 
addChild(puzzle);
 
The jpegs also load and get masked correctly.  When I add the jpeg image, I add it to the puzzle object and the addChild looks like this:
 
puzzle.addChild(imageJPEGLoader);
imageJPEGLoader.load(new URLRequest(imageJPEGName));
imageJPEGLoader.x = 0;
imageJPEGLoader.y = 0;

[Code].....

I think I'm obviously not understanding the parent/child relationship fully.  I thought if imageJPEGLoader was inside puzzle, that the dot syntax would get me to the object I needed.  Everything works fine in this file except for putting a new jpeg on a piece that already had a jpeg masked.

View 1 Replies

ActionScript 3.0 :: Unable To RemoveChild?

Feb 11, 2009

You have two arrays, both containing a different set of movieclips. You drag a movieclip form one array, in to one movieclip of the other array. You can do that as many times as you like. So in fact, the movieclips in the second array are all droptargets. The thing is, I have one erase button which should erase all the movieclips from the first array only when they are dropped on the droptargets from the second array. In other words.. how do I remove the content of the droptargets without removing all the droptargets as well?

View 0 Replies

ActionScript 3.0 :: Unable To AddChild() And RemoveChild()?

Dec 31, 2010

I have the following code:
 
import fl.controls.Slider;
import fl.events.SliderEvent;
import flash.events.MouseEvent;

[code].....

View 25 Replies

ActionScript 3.0 :: Unable To RemoveChild From Stage

Jul 25, 2011

I have several objects created at frame 2 of my fla file, like:
Code:
stop();
var rotatorek:Rotator = new Rotator();
addChild(rotatorek);
var rpm:engine = new engine();
addChild(rpm);
etc...

After endGame is changed to true within one of my .as files, I got this error:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:isplayObjectContainer/removeChild()
at Rotator_fla::MainTimeline/ruszMaszyna()[Rotator_fla.MainTimeline::frame2:94]
Frame 94 is first removeChild(rotatorek).

Why I can't remove all those children? I need to go to frame 1 without any instanced objects and cleared listeners.

View 3 Replies

Actionscript 3 :: Unable To Unload Content In XML Gallery

Mar 26, 2010

I have an XML gallery and I want in the next button function to "unload" all content and load new XML file.[code]...

View 1 Replies

ActionScript 2.0 :: Unable To Unload Loaded Movie (Slideshow)

Aug 7, 2009

I am trying to unload a movie I loaded like this
PHP Code:
loadMovie("slideshow-endsample.swf",movieContainer);

But
PHP Code:
unloadMovie("slideshow-endsample.swf");
Doesnt work?

View 4 Replies

ActionScript 3.0 :: Unable To Unload Content Loaded By Loader Class

Dec 16, 2008

I am unable to unload content loaded by loader class.

View 4 Replies

Actionscript 3 :: Error #1006 RemoveChild Is Not A Function. Timer Delay RemoveChild

Mar 29, 2010

I'm trying to build a conditional statement that will addChild and removeChild at different Timer Delays. Before I go any further, I thought, I should mention that I'm usinig TweenMax to ease the alpha of ease Child from 1 to 0 and back during the process to imitate a fade-in/out.

I'm getting issue with only one line - inside a conditional statement.It's running "OK". The movie runs as I want it, but the remove/addChild transitions are not at the speed I want it at. I am getting an error message in the output, but other than that, the movie runs fine.

stop();
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;

[code]....

View 2 Replies

ActionScript 2.0 :: Unload Movie Stuff - Current Swf To Unload And The New One To Load Only After A Transition Occurs

Jun 16, 2003

I want the current swf to unload and the new one to load only after a transition occurs. Is there a more efficient way to do this than if. switch()?

View 2 Replies

ActionScript 3.0 :: Unload The Previous Loaded .swf And Load The New .swf Without Having A Separate Button To Unload

Aug 9, 2008

I am working on a school project that requires me to load external .swf or .jpg files. I currently have all of the buttons working and are loading an external .swf file on to the screen. The problem I am having is that when I go from one button to the next the loaded .swf stays on the screen and the next .swf gets loaded on top of it. I know that I need to unload the file but I am not sure where to put the code for the unload or what code exactly to use. I would like when the button is pressed to unload the previous loaded .swf and load the new .swf without having a separate button to unload.

[Code]...

View 3 Replies

ActionScript 3.0 :: Unload Not Unloading - Unload An External SWF On _root To Load A New One Instead

Jul 23, 2009

I'm trying to unload an external SWF on _root to load a new one instead. I've tried (almost) everything but can't figure it out... I get this error : "Error #1010: A term is undefined and has no properties."

[Code]....

View 3 Replies

ActionScript 3.0 :: RemoveChild(); RemoveChild()?

Feb 21, 2009

I cant do 2 removeChild(); 's beneath eachotherSo their always will remain 1 child how can i delete that one?

addChild
removehild does work
removeChild

[code]......

View 2 Replies

Professional :: Warning Unable To Load SWC And Unable To Test Movie Afterwards (CS5.5 Also In CS5)

Oct 13, 2011

I work with Flash Pro allmost 11 hours per day and every while i get a error  which messes up everything. Approximetly i get this after about 2-3 hours withevery project.After i get this error there is no chance to test movies afterwards.I see a fast flash of the loader window but it dissapears so fast i cant even really see if it is loader.

View 1 Replies

ActionScript 2.0 :: FLV Playback - Xml - Error "unable To Make Connection With Server Or Unable To Find Flv On Server"

Jul 16, 2011

I have a site that plays either .mp3 or .flv files depending on what is selected from the menu. Menu loads in from xml. I get "unable to make connection with server or unable to find flv on server" when I try to play the video. But the video and audio files are all in the same directory and the mp3 files play fine. I think I'm having a problem with the setMedia command. Here's the code that loads the video and audio files.

[Code]...

View 9 Replies

NOT To Use RemoveChild?

Feb 9, 2009

I've created a MovieClip that opens other MovieClips. These MovieClips are galleries with example of my art and such. Within these gallery MovieClips there is a "close" button, which is actually another MovieClip.

the problem

Everything works except that when I open one gallery, then close it, then open it a second time, the "close" button refuses to work.

I thought this was do to my incorrect use of removeChild, but now I don't know.

This is made slightly tougher by the fact that closing the gallery involves playing a closing animation, so first I put the removeChild on the last frame of the gallery MovieClip. That had the same result so then I tried it this way.[code]...

View 5 Replies

ActionScript 3.0 :: RemoveChild Not Doing Anything?

Aug 31, 2010

I'm using an onEnterFrame handler to load an external swf file which works fine at frame 190..

var fl_Loader:Loader;addEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler);
function fl_EnterFrameHandler(event:Event):void{  fl_Loader = new Loader();  fl_Loader.load(new

[code].....

View 2 Replies

ActionScript 3.0 :: Only RemoveChild If There Is One

Dec 11, 2009

I can't upload the file here because it is too big but I will post the code and a tutorial link plus the problem I've been having.

What the code does is, it gets an image and places it on your stage. This image you place there is reduced in size and when you click on it, it creates a magnifying glass effect.

It works like a charm and looks very cool but the problem is that when I want to go to another page of my presentation, the image stays there, this is because of the addChild function I'm guessing.

Once again, no problem, I just added this to the AS code of every page : removeChild.

You've probably already guessed it, this only works when the child has already been placed. If I go to my intro page and I place the code there it will give me an error since the intro comes before the gallery code. If I don't put the code there it only works if the gallery has already been loaded and I click on pages that come after the gallery.

So what I actually need is code that detects if the child has been loaded or not and if it has, it should be removed, if not, don't do anything.

U can find all the code underneath, it's quite a lot.

This is the link to the tutorial : [URL]

ActionScript Code:
ActionScript 3 Effect by Barbara Kaskosz.
[url]www.flashandmath.com[/url]
Last modified: September 30, 2008.

[Code].....

View 8 Replies

ActionScript 3.0 :: Add Then RemoveChild?

Oct 13, 2011

I have been struggling all day with adding a child then removing it. this is my first try at AS3 and i have no problem doing this in AS2.

ActionScript Code:
var nut:Shape = new Shape();
nut.graphics.beginFill(0x0000FF);
nut.graphics.drawCircle(20, 20, 20);
nut.x=200;

[Code]...

View 4 Replies

IDE :: RemoveChild From An Array?

May 24, 2009

I'm trying to figure out why I can't remove the child of the meteors immediately after they have hit the planet or a building so that it would only damage the building once. When I try to just 'removeChild(meteorArray[k])' AS says that the 'object must be a child of the caller'. I'm not sure what that means, but I thought that the meteor was the child of the main document class.

View 2 Replies

ActionScript 3.0 :: How NOT To Use RemoveChild

Feb 9, 2009

I've created a MovieClip that opens other MovieClips. These MovieClips are galleries with example of my art and such. Within these gallery MovieClips there is a "close" button, which is actually another MovieClip.Everything works except that when I open one gallery, then close it, then open it a second time, the "close" button refuses to work.I thought this was do to my incorrect use of removeChild, but now I don't know.This is made slightly tougher by the fact that closing the gallery involves playing a closing animation, so first I put the removeChild on the last frame of the gallery MovieClip.[code]

View 4 Replies

RemoveChild Function Is Not Working

Mar 14, 2009

I'm working on a pretty simple flash application which basically plays a music clip downloaded from a web URL, and makes a stick man dance. I have it all working fine, however, I've used the addChild function on the start button to add the mc onto the stage, however, when I applied the removeChild function to take it off again, I get an error telling me that it hasn't got a caller.Here's the script:[code]I've had my tutor look at it, and she can't work it out either, but I do get the feeling that she's not much wiser on Flash than I am.

View 17 Replies

ActionScript 3.0 :: Getting RemoveChild Error

May 7, 2009

How can I remove the currentTarget?[code]...

View 5 Replies

ActionScript 3.0 :: RemoveChild From An Array?

May 24, 2009

I'm trying to figure out why I can't remove the child of the meteors immediately after they have hit the planet or a building so that it would only damage the building once. When I try to just 'removeChild(meteorArray[k])' AS says that the 'object must be a child of the caller'. I'm not sure what that means, but I thought that the meteor was the child of the main document class.

View 2 Replies

ActionScript 3.0 :: RemoveChild Not Working?

Oct 25, 2009

here is my script but at the bottom i have a removeChild function which isn't working.

Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;

[code]....

View 6 Replies

ActionScript 3.0 :: RemoveChild After GsTween?

Jun 23, 2009

is there a "Best Practice" way to do this? This always gets caught up if someone changes too quickly...

public function infoFader(fadeMC:MovieClip):void
{
fadeMC.scaleX = 1.5;
fadeMC.scaleY = 1.5;
fadeMC.alpha = 0;

[Code]...

View 9 Replies

ActionScript 3.0 :: Add/removeChild Using An Array

Apr 3, 2010

I've set up and button/movie clip array so that when a user clicks on a button, that movie clip loads and the old one goes away. What I'd like to do is use "addChild" to load the new movie clip and "removeChild" to remove the previous clip. I've got the addChild thing...sort of...it loads all the movie clips onto the screen at once though and I can't get the script to work another way.

Here's the code I've got:
 
var arrNavigation:Array = [{button:m1_mcButton, page:m1_mc},{button:m2_mcButton, page:m2_mc},{button:m3_mcButton, page:m3_mc},
{button:m4_mcButton, page:m4_mc}, {button:m5_mcButton, page:m5_mc},{button:m6_mcButton, page:m6_mc},

[Code]....

View 5 Replies

ActionScript 3.0 :: RemoveChild And Its Implications?

Oct 10, 2010

i have a quick question for you. Say i have a parent movieclip called "bob". Within "bob," i have another movieclip named "steve." within "steve," i have a bunch of other movieclips. Say i call removeChild(steve), from within bob. I know that will remove steve, but does that mean all the little movieclips within steve will be removed as well?

View 1 Replies

ActionScript 3.0 :: RemoveChild Error?

Oct 19, 2010

I am adding a brick (movieclip) this way:
var brick:Brick = new Brick();
addChild(brick);

[code]....

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved