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


Similar Posts:


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 :: 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 :: 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 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 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

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 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 :: Unloading A Loaded External SWF With A Close Button On The External SWF To Unload?

Aug 15, 2011

[URL]I have: main.swf (a menu) and I have module.swf (content)If you navigate to Subsea Wellhead Systems/SS-15 BigBore II and click on that I have it load an external swf which covers most of the parent. So far so good. My problem is unloading the loaded 'Child' swf with the button provided on the loaded 'Child' swf.below is the code I used to load the file but I cant, for the life of me, find a way to unload it. 
 
var bigboreLoader:Loader = new Loader();btnbb2.addEventListener(MouseEvent.MOUSE_UP, bigborecontent);
function bigborecontent(event:MouseEvent):void{var bigboreRequest:URLRequest = new URLRequest("moduletemplate.swf"); bigboreLoader.load(bigboreRequest); stage.addChild(bigboreLoader);
 
I am certain it requires the Child to communicate with the parent somehow but I am at a loss. If I could get a bit of advice or a link to something deal with this, it would be a big help. I just need to have my links load my modules and the remove them when the close buttong is hit on the loaded swf. I promise I have done searches and I admit I have found asnwers but still they are not working. I found the code below:
 
Main FLA: 
function removeF() {
removeChild(bigboreLoader);
}

[code]....

View 10 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 :: Load External SWF And Unload External SWF

Jun 13, 2010

I'm sure this question has been answered but I have been looking everywhere and all I can find is how to load an external SWF but not how to unload it. I come from a basic knowledge of AS2 and it was easy for me to load using levels but I have run into a wall. I have a main swf and to keep the initial filesize small I would like to split some image intensive sections out and load them when needed.

View 6 Replies

IDE :: Unload External Swf?

Apr 12, 2009

My index page has two buttons... 'about' and 'portfolio' which loads each respective external swf into a holder.When 'portfolio' is loaded there are another 8 buttons which again load 8 external swfs into a holder in the portfolio.swf. Each of the 8 external swf files load fine, but is there anyway to have a back button instead in each of the 8 external swf to go back to the portfolio.swf without having to click the 'portfolio' button?i have tried _root.unloadMovie.... but it just clears the stuff on my index page and loads the portfolio.swf

View 1 Replies

IDE :: How To Unload External Swf

Mar 18, 2010

i am trying to create a file where a mc hittest another object(using keyboard arrow) it loads an external swf and when keypress to leave the object, it will unload the external swf. my problem is the external swf did load but it wont unload. attached herewith my fla file for reference. script as below,

mcMain.stop();
var leftArrow:Boolean = false;
var rightArrow:Boolean = false;
var downArrow:Boolean = false;

[Code]......

View 1 Replies

ActionScript 3.0 :: Unload An External Swf?

Jan 20, 2010

I have a movie wherein on the stage I have a empty MC with the instance name of mainImage.

There is a menu with listeners that load in different swfs externally into this 'mainImage' clip. The problem I discovered is that I cant seem to unload the old swfs upon the loading of a new one.[code]...

View 2 Replies

ActionScript 3.0 :: Unload External Swf Self?

Jan 17, 2011

I am migrating to AS 3.0 from AS 2.0 and I am unable to unload a loaded movie self.In AS 2.0 i simply used "unloadMovie(this);" have also tried "removeChild(this);" but it doesn't work.

View 1 Replies

ActionScript 3.0 :: Unload The External Swf

Nov 16, 2008

I am loading 5 external swf's into 5 different "buttons".Right now they all load, but they load on top of each other.

View 2 Replies

ActionScript 3.0 :: Way To Unload External SWF's

Mar 22, 2009

I was finally able to work out a way to attach and preload external SWF files - now I am on the hunt to understand how to unload the external SWF file on a mouse event so that a new SWF file can be played.

View 20 Replies

ActionScript 3.0 :: How To Unload External Swf

Mar 7, 2008

I have a main SWF (=Homepage) which displays contents that are external SWFs. Now I have figured out how to load external SWF in my Homepage (when you click a button - see code below), but I don't know how to unload them according to my needs... See, I have a "close button" in every external SWF and with AS3, I'm a little lost on how I should proceed to make this button unload the external SWF displayed on the Homepage...

[Code]....

View 9 Replies

IDE :: Unload External Swf And Load New One?

Jul 29, 2008

I'm creating my portfolio in Flash CS3. I have five buttons in website.swf. I also have five external swf files.If you click a button, it loads an external swf. If you click another button, it unloads the first swf and loads the next one. Is there anyway to unload it and load the next?

stop();
function loadMain(e:MouseEvent):void{
var loadMain:Loader = new Loader();

[code]....

View 14 Replies

ActionScript 2.0 :: Trying To Unload External Swf With Button

Nov 30, 2010

im using the [code]function to load files into my fla .im trying to put a button in each of the loaded swf files that will tell the main fla to unload the swf and gotoAndStop(1)i have 3 buttons on the first frame of main fla. the first button has [code] different game.so i need a button to unload the game and gotoAndPlay(1) i know how to do this in as3 but im not to familiar with as2.

View 1 Replies

ActionScript 3.0 :: External SWF Unload Itself Using Button From Within?

Mar 15, 2011

Everything works perfect except for one problem I just can't figure out. On the homepage, called "home_page_swf", I have three buttons at the end of three paragraphs that say "Learn More" and need them to trigger the "home_page_swf" to unload itself and replace it with one of the other external swf pages. I basically want the three buttons within the "home_page_swf" to perform the same function as the "Services", "Portfolio", and "Team" buttons that are located in main swf. I've been trying to read up on it and I keep finding something about "Dispatch Even" but can't figure out how to apply it to the code I am using for the website I'm working on. I'll post the code below for the main navigation swf and what the labels are for the buttons that are inside the external swf called "home_page_swf".

Main SWF with main navigation buttons:
var Xpos:Number = 0.0;
var Ypos:Number = 0.0;

[code]....

View 1 Replies

ActionScript 3.0 :: Load And Unload External Swf?

Oct 7, 2009

I have this simple code to play and stop external swf[code]...

View 6 Replies

ActionScript 3.0 :: Load And Unload External.swf?

Oct 28, 2009

OK this should be the last of the coding to complete my AS2 to AS3 conversion of a site. The AS2 site had an external photogallery .swf that loaded from a navigation button on the main timeline. It used the loadMovie function so it loaded a photogallery on top of the main .swf in level one.
 
I also had unloadMovie,1 in all the navigation buttons so if a user was in the gallery and they clicked anywhere else in the main .swf which is all in level 0 the gallery in level 1 would be deleted.
 
In this situation the gallery that will be loaded on top of the main.swf needs to be a little smaller than the main ,swf so the navigation on the top of the main shows through. If the main.swf is 900 x 600 I would need to load the photogallery on top which would be 900 x 450 and need to use x and y coordinates so when the swf loads it loads in the right spot.

View 1 Replies







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