Flash Tutorial: Dynamically Load External Images SWFs AS3
Flash Tutorials
8th Mar 2010
25 Comments »
Model: Beatriz Brazil Website: beatrizbrazil.weebly.com Check her out guys! A big thank you to Beatriz for the images! Welcome to this tutorial! Today we are going to take a look at Loading Images and SWF files that are not actually in your Flash document dynamically using Actionscript 3.0. This can be especially useful if you are creating a website or gallery with a lot of content as it gives your website user control over what actually gets loaded. Enjoy! Twitter! www.twitter.com Be sure to check out www.tutvid.com Check out the blog @ http


Question:
I have a loader(movieclip instance) of 264px widht by 164pxheight. When I load a .jpg of the same size there´s no problem at all, but when i load a larger image the movie clip(loader) resizes to the image size.
¿How can i fix this?
can you load a swf that is in as 2.0 onto an as 3.0 flash site???
Very good tutorial. Is there a way to have AS cut the picture in such a way that it fits in the box i’ve drawn?
Ok, all the people saying “omg I just wanted the code” Nate is showing people who may not be as confident the whole process. Purchase any training material on the internet and it will be the same format. Well done nate – keep it up
you could have just jump to the first screen where you see an AS window man…. I think this was realy understandable for newbies….
Lets see you do better! Fuck wit
Guess what? Fuck you!
this tutorial sucks ass who ever made this must have donkey shit for brains
function unclickFirst(event:MouseEvent):void{
imageArea1.removeChild(img1Loader);
}
var img1Request:URLRequest = new URLRequest(“pic1.jpg”);
var img1Loader:Loader = new Loader ();
load_1mc.addEventListener(MouseEvent.CLICK, clickFirst);
load_2mc.addEventListener(MouseEvent.CLICK, unclickFirst);
function clickFirst(event:MouseEvent):void{
img1Loader.load(img1Request);
img1Loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadNowFirst);
function loadNowFirst(event:Event):void{
imageArea1.addChild(img1Loader);
}
}
Hey, I’m working on creating a simple portfolio site for my Community Studies but I’m having some trouble with this tutorial. I’m using Adobe Flash Pro CS3 and when I wrote my code, i got:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at Portfoliopage_fla::MainTimeline/unclickFirst()
Help! I’ll post my script!
how can i load another jpg file or swf file when i click another button to show another movie clip in the same box which is _1.. can you help me.. this vid is so helpfull to me… thanks a lot … from davao city philippines… i hope you will give tutorial for my question….
AS3 sucks… what used to take seconds with AS2, now takes hours. thanks alot adobe ass.
narrator in this video is trying to sound like andrew kramer. what a fucking poser. you spend the first 15 minutes designing when all i wanted to know as the code to load external swf.
That model is hot.
maxmanpop: check your output box.. something is wrong in your script
PERVERT LOL J/K
very cool Tut… btw i love you voice! =)
Great vid, just like all the others…. but im having one problem, when I test it the button is flashing and showing many other buttons like a drop down menu, whats wrong?
so, what is your script?
ya i did and it give me this error
Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type.
with what program did u make the intro?
just replace the 1.jpg to index.html or index.php
can you load web page like .php, .css, .html …. in this. if yes the how
actionscript confuses me!