I have 3 files. 2 actionscript files and a html file. I want the image to show up at the 0 X coordinate. It shows up at a non-zero position in the browser (firefox 3.*) after I compile everything with flex SDK and run the html file. BUG with flex? The embedded png image is 1019 pixels wide. What's going on? Attached is a picture of what I see in firefox. I heard there were different types of x values... Content x, stage x, what else am I missing? how do I fix the x to work the way i want it to?
// first file.
public class myblackRectangle extends Sprite
private var rectangleImage:Class;
public function myblackRectangle()
var aSprite= new rectangleImage();
// Adds the sprite defined in first file as a child to this sprite.
public class mycanvas extends Sprite
public function mycanvas()
var aSprite = new myblackRectangle();
aSprite.x = 0; // what the...
//the sprite shows up in
//middle of the swf
aSprite.y = 0;
finally, the basic html embedding stuff.
<object width="1019" height="300">
<param name="movie" value="mycanvas.swf">
<embed src="mycanvas.swf" width="1019" height="300">
Try stage.align = StageAlign.TOP_LEFT
O well. too bad stage isn't global anymore and it throws errors saying it's
Start over from a brand new Flex Project