daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import flash.display.Loader;
  3. import flash.net.URLLoader;
  4. import flash.net.URLRequest;
  5.  
  6. private var pathTo:String = new String("asket");
  7. private function imgLoader(id:String):void {
  8.     if (id=="back") {
  9.         var ldr:URLLoader = new URLLoader(new URLRequest("./"+pathTo+"/back.png"));
  10.         ldr.addEventListener(Event.COMPLETE, imgLoad);
  11.     } else {
  12.         var ldr:URLLoader = new URLLoader(new URLRequest("./"+pathTo+"/front.png"));
  13.         ldr.addEventListener(Event.COMPLETE, imgLoad);
  14.     }
  15. }
  16. private function txtLoader():void {
  17.     var txtLdr:URLLoader = new URLLoader(new URLRequest("./"+pathTo+"/desc.html"));
  18.     txtLdr.addEventListener(Event.COMPLETE, onLoad);
  19. }
  20. private function onLoad(e:Event):void {
  21.     description.htmlText = e.target.data;
  22. }
  23. private function imgLoad(e:Event):void {
  24.     pic.source = e.target.data;
  25. }
RAW Paste Data
Top