ActionScript 3.0 :: Way To Remove External Swf
Nov 5, 2009
I've read similar problems in other posts but I can't seem to find the right solution. I'm trying to convert an AS2 project to AS3. The old project has a series of buttons which load an external swf into an empty movieclip on the stage. Pretty simple using loadMovie/unloadMovie. I'm able to load the external file using the loader object[code]...
My problem occurs when I try to load another movie. I use the same function and just pass the external movie name. I can remove the external movie from my placeholder movieclip so it is not visible on the stage but it still plays. I can hear the audio as the new movie is playing and get output errors because the first movie is firing off code that can't complete.
View 6 Replies
Similar Posts:
Apr 6, 2010
Im once again stuck on actionscript 3.0. I am currently trying to load an external swf into my current swf by using a button. This works perfectly.I then made a button to unload my swf. This works too.
Actionscript Code:
var myrequest:URLRequest=new URLRequest("Extswf.swf");var myloader:Loader=new Loader();myloader.load(myrequest);open_mc.addEventListener(MouseEvent.CLICK, clickButton);close_mc.addEventListener(MouseEvent.CLICK, unloadFunction);function clickButton(event:MouseEvent):void{ stage.addChild(myloader); function unloadFunction(event:Event):void{ stage.removeChild(myloader);}
Looking at this gave me a new idea, which I have seen being done in Actionscript 2.0.Instead of having a close button inside my current swf file, I would like to have the close button INSIDE "Extswf.swf". This would allow me to make the swf exactly what my original idea wanted it to be.
View 3 Replies
Jun 7, 2010
I loaded an external SWF file to my timeline using MovieClipLoader method. myMCL1.loadClip("game.swf", 5); It loaded fine. But then with a click of a button I need to go to the next frame and I want this MC to go away. I've tried everything I knew:
delete.myMCL1("game.swf").onEnterFrame;
myMCL1.onEnterFrame = unloadMovie;
delete myMCL1.onEnterFrame;
[Code].....
View 3 Replies
Aug 5, 2010
I have a menu with buttons on the stage that when clicked load external swf but the problem, although i can remove them from the stage, is that they are still playing which gives my site performance problems. I gave weak references to the Event Listeners but i didn�t remove them.Here�s the code:
Code:
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
[code]...
How can i remove each the listeners from each swf so that the site doesn�t perform so slow?
View 3 Replies
Mar 15, 2009
I have managed to load external swf's fine and also unload them when a new one is loaded, but now I need the swf's that are loaded to appear below (meaning on a lower layer effectively) than my navigation, which is in the main swf. I can get that to happen by creating a movieClip on the stage on a layer beneath the one my navigation is on and loading the swf into that mc, but then I don't know how to clear the swf from that mc so another one can load there in it's place.
Here is the code I have so far:
Code:
//Universal Button Function
function buttonClick(event:MouseEvent):void
{
[Code]....
View 4 Replies
May 23, 2010
I've used the following frame action with 2.0. for loading external swf to blank mc on stage, scale it and then removing it by buttons. load_btn. onRelease = function() {movie_mc.loadMovie("webdesign.swf");movie_mc._xscale = 70;movie_mc._yscale = 70;}remove_btn.onRelease = function() {movie_mc.unloadMovie();}I found that it is not working anymore with 3.0.
View 2 Replies
Jun 27, 2011
I have 4 empty movieclips called holderMC1/2/3/4 on 4 frames of the main timeline. Each movieclip loads in an external swf with this code:
var swfLoader4:Loader = new Loader();
holderMC4.addChild(swfLoader4);
var bgURL4:URLRequest = new URLRequest("F1_h.swf");
swfLoader4.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete4);
swfLoader4.load(bgURL4);
function loadProdComplete4(e:Event):void {
trace("file loaded4");
}
I have 4 buttons which on click goes to 4 frame labels on the main timeline corresponding with the 4 movieclips. Very simple - works fine - except the swfs don't unload properly, so the video in the external swfs keeps playing in the background when a new swf has been loaded.
View 6 Replies
Dec 10, 2011
I have read many many post and I don't find the answer of how to remove completely a swf load external.Every time I load and unload I see the windows memory task manager and see that the memory increase and don't reduce when remove child.
this is my code:
var oneLoader=new Loader();
bt1.addEventListener(MouseEvent.CLICK, swf1);
[code]......
View 7 Replies
Nov 3, 2011
I'm creating a website for a cabin and I want the users to be able to view a calendar that exists on the reservations website. The calendar is constantly updating as people are reserving cabins. I want this calendar to dynamically load from the external server onto my website for people to view. Then once they view it - I want to remove it on the next mouse click. Right now it stays and ends up on every page in the website. I think it should be easy and I have some sort of misunderstanding of how to do it. I have literally spent days trying to get this stupid thing to work. It's driving me crazy!!! Here's what I have right now.
[Code]...
View 4 Replies
Jun 19, 2009
I have a huge doubt about controlling childs with external movies.. For example:
[Code]...
How manage the external movies if they have a eventListener in a button like
[Code]...
View 1 Replies
Oct 7, 2003
nsert the code for a button..when the mouse rollsover a button the text will be called...how to remove the text when the mouse rolls out ?
on (rollOver){
loadText = new loadVars();
loadText.load("yellow.txt");
[code].....
View 12 Replies
Mar 26, 2010
Scenario:
child.swf is loaded in parent.swf
I do not have .fla for child.swf (done by somebody else)
Problem:
The child.swf contains custom context menu. I need to suppress this menu and provide the menu of parent.swf even when child.swf is loaded.
View 3 Replies
Jan 14, 2011
I have developed a touchscreen application that works perfectly fine except for the memory issue. Basically, the touchscreen app works kinda like a website with navgation on the side and content displaying next to it. I separeate each section into external swfs, and load each one up when it is needed, thinking it would reduce memory used on the pc. But unlike actionscript 2, AS 3 would not remove the external swfs from the memory. You can remove it from the stage and you won't see it, but the swf will still stay in the memory! So... as you navigate through the app, loading up all these external swf, even I do loader.unloadAndStop();, the swf is still there, and they just keep piling up in the memory as you navigate from the app. After leaving the touchscreen for a day or 2, having all these users naviage through it, all the external swfs will just completely consume all the resources and freeze the pc.
View 1 Replies
Jun 10, 2011
I have a main movie timeline that loads an external swf. When I unload the swf from the main timeline I get an error from this:my_FLVPlybk.addEventListener(VideoEvent.COMPLETE, vidEnd);
is there any way to remove the event listener from the loaded swf from the main timeline?
View 3 Replies
Oct 23, 2010
i have a Flash Application with a button and an onRelease event. How can i load an external swf File, display it for 5 seconds on top of the main stage and then fade it out? Will this be possible with createEmptyMovieClip()?
View 2 Replies
Oct 12, 2011
I have a series of 10 external interface callbacks that are called through javascript and load mp3 files. The problem is, someone is able to click these while my pre-load function is running and it causes multiple files to load. Is there a way to disable the callbacks while the pre-load function is running?
ExternalInterface.addCallback("receiveText1", receiveText1);
function receiveText1(value:String):void {
channel.stop();
channel2.stop();
[code]....
View 1 Replies
Nov 1, 2009
One being ... at the moment when a FLVPlayback is imported onto the stage and a user clicks on the exit button before the video it has fully loaded onto the stage, the video keeps loading in the background. I want it to be completely removed and stop loading when the exit button is click... because at the moment it slows the users internet down and the sound also plays in the background when its been fully loaded... The video interface seem to be removed but not the whole thing.
It is also happening to me when I use addChild to load a external JPEG... if the user exits before it is fully loaded to the stage... it keeps loading in the background.[code]...
View 1 Replies
Feb 28, 2008
I'm trying to have an external loaded swf unload when other buttons on the main swf are clicked. i finally managed to get an external swf to load with a button using AS3, now I just can't figure out how to get it to go away when the other buttons on the main swf are clicked. Here is my code so far:
Code: Select allquote4.addEventListener(MouseEvent.MOUSE_DOWN, goquote4);
function goquote4 (e:MouseEvent) {
var loadit = new Loader();
[Code]....
View 6 Replies
May 26, 2009
I have several external loaded with related buttons. However, I want the loaded flv removed when other buttons click. I s there any way to do it?
View 6 Replies
Jan 14, 2011
I have developed a touchscreen application that works perfectly fine except for the memory issue. Basically, the touchscreen app works kinda like a website with navgation on the side and content displaying next to it. I separeate each section into external swfs, and load each one up when it is needed, thinking it would reduce memory used on the pc. But unlike actionscript 2, AS 3 would not remove the external swfs from the memory. You can remove it from the stage and you won't see it, but the swf will still stay in the memory! So... as you navigate through the app, loading up all these external swf, even I do loader.unloadAndStop();, the swf is still there, and they just keep piling up in the memory as you navigate through the app. After leaving the touchscreen for a day or 2, having all these users naviage through it, all the external swfs will just completely consume all the resources and freeze the pc.Also, is it better to develop touchscreen application with actionscript 2 since it doesn't have this pressing memory issue?
View 1 Replies
Apr 16, 2007
Yes I know this topic has been discussed before, and I know that Senocular has a class that does it. But the question is...
1) Why did Adobe remove duplicateMovieClip();?
2) Did they intend to have any similar function? Or did they totally forget about external assets?
3) Is there a "Adobe reccomended" code that will do the same thing? (Not that I've got anything against Senocular :bow : but it'll be nice to know if there's a "certified" way of doing it.
View 2 Replies
Nov 13, 2010
I am loading eight external swfs by way of eight buttons with actionscript to remove the swfs and sound after a new button is clicked. This works fine except that as soon as you get to the frame where the actionscript is all the swfs load at one time on top of each other. I don't want any to load until the button is clicked for the right one. MouseEvent listener works but only after all the swfs have loaded. How do I get the swfs to load only when the buttons are clicked. I can't figure out what I am doing wrong.
[Code]...
View 5 Replies
Jan 7, 2009
I am trying to load an external swf with a number of quotes into an empty movie clip on the home page. then I want it to obviously disappear when nav to any other page.
1) know that you need a loaderEmpty_mc to load the swf into
2) don't know code for how to get it to load on entering the home page
3) don't know how to cdde for leaving the home page and making it disappear
View 3 Replies
Jan 18, 2007
is being returned once the onrelease event happens. the loadmovie works fine but I want to remove
[Code]...
View 3 Replies
Dec 20, 2009
I'm making a game for children where they have to pay money by dragging it on a square. It al works wel only when i pick the first coin of one euro without going over the coin of 2 euro and then pick up a 2 euro coin the one euro disappears. after then it all works fine.i cant remove my duplicate euro's from the stage when i clic on pay here is my code for the euro's the euro's are in a emty movieclip
[code]...
View 2 Replies
Sep 30, 2010
In flash AS3 Do I need remove childs, if I remove the parent itseft? If I remove childs first, then remove the parent object afterall OR If I just remove parent object Will flash take same memory?
View 1 Replies
Jan 8, 2009
do to the lack of good on Kongregate, I have come here =D
if(_root.row2.block1._x == _root.row1.block1._x)
{
_root.row2.block1.removeMovieClip();
[code]....
View 9 Replies
Sep 12, 2009
I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?
View 15 Replies
Oct 9, 2009
Just wondered if I remove a parent movieclip and then set it to null, will it remove all the child movieclips within it from the Display list and also from memory, or do I need to iterate through the parent movieclip removing all its children before removing the parent?
View 8 Replies
Sep 6, 2011
In my experiment memory usage keeps growing a little (more, and more RAM usage after GC) when I use repeatedly:
Code:
removeChild(picContainer);
addChild(picContainer);
[code].....
View 5 Replies