Wednesday, 27 April 2016

LOAD UNLOAD IMAGE SWF FILE IN MOVIE CLIP SYMBOL AS2 AS3

LOAD UNLOAD  IMAGE SWF FILE IN MOVIE CLIP SYMBOL AS2


-----------------------------------------------------------------------------------------------------------------
CODES:
https://www.youtube.com/watch?v=n6foNFLDnT8
http://www.lashf.com/page/actionscript/loading_ext_file
http://www.developingwebs.net/flash/loadmovietemplate.php
----------------------------------------------------------------------------------------------------------------

LOAD MOVIE ON STAGE AS2 //INSERT BUTTON CODE //LOAD MOVIE ON STAGE on (release) { loadMovie("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOSWfQ_SA0uBPCfbADIfUJhRAJRvme7xqY7Zsoz79OLGxV13USvQbduDd3f265K5go0MYWh1QE8-EvqJfI0XWMJwzxxjEK2Is2KWezsyUMDCcG5NXGyTMiDv3xPksi6e0uQQZs2IM0Bx21/s1600/0.png",1); } ------------------------------------------------------------------------------------------------------------------------------------ //OR USE THIS METHOD BY FRAME BN1.onPress = function(){ loadMovie("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOSWfQ_SA0uBPCfbADIfUJhRAJRvme7xqY7Zsoz79OLGxV13USvQbduDd3f265K5go0MYWh1QE8-EvqJfI0XWMJwzxxjEK2Is2KWezsyUMDCcG5NXGyTMiDv3xPksi6e0uQQZs2IM0Bx21/s1600/0.png",1); } --------------------------------------------------------------------------------------------------------------------------------- HOW LOAD SWF FILE IN MOVIE CLIP SYMBOL "Mc" http://www.lashf.com/page/actionscript/loading_ext_file http://www.lashf.com/swfs/load_function.swf --------------------------------------------------------------------------------------------------------------------------------- //MAKE MOVIE CLIP GIVE INSTANCE NAME Mc FOR SWF //PASTE CODE Mc.loadMovie("http://www.lashf.com/swfs/load_function.swf"); //OR PASTE THIS CODE loadMovie("http://www.lashf.com/swfs/load_function.swf","Mc"); //OR USE THIS CODE FOR IMAGE loadMovie("http://www.lashf.com/images/lashf_logo3.jpg","Mc"); //OR USE THIS CODE FOR LOAD OR UNLOAD IMAGE Bn1.onPress = function(){ loadMovie("http://www.lashf.com/images/lashf_logo3.jpg","Mc"); } Bn2.onPress = function(){ unloadMovie("Mc"); } //OR USE THIS CODE FOR SWF FILES Bn1.onPress = function(){ loadMovie("http://www.lashf.com/swfs/load_function.swf","Mc"); } Bn2.onPress = function(){ unloadMovie("Mc"); }
---------------------------------------------------------------------------------------------------------------------------------------------------------------
HOW SNIPPET BOX OPEN IN AS2
HOW TARGET BOX OPEN IN AS2
https://books.google.co.uk/books?id=yIErBgAAQBAJ&pg=PA57&lpg=PA57&dq=HOW+TARGET+BOX+OPEN+IN+AS2&source=bl&ots=EeihuYNbGS&sig=0QzQRiUJyOaCzqhJwqjgKyKaEAQ&hl=en&sa=X&ved=0ahUKEwjxzISrjbHMAhUMC8AKHXaQAo4Q6AEIJjAB#v=onepage&q=HOW%20TARGET%20BOX%20OPEN%20IN%20AS2&f=false
---------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------
OTHERS CODES AND LINKS
---------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------ https://www.youtube.com/watch?v=asY60x5f30I&feature
https://www.youtube.com/watch?v=n6foNFLDnT8 ------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------ http://flashcollege.blogspot.co.uk/2016/04/load-unload-image-swf-file-in-movie.html http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118ccf9c47f-7fd3.html http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118ccf9c47f-7d29.html http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118ccf9c47f-7f9e.html http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118ccf9c47f-7ff3.html ------------------------------------------------------------------------------------------------------------------------------------ Bn1.onPress = function(){ //MAKE MOVIE GIVE INSTANCE NAMES "Mc" //THIS METHOD USE FOR LOCAL SWF FILES UPLOAD //FOR THIS METHOD EXOPRT YOUR SWF FILE IN A FOLDER //AND SAVE YOUR FLA FILE IN THIS SWF FOLDER loadMovie("Untitled-1.swf","Mc"); } Bn2.onPress = function(){ unloadMovie("Mc"); } ------------------------------------------------------------------------------------------------------------------------------------ LOAD MOVIE ON STAGE AS2 //INSERT BUTTON CODE //LOAD MOVIE ON STAGE on (release) { loadMovie("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOSWfQ_SA0uBPCfbADIfUJhRAJRvme7xqY7Zsoz79OLGxV13USvQbduDd3f265K5go0MYWh1QE8-EvqJfI0XWMJwzxxjEK2Is2KWezsyUMDCcG5NXGyTMiDv3xPksi6e0uQQZs2IM0Bx21/s1600/0.png",1); } ------------------------------------------------------------------------------------------------------------------------------------ //OR USE THIS METHOD BY FRAME BN1.onPress = function(){ loadMovie("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOSWfQ_SA0uBPCfbADIfUJhRAJRvme7xqY7Zsoz79OLGxV13USvQbduDd3f265K5go0MYWh1QE8-EvqJfI0XWMJwzxxjEK2Is2KWezsyUMDCcG5NXGyTMiDv3xPksi6e0uQQZs2IM0Bx21/s1600/0.png",1); } --------------------------------------------------------------------------------------------------------------------------------- HOW LOAD SWF FILE IN MOVIE CLIP SYMBOL "Mc" http://www.lashf.com/page/actionscript/loading_ext_file http://www.lashf.com/swfs/load_function.swf --------------------------------------------------------------------------------------------------------------------------------- //MAKE MOVIE CLIP GIVE INSTANCE NAME Mc FOR SWF //PASTE CODE Mc.loadMovie("http://www.lashf.com/swfs/load_function.swf"); //OR PASTE THIS CODE loadMovie("http://www.lashf.com/swfs/load_function.swf","Mc"); //OR USE THIS CODE FOR IMAGE loadMovie("http://www.lashf.com/images/lashf_logo3.jpg","Mc"); //OR USE THIS CODE FOR LOAD OR UNLOAD IMAGE Bn1.onPress = function(){ loadMovie("http://www.lashf.com/images/lashf_logo3.jpg","Mc"); } Bn2.onPress = function(){ unloadMovie("Mc"); } //OR USE THIS CODE FOR SWF FILES Bn1.onPress = function(){ loadMovie("http://www.lashf.com/swfs/load_function.swf","Mc"); } Bn2.onPress = function(){ unloadMovie("Mc"); } ------------------------------------------------------------------------------------------------------------------------------------ var pic_mcl:MovieClipLoader = new MovieClipLoader(); pic_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg", this.createEmptyMovieClip("pic_mc", this.getNextHighestDepth())); var listenerObject:Object = new Object(); listenerObject.onLoadInit = function(target_mc) { target_mc.onRelease = function() { unloadMovie(pic_mc); /* o podría utilizar lo siguiente, que se refiere al clip de película al que 'target_mc' hace referencia. */ //unloadMovie(this); }; }; pic_mcl.addListener(listenerObject); ------------------------------------------------------------------------------------------------------------------------------------ var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth()); mc.onRelease = function():Void { trace(this.image._url); // http://www.w3.org/Icons/w3c_main.png } var image:MovieClip = mc.createEmptyMovieClip("image", mc.getNextHighestDepth()); image.loadMovie("http://www.w3.org/Icons/w3c_main.png"); ------------------------------------------------------------------------------------------------------------------------------------ var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth()); mc.onRelease = function():Void { trace(this.image._url); // http://www.w3.org/Icons/w3c_main.png } var image:MovieClip = mc.createEmptyMovieClip("image", mc.getNextHighestDepth()); image.loadMovie("http://www.w3.org/Icons/w3c_main.png"); ------------------------------------------------------------------------------------------------------------------------------------ Example The following example attaches two instances of a symbol with the linkage identifier "circle" to a movie clip instance on the Stage: this.attachMovie("circle", "circle1_mc", this.getNextHighestDepth()); this.attachMovie("circle", "circle2_mc", this.getNextHighestDepth(), {_x:50, _y:50}); ------------------------------------------------------------------------------------------------------------------------------------ Example The following example creates a new movie clip called myClip_mc and duplicates the movie clip. The second movie clip is called newClip_mc. Images are loaded into both movie clips. When a button, button_mc, is clicked, the duplicated movie clip is removed from the Stage. this.createEmptyMovieClip("myClip_mc", this.getNextHighestDepth()); myClip_mc.loadMovie("http://www.helpexamples.com/flash/images/image1.jpg"); duplicateMovieClip(this.myClip_mc, "newClip_mc", this.getNextHighestDepth()); newClip_mc.loadMovie("http://www.helpexamples.com/flash/images/image1.jpg"); newClip_mc._x = 200; this.button_mc.onRelease = function() { removeMovieClip(this._parent.newClip_mc); }; ------------------------------------------------------------------------------------------------------------------------------------ LOAD MOVIE ON STAGE AS2 //INSERT BUTTON CODE //LOAD MOVIE ON STAGE on (release) { loadMovie("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOSWfQ_SA0uBPCfbADIfUJhRAJRvme7xqY7Zsoz79OLGxV13USvQbduDd3f265K5go0MYWh1QE8-EvqJfI0XWMJwzxxjEK2Is2KWezsyUMDCcG5NXGyTMiDv3xPksi6e0uQQZs2IM0Bx21/s1600/0.png",1); } ------------------------------------------------------------------------------------------------------------------------------------ //OR USE THIS METHOD BY FRAME BN1.onPress = function(){ loadMovie("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOSWfQ_SA0uBPCfbADIfUJhRAJRvme7xqY7Zsoz79OLGxV13USvQbduDd3f265K5go0MYWh1QE8-EvqJfI0XWMJwzxxjEK2Is2KWezsyUMDCcG5NXGyTMiDv3xPksi6e0uQQZs2IM0Bx21/s1600/0.png",1); } --------------------------------------------------------------------------------------------------------------------------------- HOW LOAD SWF FILE IN MOVIE CLIP SYMBOL "Mc" http://www.lashf.com/page/actionscript/loading_ext_file http://www.lashf.com/swfs/load_function.swf --------------------------------------------------------------------------------------------------------------------------------- //MAKE MOVIE CLIP GIVE INSTANCE NAME Mc FOR SWF //PASTE CODE Mc.loadMovie("http://www.lashf.com/swfs/load_function.swf"); //OR PASTE THIS CODE loadMovie("http://www.lashf.com/swfs/load_function.swf","Mc"); //OR USE THIS CODE FOR IMAGE loadMovie("http://www.lashf.com/images/lashf_logo3.jpg","Mc"); //OR USE THIS CODE FOR LOAD OR UNLOAD IMAGE Bn1.onPress = function(){ loadMovie("http://www.lashf.com/images/lashf_logo3.jpg","Mc"); } Bn2.onPress = function(){ unloadMovie("Mc"); } //OR USE THIS CODE FOR SWF FILES Bn1.onPress = function(){ loadMovie("http://www.lashf.com/swfs/load_function.swf","Mc"); } Bn2.onPress = function(){ unloadMovie("Mc"); }
-------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------ http://flashcollege.blogspot.co.uk/2016/04/load-unload-image-swf-file-in-movie.html http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118ccf9c47f-7fd3.html http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118ccf9c47f-7d29.html http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118ccf9c47f-7f9e.html http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118ccf9c47f-7ff3.html ------------------------------------------------------------------------------------------------------------------------------------ Bn1.onPress = function(){ //MAKE MOVIE GIVE INSTANCE NAMES "Mc" //THIS METHOD USE FOR LOCAL SWF FILES UPLOAD //FOR THIS METHOD EXOPRT YOUR SWF FILE IN A FOLDER //AND SAVE YOUR FLA FILE IN THIS SWF FOLDER loadMovie("Untitled-1.swf","Mc"); } Bn2.onPress = function(){ unloadMovie("Mc"); } ------------------------------------------------------------------------------------------------------------------------------------ LOAD MOVIE ON STAGE AS2 //INSERT BUTTON CODE //LOAD MOVIE ON STAGE on (release) { loadMovie("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOSWfQ_SA0uBPCfbADIfUJhRAJRvme7xqY7Zsoz79OLGxV13USvQbduDd3f265K5go0MYWh1QE8-EvqJfI0XWMJwzxxjEK2Is2KWezsyUMDCcG5NXGyTMiDv3xPksi6e0uQQZs2IM0Bx21/s1600/0.png",1); } ------------------------------------------------------------------------------------------------------------------------------------ //OR USE THIS METHOD BY FRAME BN1.onPress = function(){ loadMovie("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOSWfQ_SA0uBPCfbADIfUJhRAJRvme7xqY7Zsoz79OLGxV13USvQbduDd3f265K5go0MYWh1QE8-EvqJfI0XWMJwzxxjEK2Is2KWezsyUMDCcG5NXGyTMiDv3xPksi6e0uQQZs2IM0Bx21/s1600/0.png",1); } --------------------------------------------------------------------------------------------------------------------------------- HOW LOAD SWF FILE IN MOVIE CLIP SYMBOL "Mc" http://www.lashf.com/page/actionscript/loading_ext_file http://www.lashf.com/swfs/load_function.swf http://webwasp.co.uk/tutorials/b55-load/index.php --------------------------------------------------------------------------------------------------------------------------------- //MAKE MOVIE CLIP GIVE INSTANCE NAME Mc FOR SWF //PASTE CODE Mc.loadMovie("http://www.lashf.com/swfs/load_function.swf"); //OR PASTE THIS CODE loadMovie("http://www.lashf.com/swfs/load_function.swf","Mc"); //OR USE THIS CODE FOR IMAGE loadMovie("http://www.lashf.com/images/lashf_logo3.jpg","Mc"); //OR USE THIS CODE FOR LOAD OR UNLOAD IMAGE Bn1.onPress = function(){ loadMovie("http://www.lashf.com/images/lashf_logo3.jpg","Mc"); } Bn2.onPress = function(){ unloadMovie("Mc"); } //OR USE THIS CODE FOR SWF FILES Bn1.onPress = function(){ loadMovie("http://www.lashf.com/swfs/load_function.swf","Mc"); } Bn2.onPress = function(){ unloadMovie("Mc"); } ------------------------------------------------------------------------------------------------------------------------------------ var pic_mcl:MovieClipLoader = new MovieClipLoader(); pic_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg", this.createEmptyMovieClip("pic_mc", this.getNextHighestDepth())); var listenerObject:Object = new Object(); listenerObject.onLoadInit = function(target_mc) { target_mc.onRelease = function() { unloadMovie(pic_mc); /* o podría utilizar lo siguiente, que se refiere al clip de película al que 'target_mc' hace referencia. */ //unloadMovie(this); }; }; pic_mcl.addListener(listenerObject); ------------------------------------------------------------------------------------------------------------------------------------ var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth()); mc.onRelease = function():Void { trace(this.image._url); // http://www.w3.org/Icons/w3c_main.png } var image:MovieClip = mc.createEmptyMovieClip("image", mc.getNextHighestDepth()); image.loadMovie("http://www.w3.org/Icons/w3c_main.png"); ------------------------------------------------------------------------------------------------------------------------------------ var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth()); mc.onRelease = function():Void { trace(this.image._url); // http://www.w3.org/Icons/w3c_main.png } var image:MovieClip = mc.createEmptyMovieClip("image", mc.getNextHighestDepth()); image.loadMovie("http://www.w3.org/Icons/w3c_main.png"); ------------------------------------------------------------------------------------------------------------------------------------ Example The following example attaches two instances of a symbol with the linkage identifier "circle" to a movie clip instance on the Stage: this.attachMovie("circle", "circle1_mc", this.getNextHighestDepth()); this.attachMovie("circle", "circle2_mc", this.getNextHighestDepth(), {_x:50, _y:50}); ------------------------------------------------------------------------------------------------------------------------------------ Example The following example creates a new movie clip called myClip_mc and duplicates the movie clip. The second movie clip is called newClip_mc. Images are loaded into both movie clips. When a button, button_mc, is clicked, the duplicated movie clip is removed from the Stage. this.createEmptyMovieClip("myClip_mc", this.getNextHighestDepth()); myClip_mc.loadMovie("http://www.helpexamples.com/flash/images/image1.jpg"); duplicateMovieClip(this.myClip_mc, "newClip_mc", this.getNextHighestDepth()); newClip_mc.loadMovie("http://www.helpexamples.com/flash/images/image1.jpg"); newClip_mc._x = 200; this.button_mc.onRelease = function() { removeMovieClip(this._parent.newClip_mc); };
------------------------------------------------------------------------------------------------------------------------------------
IMAGE LOAD UNLOAD AS3

http://www.flashandmath.com/intermediate/swfload/unloading.html
https://www.youtube.com/watch?v=TuqKkUOEfXs&spfreload=5
https://www.kirupa.com/forum/showthread.php?342725-2-swf-file-communication-with-as3-problem
http://www.animatedimages.org/cat-a-bugs-life-1027.htm
------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------
MAKE SURE SWF AND FLA FILE IN SAME FOLDER
------------------------------------------------------------------------------------------------------------------------------------
//ONLY PASTE CODE FRAMENO:1 NO NEED ANY BTN&MOVIE SYMBOL var myLoader:Loader=new Loader(); myLoader.load(new URLRequest("Child.swf")); addChild(myLoader); function UNLOADFUNCTION():void{ myLoader.unload(); }
------------------------------------------------------------------------------------------------------------------------------------
//ONLY PASTE CODE FRAMENO:1 NO NEED ANY BTN&MOVIE SYMBOL var myLoader:Loader=new Loader(); //OR USE IMAGE SIZE 120 X120 EQUAL TO STAGE SIZE myLoader.load(new URLRequest("http://thumbs.dreamstime.com/m/lucky-number-seven-green-white-toy-wooden-building-block-yellow-background-image-has-been-enhanced-creative-48890025.jpg")); addChild(myLoader); function UNLOADFUNCTION():void{ myLoader.unload(); }
-----------------------------------------------------------------------------------------------------------------------------------------------
OR USE THIS CODE WITH TOW BUTTONS
//MAKE BUTTON GIVE INSTANCE NAMES LoadBTN,UnloadBTN
//BUTTON TEXT SIZE 15 PT, TIMES NEW ROMAN REGUALR
-----------------------------------------------------------------------------------------------------------------------------------------------



----------------------------------------------------------------------------------------------------------------------------------
CODE:
----------------------------------------------------------------------------------------------------------------------------------
//ONLY PASTE CODE FRAMENO:1 NO NEED ANY BTN&MOVIE SYMBOL
var myLoader:Loader=new Loader();
//OR USE IMAGE SIZE 120 X120 EQUAL TO STAGE SIZE
addChild(myLoader);
function UNLOADFUNCTION():void{
myLoader.unload();
}

LoadBTN.addEventListener(MouseEvent.CLICK,Load);
function Load(evt:MouseEvent):void{
myLoader.load(new URLRequest("http://thumbs.dreamstime.com/m/lucky-number-seven-green-white-toy-wooden-building-block-yellow-background-image-has-been-enhanced-creative-48890025.jpg"));
}

UnloadBTN.addEventListener(MouseEvent.CLICK,Unload);
function Unload(evt:MouseEvent):void{
myLoader.unload();
}


EmoticonEmoticon