Flex doesn't work the way it should

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.

package
{
// first file.
import flash.display.Sprite;
import flash.display.Bitmap;
[SWF(width=“1019”, height=“15”)]
public class myblackRectangle extends Sprite
{
[Embed(source=“images/mybar.png”)]
private var rectangleImage:Class;

    public function myblackRectangle()
    {
    var aSprite= new rectangleImage();
    addChild(aSprite);
    }
}

}

package
{
// Adds the sprite defined in first file as a child to this sprite.
import flash.display.Sprite;
import myblackRectangle;

public class mycanvas extends Sprite
{
    public function mycanvas()
    {

       var aSprite = new myblackRectangle();
       aSprite.x = 0;   // WTFreak is going on? 
                           //the sprite shows up in                           
                            //middle of the swf
       aSprite.y = 0; 
        addChild(aSprite);
    }
}

}

finally, the basic html embedding stuff.

<html>

<head>

</head>

<body>
<object width=“1019” height=“300”>
<param name=“movie” value=“mycanvas.swf”>
<embed src=“mycanvas.swf” width=“1019” height=“300”>
</embed>
</object>
</body>

</html>