Copy link to clipboard
Copied
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.*******
Well you will need to determine what you want to be the basis for defining the sizes and assign each separately.
You cannot have: "something = an equation = an equation" like you have
(curious - does your iPhone automatically tag on that 'Sent from' blurb?)
Copy link to clipboard
Copied
Whatever you are trying to do with these lines needs to be undone...
myContent.x = stage.stageWidth/2 = myContent.width/2;
myContent.y = stage.stageHeight/2 = myContent.height/2;
Copy link to clipboard
Copied
Hi,
I was trying to have the background and content resize to fit the user browser (fluid)... I think I can just use the "myBackground" code and wrap everything into that movie clip...
I didn't think it would be this frustrating...
Sent from my iPhone
Copy link to clipboard
Copied
Well you will need to determine what you want to be the basis for defining the sizes and assign each separately.
You cannot have: "something = an equation = an equation" like you have
(curious - does your iPhone automatically tag on that 'Sent from' blurb?)