Using a function to change Netstream video size.

Hi folks,
forgive me I am new to script in Flex.  I got an Application that has two scripted functions.  The first is called at creationComplete and sets up a netconnect/netstream video playback.  And a second that is fired when a button is clicked, which sets the application to Full Screen.  What I want to do is resize the video at the same time.  For testing purpose I am using hard coded values that match my monitor size.
The problem I am having is that the code I wrote to change the video size spits out an error "1120: Access of undefined property vid."  - Is it possible to have one function access the vairibles of another function?
My code:
<mx:Script>
        <![CDATA[
            private function initApp():void
                var nc:NetConnection = new NetConnection();
                nc.connect(null);
                var ns:NetStream = new NetStream(nc);
                ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); 
                ns.addEventListener(DRMAuthenticateEvent.DRM_AUTHENTICATE, DRMAuthHandler);
                ns.play("gm.f4v");
                function asyncErrorHandler(event:AsyncErrorEvent):void
                    // ignore error
                var vid:Video = new Video();
                vid.attachNetStream(ns);
                vidUI.addChild(vid);
                vid.width=851;
                vid.height=480;
                function DRMAuthHandler(event:DRMAuthenticateEvent):void
                    ns.setDRMAuthenticationCredentials("test","test","drm");
            public function goFull():void
                stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
                vid.width=1920;
                vid.height=1080;
        ]]>
    </mx:Script>
I want the function goFull to change the video size that is loaded from the initApp function.... possible?
Cheers!
Chris

altering size of text already in a textfield:
var fmt:TextFormat = new TextFormat();
fmt.size = newvalue;
textfield.setTextFormat(fmt)
textfield.defaultTextFormat = fmt; // ensure that text typed after the change is same size

Similar Messages

  • I can't use the function of "print to video".

    I've recently purchased FCPX and Blackmagic Design Decklink HD Extreme 3(version 7.5.2) but I already know this combination looks quite weird because I'm using only DSR. This is the first time I have installed FCP.
    I installed FCPX and figured out there's no way to get the video from Decklink on FCPX so that I deleted FCPX, installed FCP 2009 instead and installed FCPX again on the same disk as Final Cut Pro 7... It's a shame to get rid of it.
    At first, I could get a good result when printing to tape. There's no problem. But it's not long before I failed to get what i wanted. VCR detects input signal from FCP 7 through Decklink but the monitor of VCR shows only noise. For now, I can't use the function of "print to video".
    Also, I connect the input of Decklink to the output of DSR and the output of Decklink to the input of DSR at the same time and monitor w/ the output of DSR. However, the output on the monitor shows something weird when I capture the video from DSR as if the signal is fed back.
    Someone told me that I have to use other version of decklink but i'm not sure it would be better if I just change the version.
    What's wrong?
    What should I do for fixing these all mess?

    I've recently purchased FCPX and Blackmagic Design Decklink HD Extreme 3(version 7.5.2) but I already know this combination looks quite weird because I'm using only DSR. This is the first time I have installed FCP.
    I installed FCPX and figured out there's no way to get the video from Decklink on FCPX so that I deleted FCPX, installed FCP 2009 instead and installed FCPX again on the same disk as Final Cut Pro 7... It's a shame to get rid of it.
    At first, I could get a good result when printing to tape. There's no problem. But it's not long before I failed to get what i wanted. VCR detects input signal from FCP 7 through Decklink but the monitor of VCR shows only noise. For now, I can't use the function of "print to video".
    Also, I connect the input of Decklink to the output of DSR and the output of Decklink to the input of DSR at the same time and monitor w/ the output of DSR. However, the output on the monitor shows something weird when I capture the video from DSR as if the signal is fed back.
    Someone told me that I have to use other version of decklink but i'm not sure it would be better if I just change the version.
    What's wrong?
    What should I do for fixing these all mess?

  • Using Javascript function to change the value of a request variable

    Have a javascript function that activates onchange within a form variable. Would like the javascript function to change the value of a request variable.
    The javascript function is able to obtain the current value of the request variable ( which is 0 ) however I am unsuccessful in changing the value to 1.
    I have been trying to use the following:
         var vchange = 'request.changes_made = 1 ;' ;
         eval(vchange);
    Any ideas?

    If the user makes a change to the content of the form, and then attempts to leave the form, a javascript alert pops up giving the user the option of cancelling the submit, returning to the form and saving it.
    If there have been no changes, then the user is free to migrate to another page.
    This process is to protect users from losing valuable information but not to annoy them with "R U Sure" messages.
    Knowing the status of the form content is important to the functionality of the application.
    G

  • How to change export video size settings?

    I just upgraded from iMovie to Final Cut Pro X.
    I am trying to export my 1080P content as a 720P file, something that was very easy on the basic iMovie setup.
    I noticed when I tried to export to Vimeo I was given options for file quality and video size.
    Where do I find those options if I am doing an export to a file as opposed a direct Vimeo upload (i.e. Quicktime)?
    Please don't tell me I have to buy Compressor for this...
    Thank you!

    Share>Export Using Compressor Settings>Apple>Apple Devices>HD for Apple Devices (10mbps)
    This will give 1280x720 HD
    I don't think you need Compressor as the Compressor Settings are included in FCP X  .  .  .  I hope!

  • Using a javascript to change the font size used by the measurement tool

    A couple years ago I saw a javascript written that would allow me to chang the font size used by the measurement tool in Acrobat 9.  When the IT department deliverd my new laptop with Acrobat X Pro, they had wiped out the script and I am not expert enough to recreate it from scratch.  Any suggestions?  I believe it was in an older post by Dave Merchant, but I truly can't find the post or a way to recreate the script.  Thanks for any help.

    Executing this code from the JS console will change the font size of all the Measurement annotations to 20. You can change the value in the first line to use a different font size:
    var newTextSize = 20;
    this.syncAnnotScan();
    var annots = this.getAnnots();
    for (var i in annots) {
        var annot = annots[i];
        if (annots[i].type=="Line") {
            var richText = annot.richContents;
            for (var i in richText) {
                richText[i].textSize = newTextSize;
            annot.richContents = richText;

  • Using document.getElementById to change an element size works in iWeb but not when site published

    I am trying to use an HTML snippet to construct a "popup" to show explanatory text on iWeb windows. This is the code:
    <div id="divName"></div>
    <style type="text/css">
    /*<![CDATA[*/
    #divName {
         border:solid 0px #000;
         text-align:left;
    /*//]]>*/
    </style>
    <script type="text/javascript">
    //<![CDATA[
    function mouseOver()
        var el=document.getElementById("divName");
                       el.style.width=400+"px";
                       el.style.height= 200+"px";
                       el.style.margin="auto";
                           el.style.backgroundColor="#ffffff";             
              el.innerHTML="this is a bit of text, and this is some more";
    function mouseOut()
        var el=document.getElementById("divName");
                       el.style.width=80+"px";
                       el.style.height= 20+"px";
                       el.style.margin="auto";
              el.innerHTML=" ";
                           el.style.backgroundColor="";             
    window.onload=mouseOut;
    window.onmouseover=mouseOver;
    window.onmouseout=mouseOut;
    //]]>
    </script>
    This works o.k. when tested inside iWeb. When the mouse is rolled over the element it is enlarged, the background colour changed and the text displayed. However, when I publish the site the background colour changes and the text is displayed BUT the size of the element remains set to the size set in the "mouseOut" function. On one occasion after publishing it did actually work, but mostly it doesn't!
    What am I doing wrong?
    Incidentally, when testing under iWeb, the mouseOut function sometimes doesn't shrink the element back to its original size. Mostly it does, but when it doesn't the background has still been made transparent and the text removed. It only appears to be the height and width functions that are failing!

    Here's how I started :
    http://www.wyodor.net/Ajax/Ajax.html
    But to avoid having to edit the page after editing the iWeb page, i figured out a way to do it with a JavaScript :
    http://www.wyodor.net/mfi/Maaskant/How_To.html
    The magic word is : unique word. Then replace it with your own code.
    Then I advanced it a bit to this :
    http://www.wyodor.net/_Demo/Fancy/Dynamic_Text.html
    And here's an explanation what the HTML Snippet does :
    http://www.wyodor.net/blog/archives/2009/07/entry_213.html
    You may have to learn HTML/CSS/JavaScript/DOM/AJAX and how iWeb creates its pages.

  • IBooks Author changed placed video size on it's own. Anyone else have this happen?

    I'm creating a rather large ebook with iBooks Author (2.1.1) on Mac OS 10.9.2 (mavericks) . Currently over 350 pages typset. Was final proofing and ran into a font conflict over the weekend (Palatino was substituting), which miraculously resolved itself when I ran typical Mac diagnostics (so maybe a font got corrupted or something). So I was celebrating my victory when I noticed that randomly, a number of placed videos had changed size
    I noticed because I purposefully set all video preview images at 285x214. I've found at least six that changed to 200 x 150 (which possibly is the default when you create a new video).
    I just find it curious that this would happen for the first time, after I've been working on this book since last November (so about 6 months)
    I did upgrade to Mavericks April 15th. But I was working on the book last Saturday and these issues did not show up. Took Sunday off. Then mid-day Monday, I started noticing the font issue. Then this morning noticed the resized videos.
    This is what it changed it to:
    This is how i originally designed it:
    Of course, the change in size made the text reflow throughout the chapter. So now I'm going back page by page from the beginning to see if this annomoly only happened in this chapter or throughout the book. It didn't affect every placed video — only some.

    Is there a way for you to disable the firewall and your anti-virus software? That should help.

  • How can I change a videos size or resolution?

    I use Geforce Shadowplay to record and the videos come out as 1024x768 and whenever I upload them as that size on
    youtube black bars are on either side. Though when I uploaded a video of 1280x720 there were no black bars.
    How would I take a 1024x768 video recorded in Shadowplay and make it 1280x720 in Adobe Premiere?
    That way I can have a video without black bars on either side.

    Create a 1280x720 sequence and place your 1024x768 video in it. Use the motion properties to scale and zoom as desired.

  • Using DECODE Function to change data

    I am trying to use the Decode function in a SQL statement to find a field that has a specific type, and when it finds that type, I want to blank out the results in a different field.
    For example:
    DECODE(ADDR_TYPE,'HOME',PHONE='') HOME_PHONE

    something like:
    SQL> with t as
      2   (select 219 id,
      3           'BUS' addr_type,
      4           '505-555-5555' phone
      5      from dual
      6    union
      7    select 219 id,
      8           'HOME' addr_type,
      9           null   phone
    10      from dual
    11    union
    12    select 220 id,
    13           'BUS' addr_type,
    14           '101-111-1111'   phone
    15      from dual
    16    union
    17    select 220 id,
    18           'HOME' addr_type,
    19           null   phone
    20      from dual
    21    union
    22    select 223 id,
    23           'BUS' addr_type,
    24           '202-222-2222'   phone
    25      from dual
    26    union
    27    select 224 id,
    28           'HOME' addr_type,
    29           '303-333-3333'   phone
    30      from dual
    31    union
    32    select 225 id,
    33           'BUS' addr_type,
    34           null   phone
    35      from dual
    36    union
    37    select 226 id,
    38           'HOME' addr_type,
    39           null   phone
    40      from dual)
    41  select a.id,
    42         a.addr_type,
    43         decode(a.addr_type,'BUS',phone,null) phone
    44    from (select id, addr_type, phone,
    45                 row_number() over (partition by id order by id, decode(addr_type,'BUS',1,2)) rn
    46            from t) a
    47   where a.rn = 1;
            ID ADDR PHONE
           219 BUS  505-555-5555
           220 BUS  101-111-1111
           223 BUS  202-222-2222
           224 HOME
           225 BUS
           226 HOME
    6 rows selected.
    SQL>

  • How to use rollover function to trigger a video demo

    What I have done so far?
    Imported a PowerPoint slide and I created a Rollover caption. When exploring the properties for the Rollover, under the Action field:-
    On Success row, chose Open Another Project 
    Project row, uploaded the the file abc.cptx that is a software simulation record.
    When looking at slide in published mode, encountering the following message when I clicked over the rollover area
    "The project abc.htm, abc.swf is launched at this point but is unavailable from this preview window. To preview, use a web browser. "
    Anyone has any idea or best practices on where I went wrong?
    Regards
    AJ

    Hmmm, wondering if it is a typo, but a Rollover Caption doesn't have any events. How could you trigger a Success action in that case? This remark is only for other users. The only rollover object that has a rollover event is the Rollover Slidelet, not the Rollover Caption.

  • HELP ! Need to change video size in project sequence...

    When creating a project last month I accidently created it as 1280x960 in the sequence settings, but meant to create it as a 1920x1080 which is what all the video clips are in size. Now I have this nicely edited project but need to convert it to a 1920x1080 in the sequence settings so I can export it as that size. When I go into the sequence settings now this option is grayed out and it won't let me. I have read many forums and they say it’s as simple as creating a new sequence with the right settings and importing the old sequence but when I do this it is still as 1280x960. So my question is other than re-editing this entire project, how can I take this current project with sequence settings as 1280x960 and change the video size to 1920x1080 (Which is what the video clips are originally and when I right click on the individual videos it says 1920x1080). PLEASE help, I am using PP CS5 !!! This is so frustrating !

    Create a new Sequence with the settings you prefer,
    then Copy > Paste the clips into the new Sequence.
    Be sure that your Sequence settings match your footage by doing this:
    Or, right-click a media file and select 'New Sequence From Clip".
    How do I choose the right sequence settings?
    http://www.video2brain.com/en/lessons/how-do-i-choose-the-right-sequence-settings
    note:
    You may need to re-create audio effects that you applied in the Mixer
    in the first Sequence, or you can use your first Sequence as a mixed,
    nested audio track for the new properly configured Sequence.

  • Change the font size in the ABAP report

    Dear all,
    Does anybody know how to change the font size in abap report.
    Regards,
    Luke

    Hi,
        Font size in ABA reports can be changed using  PRINT-CONTROL COMMANDS. Here i provide you the code and description of using print commands to change the font size.
    Be aware that the PRINT-CONTROL is not supported in SAP Enterprise 4.7
    For your information, SAP cannot provide any support to error caused by print control command 
    (see SAP OSS notes 66478). 
    * Parameters for function below should be taken from your printer
    * configuration in SAP - check SPAD transaction -
    * standard print control
    * print-control position 1 function: 'CI006', 'SF015'.
    * Submitted by : SAP Basis, ABAP Programming and Other IMG Stuff
    *                http://www.sap-img.com
    REPORT ZFONT NO STANDARD PAGE HEADING LINE-SIZE 80 LINE-COUNT 65.
    * Start of print-control
    NEW-PAGE PRINT ON.
    PRINT-CONTROL FUNCTION 'SF000'.
    WRITE: / 'This is CPI 20'.
    SKIP.
    PRINT-CONTROL FUNCTION 'SF020'.
    WRITE: / 'This is CPI 6'.
    SKIP.
    PRINT-CONTROL FUNCTION 'SF008'.
    WRITE: / 'This is CPI 12'.
    * Depending on your SAP printer device, this may also work
    PRINT-CONTROL FONT 1 LPI 6.
    * you can try to change font and LPI numbers
    WRITE: / 'font 1 lpi 6'.
    PRINT-CONTROL FONT 2 LPI 6.
    WRITE: / 'font 2 lpi 6'.
    PRINT-CONTROL FONT 3 LPI 6.
    WRITE: / 'font 3 lpi 6'.
    * End of print-control
    NEW-PAGE PRINT OFF.
    *--- End of Program
    Hope this solves your problem.
    Thank you,
    Pavan.

  • Editing non standard video sizes

    Hello everyone.
    I have a load of video which is 1120 x 593 its basically screen capture video from my PC in mov format.  All i want to do is edit these clips together and add some nice effects.  So anyway i toddled off and bought a copy of of premier elements and started movie making!
    Anyway i can't seem to figure out how to retain the size of my video as ive got to use a project template, which is great if you are using video from a device but my video is a non standard size.  Surely there is a way of doing this? 
    Do i have to make sure that my imput video matches one of the template, surely not?  You must be able somehow to do your own size?
    Thanks

    Thank you for replying.
    Basically I like to fly x-plane flight simulator which gives you the ability to record your flying and outputs the video as a high quality mov. I wanted to use premier elements just to make a movie of different clips and just add a few effects and titles  I was just going to output them as fla to watch on my pc or the web.  Or as Mpeg 4 to put into powerpoints
    I tried using some of the presets but the quality is either awful or i get the black border.
    I seems that only the profesional edition allows you to set the frame to desktop and use a custom size.   I just can't believe that you need to spend £500 on the CS5 edition to do this? I'm not wanting to do anything clever here, just change the video size.
    Ive got a sinking feeling ive just wasted £75.

  • Help custom video size

    Hi everyone,
    Wistia, a video hosting service has a video on their homepage http://wistia.com/  
    how can I make a  video with odd size dimensions like this?
    I have attempted using "desktop" instead of a pre-set and then using custom dimensions. Please help.
    [email protected]

    Hi Harm,
    After I create a custom size in desktop the video outputs with black bands on top and bottom. I must need to change the video size in more than one area but don't know where? please help.

  • How to set video size default for exporting?

    Hi,
    I use quicktime conversion to export video out of FCP. My question is how to set a default video size. Under the options I can change the video size to NTSC 720:480 4:3 (and other choices). How do I set that as the default? Everytime I close out of FCP, the setting revert back to compressor native, which is what I dont want.
    If anyone knows, please email me at [email protected]
    Thanks
    Greg

    You can't. Use Compressor and build a droplet to the exact specification you want, especially if you're going to be doing that format often.

Maybe you are looking for

  • Reconfigure a mac formatted ipod to allow use on pc.

    my laptop won't recognise my hand me down ipod. it is formatted for a mac and i have a pc. i have the xplay3 softwhare that i was told will allow the use of the ipod. i have tried everything in the manual and then some. any help?

  • Ecommerce payment option "Bank Transfer"

    The payment method "Bank Transfer" appears to mark the transaction as paid rather then pending ( issues an invoice with amount paid nil owing) - I'm assuming process should be a customer elects to pay by bank transfer then the seller would wait to re

  • Applet ... could not be loaded !

    Hi ! This is a variation of the problem with my applet-Servlet communication. I placed the applet in Apache doc-root and commented out following : // package com.omh.security; I then replaced the code in the servlet as follows : out.println("<applet

  • Installing MacOS X on a Blue G3

    I tried to install MacOS X on a Blue G3. The Mac started up from the install DVD, but then tells me that MacOS X does not work on this type of machine. According to the Apple website, this should work. Could anyone tell me what I am doing wrong? Than

  • How to use report designer using bex analyser  give screenshots  details

    how to use report designer using bex analyser  give screenshots  details