When adjusting the height and width of the swf video disappears

I'm having trouble adjusting the size of the video and scene in AS3.

I installed netstream, and I can play the video, but whenever I set the height and width, I want the embedded object to be on the page in swfobject , the video disappears.

I still hear the sound, and I can say that the object is the right size, but there is no video. I tried to set the properties stage.stageWidth/stageHeight, but they do not see to complete my task. Example:

stage.stageWidth = 400;
trace(stage.stageWidth); // equals 500 for some reason

The properties of stage.stageWidth / Height also have nothing to do with the area that the flash object occupies in the browser (its full screen). I also tried setting stage.width / height, and I get an error message indicating that the Stage class does not implement these properties. I am very puzzled.

+4
source share
1 answer

You cannot resize a scene from SWF, for example. to stage.stageWidth = 600;, but you can indicate that the HTML page changes the width / height properties of the embedded SWF, and then in SWF you can react to resizing the scene, for example.

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, onStageResized, false, 0, true);

and update the layout from there.

If you change the size / elements in your HTML, this will change the size of the SWF stage.

SWF , , AS3 :

stage.scaleMode = StageScaleMode.NO_SCALE;

, SWF, .

, , , :

stage.align = StageAlign.TOP_LEFT;
0

All Articles