This content has been marked as final. Show 11 replies
You know I haven't tried this in AS3 (which I gather from stage.stageWidth instead of Stage.width) and even then I'm no expert on this, but…
Have you gone into your publish settings and change the HTML setting to left top? Or there might be some way of setting that through the code in AS3?
Again, I'm not really clear on all this, having not yet done it in AS3. Just some ideas…
Say, I'm not up with AS3 yet either, but it occured to me ... isn't this what the Stage is suppose to do? From your discription above, it seems as though the Stage did not 'resize' which is just what it's suppose to do, stay the same size and become 'placed' in the center of the window? You'd said that trace the mouse coordinates gives negative values on the left and greater values on the right than the width of the original Stage ... that's how it should be right.
It seems like the actual 'size' of the Stage should only be changed when implementing the onResize method. Not sure but it seems ...
just some thoughts :)
Actually I'm not in html at this point. I'm testing the movie in the Flash environment and using the Flash Player. The stage DOES resize because the stageWidth property changes.
The problem is as I move objects around the screen I keep them visible by limiting their movement to between 0,0 and the stageWidth. the 0,0 point isn't the top left then all of the other calculations are off and my objects are all shifted down and to the right, going off of the stage.
Interesting, this must be a AS3 thing. The way I understand it (and I've only just begun to do my reading) is that the Stage is now treated as a DisplayObject or something like that, so then it's interesting that it resizes to the whole visible area, kind of handy really. Maybe you could use an onResize handler to control the 'Stage' size limiting it the size you want and centering it with the display area?
Again, just thoughts :P
I'm pretty sure I've always experienced this in the testing environment and/or if you plan on publishing to a projector.
Yes the stage does resize, clbeech, the onResize handler just allows you to add code that responds to the event. The event happens and the handler responds.
KinseyFobes, if the final target for this is a website then you will have to test in that environment to make sure it is working. if you plan on directly using a swf or projector you will have to do some math.
Whenever I've done stuff in as2 I think I used
These properties still appear to exist for the stage from a quick glance at the as3 docs.
I've never experienced exactly what you describe, but I'd perhaps the "TL" part might be important.
very good, and it's not that I don't buy into that RR, but this does seem to go to the OPs point. It seems odd that items fixed to a position relative tot he original Stage size as set in the Authoring tool, do not change position relative to the 'new' stage size, and mouse coordinates do in fact show negative and positive values that are related to the size of the original stage.
So how can it be that the actual 'size' of the Stage changes, yet items positioned to it remain. is there something similar to what's going on in AS3, happening in the background of AS2?
Here is a quick example of what I'm saying here, that things remain positioned correctly in relation to the 'original' Stage size and values, but when maximized change thier 'real' cooridnates, but don't register the new system to the mouse.
I dunno if that makes sense, here's a test file: FLA
GWD was VERY close! I had already been using stage.scaleMode=StageScaleMode.NO_SCALE; but I hadn't used the stage.align property. After including stage.align=StageAlign.TOP_LEFT; everything resolved itself.
Thanks for everyones responses
Good to hear.
StageAlign.TOP_LEFT == "TL" and StageScaleMode.NO_SCALE=="noScale"
they're just new constants included in as3 for those values.
Also make sure you're referencing stage with a lowercase "s" and not the Class name with an uppercase "S". This is true for AS3 not AS2.
bingo! great GWD and RR, this is great to know, I guess this may have been causing some of the issues I'd run into in the past also, LOL!!! :)