I can't seem to be able to figure out how to unload a JPG image once I've loaded it so I can load a second JPG in it's place. Here's my code so far (document class, picHolder_mc exists already on the timeline). All that happens is the second JPG being called loads on top of the first.
How can I unload a movie from with in the UI Loader. I have loaded a movie into my UI Loader and there is a go back button And I simply want to unload that movie and return to normal.
I'm coding an xml gallery with thumbnails. Ive set a container for the thumbs and for the main image. when user clicks on a thumb it loads the larger image. Preloaders are done all is well however when the user clicks on a nother thumb it just loads in the image over the last one. How can I cause it to delete the currently displayed image and then load the new one.
would :- removeChild work or do I need to use .unload on the loader?
I am having some issues with my loader. What I have is one loader object that will load 5 different SWF loading xml galleries.It works fine the first time it loads, until I unload it to reload another gallery... then it will display its loading but nothing shows?
Code: var gallery:String=new String ; gallery="web"; var portIDReq:URLRequest=new URLRequest("viewer"+this.gallery+".swf"); var portIDLoader:Loader = new Loader(); portIDLoader.x=0; portIDLoader.y=0; [Code] .....
I have a URLloader that load an xml file, what i need is to be able to clear whats in the loader once the data of my xml has been loaded, is it possible to use unload in the on complete function? for example[code]...
I am building a portfolio gallery, with one loader who loads 5 different .swf which load XML files.Everything work, but once I unloaded it to reload it, it says that its loaded but I dont see anything anymore.I probably tried a 1000 versions, but here is my latest code:[code]
I have used the loader class to play an external .swf file. When it is finished I need to stop it and continue to the next frame in the timeline of the original movie. I can load it and unload it, but how to I unload it after it has played and continue to frame 2 of the timeline?
var myLoader:Loader = new Loader();myLoader.x = 150;myLoader.y = 75; myLoader.load(new URLRequest("movie.swf"));addChild(myLoader); myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete) ; function onComplete(e:Event):void{ myLoader.unload(); this.gotoAndPlay(2);}
With this code, it skips the loaded movie and goes straight to frame 2.
I have load external swf file with loader. The external swf file have animation with embeded mp3 file . when i click the btn unload the external swf file .external swf file is unload ok. But Problam is after few seconds sound is hearing. I think animation still running in backend when reach the first frame sound is hearing.
var ldr:Loader=new Loader()ldr.load(new URLRequest("test.swf")) addChild(ldr) btn.addEventListener(MouseEvent.CLICK,unloadmovie) function unloadmovie(e:MouseEvent){ ldr.unload() SoundMixer.stopAll() }
My code is try { if (MovieClip(this.parent)!=null) { if (MovieClip(this.parent).imagename!=null) { var t=MovieClip(this.parent).imagename; var url:URLRequest=new URLRequest(t); [Code] ..... My loader unload event not calling?
I want to unload my loader when i click the unload button, and to check if it unloaded successfully, i typed a trace command [trace("unloaded")] in the eventListener "EVENT.UNLOAD", but when i click the unload button, it doesn't unload.[code]any help on how to make unload work?
here my code ----------------------------------------------------
if (MovieClip(root).gmapimage!="") { myLoader.contentLoaderInfo.addEventListener(Event. COMPLETE, onLoaderReady); myLoader.contentLoaderInfo.removeEventListener(Eve nt.UNLOAD,unloadHandler); var fileRequest:URLRequest=new URLRequest(MovieClip(root).gmapimage);
[Code].....
i want to remove all object and variable set or remove on Event.UNLOAD event(see my function unloadHandler()) but UNLOAD event not work for me anything wrong...
I have several thumbnails in my portfolio that dynamically load a .png file into the Loader component called myLoader.Followed the tutorial from Kirupa. Simple enough.
When I (user) goes to click on a different client to view different work, artwork from the current client is still loaded, or being shown. I have the same myLoader Loader spread through the frames.I tried to put this
Code: on(press){ unloadMovie("myLoader"); } on each client button to clear the Loader before you go to each section, but that makes it disappear all together, than when you go to click a thumbnail, nothing happens because the Loader is gone.Is there a way to unload the .png files w/o killing the loader? Should I use a separate loader for each client? or will that just get messy.
I dont even know if i got the title right. I am 5 days into actionscript and i have no prior training or experience in programming, flash using or whatever you might need to build a decent site, except for the graphic design part. I do however need to build an online portflio asap and things have been going great
I have a main movie that uses buttons to go to specific frames on the main timeline:
HZWA.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame); function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):voi d { gotoAndStop(5);
I am trying to load external swf's from buttons. I managed to load an external swf from a button, but as a result I can't work out how to get it to unload when other buttons are clicked. Currently In the flash file I have only 2 buttons 'dutrain_b' and 'portfolio_b'. I would like to add many more when the code is working.
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'.
I have a menu on my main page where i can choose some videos to play, these videos are in external SWFs that are loaded in and displayed using Loader, URLrequest etc.. etc..
I have a close button on my external swf that sends a dispatchEvent to an eventListener on my homepage to close the external SWF however the sound from the video in the external swf is still audible even though the visual is gone
heres the code
main page code Code: Select all function playVideo(e:MouseEvent):void{ //stop maipage sound channel.stop();
I have an application on FMS. When a user connect to FMS it will create an application instance. My question is that if all users that connect to it disconnect the instance will be unload automatically?
I have a question about assigning instance names. How do I set a Loader's instance name so I can refer to it outside of the function (without using event.target or event.currentTarget or event.target.name)? Here's an example...I'm writing this on the fly...
Through searching the various forums I have found that Loaders are not dynamic and hence you can not apply custom properties to each instance of them. I miss the old way (as2 way of attachingMovieClip) that you load dynamic content, at least you can apply custom properties, and you can always reference them for each object.What I'm trying to do is load a group of Images via XML. Each one of those images have a set of information that is associated with them (name, description, etc). I have the images loading in and positioning just fine, however when trying to have a tooltip show the name on Mouse Over, I'm not able to achieve this.
In short. I want to be able to store information for each item so that I can access it. Is there a way to do this in AS3 with a Loader or is there another route I can go? If I do this with Arrays, how do I store the Index of the specific item so I can use that in reference to the position in each array?** Should I use getChildIndex() in the function for the Event Listener to reference the data stored in the arrays for each item? If so, how do I do so? ***
PHP Code: num = 0;var titleArray:new Array();function createImage(){ var thumb:Loader = new Loader; thumb.load(new URLRequest(url);
I have a small issue with instantiation of an xml loader class. I'm using a standard way of loading external data and assigning it to "myXML" variable. My class uses event.COMPLETE for loader to make sure that data is fully loaded. Everything works fine until I make an instance of this variable in to my Main() class. The trace of "myXML" gives me null. It's like it didn't assign data on time. Since the onComplete event handler should take care of any delays it is hard for me to figure this out.
I have a shell swf that is loading a swf. How do you have the loaded swf tell the parent loader to unload itself after the loaded swf finishes playing?
I'm loading some external assets with the Loader class. I've done this a lot over the years, but seem to be coming across a problem I haven't had before. I want to display two instances on the stage at the same time of a .png I'm loading externally. If I use the Loader instance's contentLoaderInfo.content object in more than one sprite, the bitmap just "moves" from the first instantiated sprite to the second. I've tried duplicating the sprite with Senocular's duplicateDisplayObject class, but for some reason, it's not working right. But shouldn't I be able to use multiple instances of an imported bitmap like this just as if it were in the library of the .fla? If so, what do I need to do?