You need to add an event listener for when the image load is complete.
package {
import flash.display*;
import flash.events.*;
import flash.net.*;
import flash.geom.*;
public class WholeImage extends Sprite
{
private var backLoader:Loader;
public function WholeImage()
{
backLoader = new Loader();
backLoader.addEventListener(Event.COMPLETE,
onImageComplete);
backLoader.load(new
URLRequest("http://leftandrightsolutions.com/
backy1.jpg"));
}
private function onImageComplete(event:Event):void
{
backLoader.x = -200;
backLoader.y = 0;
addChild(backLoader);
}
}
}
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gustavo
Duenas
Sent: Saturday, June 16, 2007 7:15 PM
To: [email protected]
Subject: [Flashcoders] help with a thread in cs3
hi coders I have this code and I'd like to have the loader to some
new size but thing are not going as expected, the code is:
package {
import flash.display.Sprite;
import flash.display.*;
import flash.events.*;
import flash.accessibility.*;
import com.adobe.viewsource.ViewSource;
import flash.net.*;
import flash.geom.*;
import flash.text.*;
import flash.net.URLRequest;
import flash.net.*;
public class wholeImage1 extends Sprite
{
public function wholeImage1()
{
//inserting image as background;
var backLoader:Loader = new Loader();
backLoader.load(new
URLRequest("http://leftandrightsolutions.com/
backy1.jpg"));
backLoader.x=-200;
backLoader.y=0;
addChild(backLoader);
}
}
}
I want to do something like this backloader.width= 1440;
backloader.height=600;
and when I finally used it doesn't work, you know how could do I?
Regards
Gustavo Duenas
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com