Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
//create a new loader this.loader = new Loader(); //tell the loader where to find the picture this.loader.load("http://somewebsite.com/image.png"); //when the loader finishes loading, call the function 'onLoadComplete' this.loader.addEventListener(Event.COMPLETE, onLoadComplete); //=================================================== public function onLoadComplete(event:Event):void { //adds the image to a movieclip container //=================================================== //create movie clip container var thumbnail:MovieClip = new MovieClip(); //add image to container thumbnail.addChild(this.loader); }
This paste will be private.
From the Design Piracy series on my blog: