Created
April 17, 2013 14:23
-
-
Save fenixkim/5404711 to your computer and use it in GitHub Desktop.
El siguiente ejemplo demuestra como cargar una imagen externa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Dependencias | |
// http://code.goto.com.co | |
// http://tweenmax.com | |
import com.goto.display.ImageView; | |
import flash.events.Event; | |
var ic:ImageView = new ImageView(); | |
//ic.showMask = true; | |
ic.source = "http://fc08.deviantart.net/fs71/f/2013/106/9/8/i_am_so_confused_by_woxys-d61y6ri.jpg"; | |
ic.width = stage.stageWidth; | |
ic.height = stage.stageHeight; | |
ic.scaleMode = "fitToWidthAndHeight"; // ó full | |
//ic.align = "topLeft"; // ó topRight, bottomLeft, bottomRight ... etc | |
this.addChild(ic); | |
// | |
// El código siguiente detecta cuando la película de flash se reescala | |
// | |
stage.align = "topLeft"; | |
stage.addEventListener(Event.RESIZE, onResize); | |
function onResize(event:Event) | |
{ | |
ic.width = stage.stageWidth; | |
ic.height = stage.stageHeight; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment