Scene 1, Layer 'as', Frame 1, Line 24 1050: Cannot assign to a non-reference value.
I'm trying to make a flash site with that automatically resizes to fit the users browser. the code i used is :
function init()
{
stage.align=StageAlign.TOP_LEFT;
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, updateSize);
stage.dispatchEvent(new Event(Event.RESIZE));
myBackground.x = 0;
myBackground.y = 0;
}
init();
function updateSize(e:Event)
{
myBackground.width = stage.stageWidth;
myBackground.height = stage.stageHeight;
myContent.x = stage.stageWidth/2 = myContent.width/2;
myContent.y = stage.stageHeight/2 = myContent.height/2;
}
******i keep getting the error "cannot assign to a non-reference value.*******