|
-
[RESOLVED] External video is displayed at wrong dimensions?
All,
I was working through the example AS code in Adobe's documentation:
http://help.adobe.com/en_US/ActionSc...0204-7d4e.html
Usually, when working with video, I use the FLVPlaybackComponent, but for this project I don't really need any fancy skins/features, I just need to load and play an external video.
Anyway, I have a .MP4 video that when I right-click and look at its properties... its dimension is 640x480.
However, when I try and test the code below:
Actionscript Code:
var nc:NetConnection = new NetConnection(); nc.connect(null);
var ns:NetStream = new NetStream(nc); ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); ns.play("CNN_Anderson_Cooper.mp4"); function asyncErrorHandler(event:AsyncErrorEvent):void { // ignore error }
var vid:Video = new Video(); vid.attachNetStream(ns); addChild(vid);
The video appears at the top-left corner of the stage... but it is only 320x240
This isn't a big deal right now, because I can just add this after the fact:
Actionscript Code:
vid.width=640; vid.height=480;
But, that's not the ideal solution... and it just seems like strange behavior for Flash to arbitrarily show video at half-size, so I have a feeling I'm doing something wrong or missing something?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|