ActionScript 3 :: Unload Child SWF On Last Frame Without Using Button

Nov 6, 2010

Using AS3. I have in my code a button to stop and remove the swf, but I would like to have in addition to unload a child swf when it plays it's last frame automatically - not using a button.

Here is my code on the main timeline:
var loader:Loader;
var closer:close;
norton_btn.addEventListener(MouseEvent.CLICK, NortonDemo);
function NortonDemo(e:MouseEvent):void {
[Code] .....

Now, what do I need to add or change to this code and add to the code on the last frame of NortonDemo to accomplish what I want to do?

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Unload Child Movie On Enter Frame?

Sep 7, 2007

I am attempting to build a site using load movie commands. I have a navigation movie with 4 buttons, on the press of each button I uesd this script.

[code]...

this loads an animation and plays into the news reader. on the press of a button to go back I have loaded a seperate back animation using this script

[code]...

The problem I now have is I want to remove this clip at the end of the animation and return to the root navigation.

View 1 Replies

ActionScript 3.0 :: Unload From Child And Navigate To Frame Label In Parent SWF

Sep 16, 2010

I have a flash page where I am loading another .swf into. With a button in the loaded swf I need to unload the loaded swf (where the button is) and navigate to a specific frame label in the parent .swf. I've tried to do the following in the key frame where the swf get loaded into I've put the following:

var gallery_load_wonderland:Loader = new Loader();
gallery_load_wonderland.contentLoaderInfo.addEventListener(ProgressEve nt.PROGRESS, loop_wonderland);
gallery_load_wonderland.contentLoaderInfo.addEventListener(Event.COMPL ETE, done_wonderland);
gallery_load_wonderland.load(new URLRequest("gallery_wonderland.swf"));
function loop_wonderland(e:ProgressEvent):void {
[Code] .....

I basically want to first load the swf called "gallery_wonderland.swf". Then in the "gallery_wonderland.swf" there's a button called "contact03_btn"¯ which I want to unload "gallery_wonderland.swf" even though it's inside the swf and navigate to the frame label called "Contact" in the parent swf.
 
What can I do I've done similar before and it works, but when I do it know and I click the contact03_btn it comes with following error message:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@26215ba1 to flash.display.MovieClip.
at gallery_wonderland_fla::MainTimeline/back_wonderland()[gallery_wonder land_fla.MainTimeline::frame1:227]

View 13 Replies

ActionScript 3.0 :: Unload Loader / Remove Child / Close Button

Oct 16, 2011

i successfully managed to work out the loader script, and load a external swf file into my current project. Now that its working and all is well, i realised that only way to get back to 'main menu' was to close the whole thing. I tried to sort it out with a simple 'back' button but no success there. As mentioned in the title thats the options i found so far but cant seem to quite understand them tbh. I just want it to work so that I easily can manouvre back to 'main menu'.

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 :: Load Frame In Main Scene From A Button In Child Movieclip?

Sep 11, 2010

I wanted to create a portfolio in flash, so I designed the layout in photoshop, with different webpages in different groups. So groups i created: home, about, porfolio, contact, affiliates, topbar, menu.I use Creative Suite 3 or CS3I then imported the groups into flash as movieclips, using the import to stage function. here is the image of the main scene in the flash. (SEE IMAGE 1st thumbnail)I created a new layer on top of all the layers and used labels at equal intervals to differentiate between pages.here's the image depicting the same.(SEE IMAGE 2nd thumbnail)Now in the home movie clip, i made all the text layers as movie clips to make button animations and assigned sounds and actions to them i.e. rollver, rollout andclick events. here's the swf.(PM ME FOR SWF)I want to know the code or method to load the frame labelled ''about'' in the main scene when i click on the movieclip button 'about' which is in the movieclip 'home'. Here's the code i tried for the first 'about' button, but it returns error "1120: Access of undefined property event."

code:
ActionScript Code:
var OverSound:roll_over = new roll_over();

[code].....

View 0 Replies

Actionscript 3.0 :: Unload A Child From Within Itself?

Jun 26, 2009

Im trying to solve this, it should be quite simple but yet I can't get it to work! I have an index.swf that has a container which holds the entire flash site. I want to unload and load the various sections (different swf files) by clicking buttons thar are WITHIN THE CHILD.

[Code]...

View 2 Replies

IDE :: Child SWF Close/unload Itself?

Nov 14, 2009

I have a parent SWF into which I load a child SWF. I want to have a close button in the Child SWF (not the parent!) which closes/unloads it from the parent swf. Been looking all over but can't find any solutions that work.Here's my code for loading the child SWF from the parent's timeline:

var myrequest:URLRequest=new URLRequest("child.swf");
var myloader:Loader = new Loader();
myloader.load(myrequest);[code]...

What should I put in the child SWF to unload itself?

View 11 Replies

ActionScript 3.0 :: Child SWF Close / Unload Itself

Nov 14, 2009

Experience: I'm a newbie to AS3 - making the transition from AS2. Problem: I have a parent SWF into which I load a child SWF. I want to have a close button in the Child SWF (not the parent!) which closes/unloads it from the parent swf. Been looking all over but can't find any solutions that work. Here's my code for loading the child SWF from the parent's timeline:

var myrequest:URLRequest=new URLRequest("child.swf");
var myloader:Loader = new Loader();
myloader.load(myrequest);
myloader.contentLoaderInfo.addEventListener(Event. COMPLETE, movieLoaded);
[Code]...

What should I put in the child SWF to unload itself? Apologies if this presumably simple task has been covered, please point me to the thread.

View 5 Replies

ActionScript 3.0 :: Different Ways To Unload Child?

Oct 14, 2010

I have a stage w/ 6 buttons that call movie clips. works to remove them when the "next" button is clicked. Now I need to have an additional option of clicking outside the buttons "on the backround" to remove the movie clips also.

PHP Code:
var fadeInstance:DisplayObject = null;
function openFade(fade:MovieClip, y:Number):void{

[code].....

View 4 Replies

ActionScript 3.0 :: Unload Child Swf Code?

Jan 29, 2010

I have one page in my Flash site that has photo thumbnails that load external swfs. The code works OK, but when I use

Code:
removeChild(loader);
in my button functions for other pages, I'm getting the output error:ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.at flash.display:isplayObjectContainer/removeChild()
at the_fla::MainTimeline/homeClick() Is there a way to fix the error?

View 6 Replies

ActionScript 3.0 :: Unload External SWF From A Child?

Nov 25, 2009

I have a button that loads an external movie onto the stage:

Code:
magnalock.addEventListener(MouseEvent.CLICK, magnalock_newvid);
function magnalock_newvid(event:MouseEvent) {
trace("you clicked me");

[Code]....

View 3 Replies

ActionScript 3.0 :: Unload Parent Swf From Child Swf?

Jan 5, 2011

Parent swf has a button to load Child swf and Child swf has a button to unload itself through a dispatchEvent. Both in respective document classes. Parent loads Child fine... Child can't remove itself! Anyone have an idea what I am doing wrong here? Or another way to go about this? Struggling for a day now...

Parent swf:

public var myLoader:Loader;
loadButton.addEventListener(MouseEvent.CLICK, loadSWF)
public function loadSWF(e:MouseEvent):void {

[Code]....

View 2 Replies

ActionScript 3.0 :: Unload Child After A Load Request

Nov 4, 2009

I have a drop down box that is loading in different movies when selected.  But when I select the second option in the drop down box, the movie gets loaded on top of the next movie. I saw that there is a removeChild(), but i'm having trouble finding where to apply it in the code below? If I put it in the function, it creates errors of course.[cod]e....

View 3 Replies

ActionScript 2.0 :: Unload Child MovieClip After Its Playback?

May 12, 2010

I don't know AS2 well, prefering 3.0, however the project should be in 2.0. So, I have 2 movieclips, one is parent, another - loaded through LoadMovie("name.swf", _root);I need to unload child after its played and stoped. How can I do it in most proper way?

View 1 Replies

ActionScript 2.0 :: Unload Movie On Root From Child?

Oct 5, 2011

I'm loading a movie in externally. The external movie has a button to unload itself from the main movie. It loads into _root.calContainer. The button is called xButton. This is the script that's not working:

_this.xButton.onRelease = function() {
_global.calContainer.unloadMovie;
}

I've also tried. _root.calContainer to no avail.

View 1 Replies

ActionScript 3.0 :: Child Requesting Parent To Unload External Content

Jun 19, 2011

If you haven't met me yet, that's because I'm pretty new around here. I picked up ActionScript just earlier this week, actually. Name's Kate. Nice to meet you. All righty. I'll start by saying that I've been referencing this thread:

actionscript.org/forums/showthread.php3?t=222486
(I'm not allowed to post URLs until I've got at least 50 posts in?! Gasp.)

View 2 Replies

ActionScript 3.0 :: Seek Frame-by-frame The MovieClip Timeline And Use The CurrentFrame To Control All Motion Child?

Jul 16, 2010

i'd like to control MovieClip timeline witch contain several DisplayObject (like Sprite, Button, ...) these DisplayObject have Motion (AnimatorFactory). How can i do seek frame-by-frame the MovieClip Timeline and use the currentFrame to control all Motion child.

[Code]....

View 18 Replies

Flex :: Viewstack - Navigate To The Second Child During Onclick Of A Button Present In The Second Child?

May 10, 2010

I have a component mxml file in which i have a view stack, on click of a button i navigate to the first child, now i need to navigate to the second child during onclick of a button present in the second child. All the childs are component files included within the view stack. How could this be done, Sample code is present below,

[code]...

Now in my offering.mxml file if i try to access navigationViewStack i am getting an error stating 'Access of undefined property navigationViewStack.

View 3 Replies

ActionScript 2.0 :: Unload All Movies When Going To New Frame?

Aug 31, 2010

I have a scene with buttons that call upon outside movies to be loaded. But when I click a button to go to a new frame, the outside movies on still being seen on top. Right now my button Action is:

on (release) {
gotoAndPlay(16);
}

What should it say to unload all movies then go the 16?

View 5 Replies

ActionScript 3.0 :: Unload External SWF On Frame

Nov 11, 2009

I am building an on-line game for autistic children, and I am facing a problem where I load a SWF to play a mini game. Although when the mini game is over I want to go back to the original SWF (and a different scene to which I left.)

I use:

var request:URLRequest = new URLRequest("hidenseek.swf");
var loader:Loader = new Loader()
loader.load(request);
addChild(loader);
stop();

To load the swf, although I can't figure out how to unload it on a frame, and then on top of that take it back to original SWF to a new menu?

A work around could be to just have the new menu in the loaded SWF? Could I unload the original SWF or do I have to always keep it open?

View 9 Replies

Actionscript 3.0 :: Unload Swf When Going To Different Frame Label?

Feb 11, 2011

I have the following code on a frame label called "allemande" (frame 890). The first part loads a swf when I click a button called "allemande" that sends me to this frame. This part works correctly.

The second part is code that sends the timeline to the "home" frame label when I click the "home" button. This works OK too.

I would like to insert code that will unload the "allemande_slideshow" swf when I click the "home" button to go back to the "home" frame label.[code]..

View 7 Replies

CS3 : Onenterframe Load Swf Onexit Frame Unload Same Swf?

Dec 17, 2009

on the main time line i'm loading external swf at specific frame using moviecliploader class how do i unload the same swf when exiting that frame?this code is on the main timeline at the frame i want it to load at but i don't know how to unload it when i exit that frame:

this.createEmptyMovieClip("holder2_mc", this.getNextHighestDepth());
var mclListener:Object = new Object();
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip("RVBanner2_FLASH8.swf", holder2_mc);

View 5 Replies

Load And Unload External Swf And Then Goto Frame

Aug 1, 2010

i want to make an presentation,, for which.. at frame i click a button on frame 9 it goes to frame 10 and plays.. like my script on frame 10 is below

this.createEmptyMovieClip("coalzoom",5);
coalzoom._x = 80;
coalzoom._y = 60;
coalzoom.onEnterFrame = spaceLoad;
function spaceLoad()
[Code]....

and when i click another button to go frame 1 from the same page at 10,, placed beside the loading external swf ,, it goes,, but the loaded external swf file is not going ,, or the external file not cleaning,, not removing. here is the CS3 flash sources,, and outputs [URL]

View 1 Replies

Professional :: Cannot Unload External .swf And Return To Frame 1

Mar 31, 2012

I have tried several suggestions on this forum to resolve my issue, but it is obvious to me I am missing something because I am a NOVICE Flash developer. I have everything working in my Flash file EXCEPT I want to use this code to play a .swf file. When the swf file is done playing OR the user clicks the return to Main Menu button¯, they return to frame 1.[code]The .swf file plays and when I click Return to the Main Menu button, only certain items display from frame 1. The .swf file is still loaded hiding the items that should display on frame 1. I have attached a screen shot of what happens when I click the "Return to Main Menu" button.

View 7 Replies

ActionScript 3.0 :: Unload Image Before Going To Next Frame To Load New?

Jan 15, 2009

I'm trying to create a movie clip which contains the background image and has thumbnails which change the image once you click on it.

Whats the best way to code this?

I'm having trouble with the depth.

addChildAt(imageName, o)

that works for the first image but how do i unload the image before going to next frame to load the new image when the corresponding thumbnail is selected?

View 0 Replies

ActionScript 3.0 :: Unload The Masks On Swfs When Go To Different Frame?

Dec 15, 2009

I got my swfs to load on my web page. I have masked them once loaded. When I play one (click button) then jump to a different page (different frame) everything works fine. But, when I play one and then click another to play and then go to a different page, the mask seems to stay on screen (I am getting a white box in the mask area).

I want to eventually load all my swfs and mask them with their corresponding buttons and then jump to other pages (frames) on my website. I just can't seem to get rid of these boxes (masks).

Here is my code......

var Xpos: Number = 260;
var Ypos: Number = 80;
var swf: MovieClip;
var loader: Loader = new Loader ();

[Code].....

View 4 Replies

ActionScript 3.0 :: Add Child And Remove Child On Same Button

Sep 1, 2009

so I have a movieclip on the stage(lets call that selection movieclip) that once a button is clicked is going to open another movieclip(call this slideshow) I am trying to remove the selection movieclip when you launch the slideshow movieclip.

[Code]...

View 14 Replies

Professional :: Unload Swf After Done Playing And Return To Initial Frame In Containing Swf

Nov 18, 2010

I have a Flash animation that loads a quick animation and then on a button click loads and external swf while at the same time moves the playhead on the timeline to frame 2 so that it has a blank stage to play on. The external swf then loads and plays. At the end of the external swf's animation I would like it to unload and then return to frame one of the containing movie. I am assuming that on the last frame of the external swf I should be putting some actionscript that will unload the movie and then talk to the initial containing flash telling it to return to frame 1.
 
The main swf button that loads the external swf is using a code snippet from the AS3 CS5 library and looks like this...

[Code]....

It is also using gotoAndStop(2); for the same button.
 
So to unload the external swf and return would I use something like... this.unload(gotoAndStop(1));

View 3 Replies

ActionScript 2.0 :: UnLoadMovieNum - Unload The Movie On A Frame Script ?

Mar 11, 2004

I ve loaded a movie into level 2 and want to be able to get rid of it again.Ive tried using this:

on (release) {
unloadMovieNum ("flash/many/video.swf", 2);
loadMovieNum("flash/many/design.swf", 1);
}

But get an error.Is it better to unload the movie on a frame script or what?

View 6 Replies







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