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


Similar Posts:


ActionScript 3.0 :: Unload SWF On Button Click

May 31, 2011

For a project, I have a main page that for each button loads a swf page, that contains a photo gallery, now, for each of these pages, I want a main button, that can return the user to the main page to select another gallery, I have gotten it to work, but it doesn't really stop the gallery, and judging by my memory usage, it seems that it is still running in the background. For the main page's buttons, [code]...

View 3 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 The Current Swf File When I Click On The Other Button?

May 4, 2010

I have this menu that I am loading my swf files under a as. file and linked to a xml file.  It loads perfectly my swf files when i click on the buttons, but when i keep clicking the buttons, it keeps loading it on top of each other...How can i unload the current swf file when i click on the other button.? under the as file i have the following to load my swf files:
 
private function customFunc(link):void {      var request:URLRequest = new URLRequest(link);   var loader:Loader = new Loader()   loader.load(request)   var swfContainer:MovieClip=new MovieClip ;   this.addChild(swfContainer)   swfContainer.addChild(loader);;      trace(link);
}
 
and under the xml i have the following code :
 
<buttons> <button name="HOME" linkType="custom" link="ball.swf" />    <button name="DESIGN" linkType="custom" link="rec.swf" /></buttons>

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

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

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

IDE :: When Click The "x" Button It Doesn't Unload?

Apr 29, 2010

This code that's attached to the current file works fine when you have it just in the time line. but when i put them into external files they dont work.

The problem is when you click the green box, it loads the "book" fine, when you click the "x" button it doesn't unload i am unsure how to fix this.

I have attached the test file here so you can have a look at it

[URL]

Uploaded here due to size

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 External SWF On Button Click?

Feb 19, 2010

How to load an External SWF on button click?[code]...

View 3 Replies

AS3 :: Load An External Swf File On A Button Click?

Apr 9, 2011

Using AS3.0, how do I load an external swf file when I click a button? Also, how can I get rid of that swf file when I click a different button on a menu?

View 1 Replies

ActionScript 3.0 :: Load An External SWF When Click A Button

Oct 19, 2010

I can load an external SWF when I click a button. If I click the same button again the same swf file loads on top of it self. How can I fix it?

[Code]....

View 1 Replies

ActionScript 3.0 :: Load In External Swf On Click - Button

Apr 22, 2010

I am trying to simply load in an external swf when I click a button. I have created a button on the stage called it 'my_button' I can get the swf to load in automatically but I am not understanding the script for loading it in on a click.....would someone pleae explain what script I need to have this is the script I have for loading automatically

[Code]...

View 11 Replies

Professional :: Immediate Need Is To Take External Swf / Add Invisible Button Overlay / Click To URL

May 14, 2010

I am trying to close on as I am attempting to get this incorporated into my website. It came with the recommendation to try the CS5 today to see if this will meet the requirement at the moment.There is a desire to take custom SWF files (I think there is something called Swish files too?) from various sponsors for advertisement purposes and place them on my website.The implementation was straight-forward to make them work through the webserver.I tried a custom example of making a button that upon mouse click would open up a new webpage in CS5 which did work for me.My problem is since the SWF files are finalized, there is no way to put URL information into those files.After doing a lot of searching around today, it appears that the best way to redirect a user upon click of a video is to:
 
1) Open up a new Flash
2) Import the SWF video file into the project
3) Create a Invisible Button over top the SWF video so when the user clicks, they are redirected to a specific URL.
 
But for some reason, when I tried to overlay it with a sample SWF file I imported, there was all this flickering going on to where both were made transparent to one another on the screen not to mention the video wasn't even visible at all.My hope was that the SWF video could be seen clearly while the button remained invisbile to handle the click on the video.Is there someone on the forum that is able to guide me fairly quickly with a fast-path procedure so that I can try this?

View 16 Replies

ActionScript 1/2 :: Replacing Default External With Button Click?

Oct 2, 2010

My container (emptyMC) will load 4 external movies and loop as default when someone comes to the site.
 
Right now the code for the empty mc (emptyMC) is:
 
var loader:MovieClipLoader = new MovieClipLoader();this.createEmptyMovieClip("emptyMC",1);loader.loadClip("image1.jpg",emptyMC);

[Code]....

View 7 Replies

ActionScript 3.0 :: Click A Button From Main Movie On External Swf?

Dec 24, 2011

I need to click on a button that is on an external swf loaded in the main movie with a loader. I'm trying this but does not work:
  
//  main movie
function openswf(queFoto:String)
{
imgLoader = new Loader();

[Code].....

View 1 Replies

ActionScript 2.0 :: Loading External SWF Files With Button Click

Oct 14, 2009

First of all, right now I have 2 buttons, which are defined as buttons. Clicking on button1 loads swf1, clicking button2 unloads swf1 and loads swf2. Heres the basic code for that transition which is pasted ON the button...

on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "F2";
container.loadMovie("F2.swf");
} else if (_root.currMovie != "F2") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "F2";
container.play();
}}}

This works like a charm, no problems. The problem I am having is that I need the button (which will eventually be a part of an animated drop down menu) to have more functionality. When I try to make a movieclip button, no variation of this code above will work to load the swf. I am totally lost. Here is the latest incarnation of the movie clip button code. This version is in the timeline, but I've tried variations directly on the movie clip as well

mc_HeightTest.onPress = HeightMovie
function HeightMovie(){
if (_root.currMovie == undefined) {
_root.currMovie = "F2";
container.loadMovie("F2.swf");
} else if (_root.currMovie != "F2") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "F2";
container.play();
}}}

Why the code pasted on the button will not work when its used in conjunction with a movie clip button?

View 2 Replies

ActionScript 3.0 :: Menu Button Click To Load External SWF

Jun 26, 2009

I was getting in to transitioning from AS2 to AS3 a while back and had designed a page that had menu buttons that when clicked, loaded an external swf in to a container. Pretty simple accept for the fact that it was a while ago and my computer crashed so I'm having to redo this and learn it all over again. I have read in to flash on the subject but I am not to sure on the best way to go about this. I know there are a lot of people on here who make thing a lot more simple and structured than I do. I'm so used to putting the actionscript on the button and I'm a little stuck on the best way to combine the actionscript for the button and loading the swf. I would need to make a button load an external swf in to a container when clicked? I figure I just need one and then I can copy it to all the other menu buttons.

View 2 Replies

Professional :: Loading External Swf's - Fresh Everytime When Click On The Button?

Feb 2, 2010

I have created buttons with this Actionscript. They load in the external swf's fine, but when I click on them again they load them in again, and again, and again... What do I need to write in the code so it loads in fresh everytime you click on the button? (or in other words, cleans up the load in page before it loads in new files).

[Code]...

View 1 Replies

ActionScript 2.0 :: Scrollpanes - Get The External Swf To Change Between Frames When Click On A Button Within In It?

Oct 6, 2004

i have a flash file with a scrollpane. into this scrollpane i have loaded an external swf. how would i be able to get the external swf to change between frames when you click on a button within in it? it works perfectly as a stadalone file but whenever i load it into the scrollpane it stops working edit: i just realised, this might eb the wrong forum to post this in, should it be posted in the "flash mx 2004" forum?

View 1 Replies

ActionScript 2.0 :: External Swf Interaction - Doesn't Jump Frames When Click The Button

Dec 16, 2011

I have my main swf and another swf in "/tools/FrameJumper.swf" In my main swf I have a movieclip container on the stage "myContainer" and when I click a button it loads that "FrameJumper.swf" into that container. Now in that "FrameJumper.swf" I have a txt box and a button. here is the code on that button

[Code]...

View 1 Replies

ActionScript 3.0 :: Unloads External Swf Inside Movieclip / When Click A Button On Main Screen

Jul 22, 2011

i found a script that unloads my external swf inside a movieclip when i click a button on my main screen. this script causes the external flash inside my moviclip to close and unload when i click the close button, which is what i want!. the only pain in the butt is it preloads the external flash when you go the flash site and i dont want that. i only want the script to close the external swf. if anyone is curious book.swf is the swf in the movieclip i am trying to close.[code]

View 1 Replies

ActionScript 3.0 :: Load External Swfs As Pages Onto The Main Stage On The Click Of A Button

Jul 20, 2011

I have created a website which loads external swfs as pages onto the main stage on the click of a button. I am using Flash CS3 and Actionscript 3.0. Here is my code:

[Code]...

View 6 Replies







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