Should I create a flash file for each screen size?

穿精又带淫゛_ 提交于 2019-12-24 17:09:04

问题


I created a swf file for one my clients using a screen size of 1024px x 768px (4:3 ratio), now my client wants to re-use the video in a bigger screen (TV) that still uses a 4:3 ratio but the screen size is considerably bigger (I do not have the exact size yet). Do I need to recreate the flash file using images that fit the new screen size, or the fact that they both use a 4:3 aspect ratio means that the image quality will not suffer?


回答1:


It depends on what your SWF contains. If it's a video, then it makes sense to have different sizes (such as HD vs SD). However, if it's an application or timeline animation, you can look at setting Stage scale mode.

Usually when you create apps you would make them fluid so that they can resize depending on where they are, either full screen or within a set width and height.




回答2:


Actually, you can create SWF file for all screens, or only background, and just centerlize your main content, it's frequently decision, here some example how to do it:

First of all, let's add listener for resize event

stage.addEventListener(Event.RESIZE, resizeListener); 

In addition, function which will resize your content (or BG).

function resizeListener (e:Event):void {
     mc.x = 0; 
     mc.y = 0;
     mc.width = stage.stageWidth; 
     mc.height = stage.stageHeight;
}

Also, don't forget to create MC with Top Left register point. And add this align commands for your SWF file in your code:

 stage.scaleMode = StageScaleMode.NO_SCALE;
 stage.align = StageAlign.TOP_LEFT;

Hope this help you.



来源:https://stackoverflow.com/questions/8053998/should-i-create-a-flash-file-for-each-screen-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!