Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think the behavior you're describing is caused by the <code>scale</code> parameter in the HTML embed of the Flash. Generally this defaults to <code>showAll</code>, scaling the Flash up to fit the container. </p> <p>There are two different sizes: the size of the container (the block in the HTML page) and the size of the Flash content (what you specify in the SWF tag). The scale mode decides the behavior when these sizes don't match. You can control this behavior either by tweaking that embed parameter, or from AS3 directly using <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScaleMode.html" rel="nofollow"><code>stage.scaleMode</code></a>:</p> <pre><code>import flash.display.StageScaleMode; // scale the content to fit the container, maintaing aspect ratio stage.scaleMode = StageScaleMode.SHOW_ALL; // disable scaling stage.scaleMode = StageScaleMode.NO_SCALE; </code></pre> <p>If you want to use the scale mode to your advantage, I would set the width of your Video to match the stage dimensions like so:</p> <pre><code>myvid.width = stage.stageWidth; myvid.height = stage.stageHeight; </code></pre> <p>This way you avoid having to repeat the SWF width and height.</p> <p>The directives mostly specify some metadata or instructions for the compiler. The SWF tag in particular specifies the info in the SWF header, such as desired width, height, framerate. Mostly these are just some suggestions to the player + container about how the file should be displayed. Some of them can be changed in code (<code>stage.frameRate = 50;</code>). Another metatag is <a href="http://dispatchevent.org/roger/embed-almost-anything-in-your-swf/" rel="nofollow"><code>Embed</code></a>, which will bundle some assets into the SWF (particularly handy if you want to embed some binary data).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload