简体   繁体   中英

how to set object in middle of the screen in flash (AS3)

I am new in flash developer. I want to set my frame at the center of the screen interdependent of screen size . but we are working on full screen view (means stage.scaleMode = StageScaleMode.EXACT_FIT ).

Logically I want one background image at back side, which cover all part of the screen, and on that background image I want to set my frame image at center of screen with fix size of (1000 X 750 px).

Thank You.

George Profenza is absolutely right, you need to set StageScaleMode.NO_SCALE in as3 or add parameter in html like this

var so = new SWFObject("swf/sample.swf", "sample", "100%", "100%", "10");

so.addParam("scale", "noscale");
so.addParam("salign", "TOP_LEFT");
so.write("flashcontent");

note you also need to set slign property to TOP_LEFT.

one best tutorial i recommend for you CLICK

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM