ActionScript 3.0 :: Unload Movie Button On External Swf?

Jun 29, 2010

i have a homepage - home.swf, with a button - btn_menu, that loads menu.swf.

btn_menu.addEventListener(MouseEvent.CLICK, menu);
function menu (e:MouseEvent):void{
var request:URLRequest = new URLRequest("menu.swf");

[Code].....

the above part gives an expanded menu and it works fine. now i have a minimize button on the menu - btn_mini, that effectively removes the menu.swf

btn_mini.addEventListener(MouseEvent.CLICK,unloads wf);
function unloadswf(event:MouseEvent)
{

[Code].....

View 9 Replies


Similar Posts:


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 2.0 :: Unload Movie For External Loaded Movie

Jul 31, 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

[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.

View 5 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 :: Unload External Swf From Nav Button?

Jun 22, 2009

I have 3 nav btn and each btn load an external swf successfully. My problems is it doesn't unload. I have tried adding pageLoader.unload(page) and mcContainer.removeChild(pageLoader) but it doesn't work. The code below contains load external swf only.What is the best way of unload a swf using as3?

var mcContainer:MovieClip;
var pageLoader:Loader = new Loader();
galleryBtn.addEventListener(MouseEvent.CLICK, galleryPage);

[code]....

View 2 Replies

ActionScript 3.0 :: Unload The External Swf After Each Button Click?

Sep 8, 2011

I have an external swf that is loaded at frame 2 of the main timeline. The external swf has code that plays an flv, i've pasted the code below for the button that navigates the play head to the fram label 'frame2'. I want to know, how can i unload the external swf after each button click? Does the code for unloading have to go to in the button code or the main timeline?
 
anim_mc.stop();
anim_mc.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);anim_mc.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);anim_mc.addEventListener(MouseEvent.CLICK, onClick);
anim_mc.buttonMode = true;anim_mc.mouseChildren = false;

[code]....

View 22 Replies

Flash :: Load External Swf From A Button In It And Unload Self?

May 13, 2010

I am an uber n00b to flash AS3. And it is not my intention to sound like a complete moron, but honestly, I have had a hard enough time figuring out just how to load an external .swf into my main file! add a button within the external .swf which will unload itself and load a new on in its place.

View 1 Replies

ActionScript 3.0 :: SWF Unload Itself And Load A New One From Button Within External SWF?

Mar 15, 2011

SWF Unload itself and load a new one from button within External SWF?

View 1 Replies

ActionScript 3.0 :: Load/Unload External Swf With 1 Button

Oct 14, 2011

I have a main swf (call it Main1). Main1 calls an external swf (call it swf1). Swf1 loads on top of Main1 like it should. Swf1 has a button that calls another swf on top of Main1(call this Swf2). Well the problem is, the button on Swf1 calls Swf2 on top of itself, instead of removing Swf1 first. I cannot figure this out for s*** how to make this work. How can I unloading Swf1 from the loader, and at the same time load Swf2 into the loader from a single button residing on Swf1? My code is below.

Main1 has a button (click_btn) that loads Swf1 (click_btn is in a Movie Clip, not on main timeline)

ActionScript Code:
stop();
click_btn.addEventListener(MouseEvent.MOUSE_DOWN, loadMC)
function loadMC(ev:MouseEvent){

[Code].....

How can I incorporate something like the close button (closer) into done_click to close Swf1 when I call Swf2 from this button (done_click)

View 4 Replies

ActionScript 2.0 :: Unload A External Movie With A Xml Menu?

Mar 8, 2009

i have this menu, that has the general actionscripting on the button, but the characteristics are in the xml file... color, and file name..

in the main movie, the button's actionscript i have:

ActionScript Code:
// On press goes to the link setted in the xml
area.onPress=function(){

[Code]....

what do i do to unload the movies each time another is loaded?

View 1 Replies

ActionScript 2.0 :: Load External Movie And Than Unload It?

Jan 5, 2009

I didn't work with flash some time, but now I am making site for my furniture shop and I have stuck.Because web site is quite big with many pictures, I had to insert "loading external movies" function, and I have used this function[cod]e...

View 4 Replies

ActionScript 2.0 :: Unload Movie Then Load Another Movie Same Button?

Jun 5, 2004

can I script a buttons to unload a movie clip or swf, then load a different movie?

View 6 Replies

ActionScript 3.0 :: Use One Button To Load And Unload External Swfs?

Jun 24, 2011

How can I use one Button to load and unload a sequence of external swfs, Like a Next Button and Previous Button?

View 1 Replies

ActionScript 3.0 :: Using One Button To Load And Unload External Swfs ?

Jun 24, 2011

How can I use one Button to load and unload a sequence of external swfs, Like a Next Button and Previous Button?

View 5 Replies

ActionScript 3.0 :: Load And Unload External Flash Movie?

Mar 23, 2011

i have a flash movie that loads in two external swf files.

The movie has two buttons each of which loads in a seperate movie, now this allworks fine and to be honest i just used the script assist function to make it all work.

Now my problem is that if i press button number one it loads in the first movie but then i have to press button number one again to unload the movie which means if i press button number one followed by button number 2 i do not unload a movie and they both play together one on top of the other.

is there away that i can have each of the buttons check to see if a movie is loaded and if it is unload it first.

below is my code.

ActionScript Code:
button_3.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_3);
var fl_Loader_3:Loader;

[Code].....

View 5 Replies

ActionScript 2.0 :: Load/unload Movie With Same Button?

Aug 30, 2010

I'm using CS3 with Action Script 2.

I have a button that loads an outside .swf into a blank container. That works fine, however, I want to use the same button to unload that movie. Basically I want it to work as a toggle button.

View 10 Replies

ActionScript 3.0 :: Unload Movie Then Load New One With Same Button?

Mar 30, 2011

I've gone fully gray trying to learn how to do something in AS3 that was routine in AS2: Unloading (if something's already there) something from a movie clip then loading something in the same clip, all with the same button. Here's the code I'm using, er, attempting to use now. These are for two buttons out of a set of 9. All I'm trying to do is the simple: look to see if there's something in the clip "hovercap", and if so, remove it completely;, then load a new movie. (If there ISN'T something in "hovercap", I want to load a new movie anyway.

invisible_mvp1800c.addEventListener(MouseEvent.MOU SE_DOWN, loadImage); {
function loadImage(url:String):void {
if(imageLoader != null && contains(imageLoader)){
removeChild(imageLoader);
[Code] .....
Clearly, I'm still learning things in AS 3.

View 14 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 2.0 :: Code Does Not Work After Using The Close Button To Unload The Movie?

May 21, 2007

i have a movie called with:

Code:

_root.attachMovie("biography", "biography", _root.mylogo.getDepth()-1, {_x:Stage.width/2, _y:Stage.height/2});
and within each i have a close button with:

Code:

close_bt.onPress = function() {
unloadMovie(_root.biography);
};

but now i have a problem, im trying to use:

Code:

if (!_root.biography) {
_root.attachMovie("biography", "biography", _root.mylogo.getDepth()-1, {_x:Stage.width/2, _y:Stage.height/2});
}

to call the move again if there isnt already an instance of it but it only works the first time the movie was called, it wont work after i use the close button to unload the movie..

View 6 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 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 2.0 :: Make Movies Unload Before Movie Corresponding To Button Clicked Loads Up / Doesn't Overlay?

Jun 16, 2003

URL...How and where and what do I add to make the movies unload before only the movie corresponding to the button clicked loads up and doesn't overlay?I'm having trouble with the level and all that URL...

View 4 Replies

ActionScript 2.0 :: Unload/Load Movie Clips In Parent Movie From Buttons In Child Movie?

Feb 12, 2009

I Have 3 Movies:MAIN.SWF, contains loading movie actions for Nav.swf and Home.swf.NAV.SWF, contains navagation menu loaded on Level 2 in Main HOME.SWF, contains slideshow for home page loaded on Level 1 in Main In NAV.SWF, there is a MOVIE CLIP "graphmc", which contains a BUTTON "graphicbtn", When this button is clicked, I'd like the HOME.SWF (which is loaded into Main.swf on Level 1) to fade out and unload, and load and fade in Graphics.SWF in place of it.

View 6 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

ActionScript 2.0 :: Load A Movie From A Specific Frame And Unload A Previously Loaded Movie?

Mar 28, 2010

I am making a flipping page book in flash and have had to create sections in different movies because it kept crashing when i tried to have all the pages in the same movie. I have 3 movies 'page flip4', 'pageflip4-2', and 'page flip 4-3' . I have used the code below to go (flip bacwards) from 'page flip4-2' to the frame label ''backflip'' in 'page flip4'..This works fine

Code:
on (press) {
loadMovieNum("page flip4.swf", 1);
}

[Code].....

View 0 Replies

ActionScript 1/2 :: Unload Parent Movie After OnloadInit Of Child Movie?

Jul 30, 2010

I am loading external swf's into a main load.swf, using a Moviecliploader object. What I basically want to do is that, after an external movie, say home.swf, loads another external swf, say about.swf, home.swf should be unloaded.
 
home.swf is loading about.swf into the _root.mc_holder, which is placed inside load.swf. I want all external files to be placed within this holder. Now this is working with some files, but not with others. My standard code within all files is this:
 
//code within home.swf to load about.swf
var loader:MovieClipLoader = new MovieClipLoader();var ldrlistener = new Object();loader.addListener(ldrlistener);ldrlistener.onLoadStart =

[Code]......

View 3 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 2.0 :: UNLOAD The CURRENT MOVIE First Before Loading Another MOVIE

Apr 15, 2003

I have a button ( 3 buttons ) and each button is assigned to Load a movie. When you click one of the buttons, the LoadMovie on Level 1 is good. Now here is my problem, how will I unload the current movie before Loading the next one. I want to UNLOAD the CURRENT MOVIE first before loading another MOVIE.

View 2 Replies







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