i hate to be a n00b but I can't seem to apply this to my app.
I am guessing most likely that it has to do with scope but I'm not sure.
anyway what I've done below doesn't seem to work either? Thanks for the help!
var video:Video = new Video(320, 240);
addChild(video);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
var meta:Object = new Object();
meta.onMetaData = function(meta:Object)
{
video.width = meta.width;
video.height = meta.height;
this.width = video.width;
this.height = video.height;
}
ns.client = meta;
video.attachNetStream(ns);
ns.play("myFLV.flv");
On Feb 19, 2008 4:08 PM, jmfillman <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> NativeWindowResize triggers when the application window is resized,
> via dragging or the Maximize/Restore Down button in MS Windows, and I
> don't think this is what you are wanting to use.
>
> Once you find the video size, you should be able to set the
> application size.
>
> Try out this simple code:
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
> layout="absolute" height="800" width="600">
> <mx:Script>
> <![CDATA[
>
> private function resizeApplication():void{
> var height:Number = 250;
> var width:Number = 250;
> this.height = height;
> this.width = width;
> }
> ]]>
> </mx:Script>
> <mx:Button x="166" y="166" label="Resize Me"
> click="resizeApplication();"/>
> </mx:WindowedApplication>
>
> --- In [email protected], "Corban Baxter" <[EMAIL PROTECTED]>
>
>
> wrote:
> >
> > Hey guys I am trying to get my AIR app's window to resize to the
> > dimensions of the FLV that is being displayed. I am not finding what
> > properties i need to use to make this happen. Can some one point me
> in
> > the right direction?
> >
> > I have been staring at this:
> >
> http://livedocs.adobe.com/labs/flex3/langref/flash/display/NativeWindo
> wResize.html
> > trying to make sense of it. But not having much luck. Thanks in
> advance!
> >
> >
> > var meta:Object = new Object();
> > meta.onMetaData = function(meta:Object)
> > {
> > video.width = meta.width;
> > video.height = meta.height;
> > NativeWindow.width = meta.width;
> > NativeWindow.height = meta.height;
> >
> > }
> >
> > ns.client = meta;
> >
> >
> >
> >
> >
> > --
> > Corban Baxter
> > http://blog.projectx4.com
> >
>
>
--
Corban Baxter
http://www.projectx4.com