Novo

Forum kao aplikacija na telefonu

Dodajte forum na početni ekran i koristite ga kao aplikaciju, sa menijem na dnu ekrana.

  • 1 odgovor
  • 1.872 pregleda

Najnovija ↓

Eksterni jpg iz xml-a 04.08.2009. u 00:44 · pre 209 meseci #1
Gde gresim pa dobijam:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

Code:

import flash.events.Event;
import flash.display.*;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.display.Loader;
var loader:URLLoader = new URLLoader();
var req:URLRequest=new URLRequest("http://212.200.70.5/Sunset/testxy.xml");
loader.load(req);
loader.addEventListener(Event.COMPLETE, onComplete);
function onComplete(ev:Event):void {
var myxml:XML=new XML(ev.target.data);
myxml.ignoreWhitespace=true;
var imageURLRequest:URLRequest=new URLRequest(myxml);
var myImageLoader:Loader = new Loader();
myImageLoader.load(imageURLRequest);
myImageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
function imageLoaded(e:Event):void {
    var myBitmapData:BitmapData=new BitmapData(myImageLoader.width,myImageLoader.height);
    myBitmapData.draw(myImageLoader);
    var myBitmap:Bitmap=new Bitmap  ;
    myBitmap.bitmapData=myBitmapData;
      myBitmap.width = 415;
    myBitmap.height = 315;
    myBitmap.y = -150;
    myBitmap.x = -150;
    addChild(myBitmap);
    }
}
Re: Eksterni jpg iz xml-a 04.08.2009. u 09:58 · pre 209 meseci #2
Resio sam:

parsiranje nije dobro odradjeno, trebalo je ovako
Code:

var imageURLRequest:URLRequest=new URLRequest(myxml.img.pic);
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme