BitmapData draw method doesn't work when the project is published as the .swf file of the web applic

Hi,
        I am totally confused by this strange error. When I tried using the draw method of BitmapData to draw a movieclip symbol of my project, it seems to work fine locally. However, as I uploaded the published .swf file to my web server and launched it as the plugin of my web application, it failed. The source codes as follows,
function printscreenClicked():void
     //ExternalInterface.call calls a javascript function to print message1
    var bd:BitmapData = new BitmapData(stage.width,stage.height);
    //ExternalInterface.call calls a javascript function to print message2
  bd.draw(stage);
    //ExternalInterface.call calls a javascript function to print message3
message3 didn't show at all. Instead, the browser console shows "Uncaught Error: Error calling method on NPObject.". My understanding of this error message is that the .swf is calling something crashing, and I believe that bd.draw(stage)is the crashng method call.
Also, here is my html embed tag:
    <embed src="/tests/videoplayer.swf" id="flash" quality="high" height="510" width="990" scale="exactfit" name="squambido" align="middle" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="margin: 0px auto;clear:both;position:relative;"/>
Can someone help me?

Thank you for your reply.
I tried stageWidth and stageHeight, but it still doesn't work.
The draw() methid is triggered when I clicked a screenshot button in my application as follows,
ExternalInterface.addCallback("printscreenClicked", printscreenClicked);
function printscreenClicked():void
     //ExternalInterface.call calls a javascript function to print message1
    var bd:BitmapData = new BitmapData(stage.width,stage.height);
    //ExternalInterface.call calls a javascript function to print message2
  bd.draw(stage);
    //ExternalInterface.call calls a javascript function to print message3
Would you please give me an example of "waiting for Event.RESIZE is good, or just at least Event.ENTER_FRAME"?
My real purpose in this application is to capture a snapshot of a streaming video. The video is contained in a movieclip object. I tried stage first since BirmapData.draw() doesn't work when drawing the movieclip on the web site. Do you have any suggestion for this situation? Also, is there any good method to find out what happened if the browser have "Uncaught Error: Error calling method on NPObject."?

Similar Messages

  • LVOOP "call parent method" doesn't work when used in sibling VI

    It seems to me that the "call parent method" doesn't work properly according to the description given in the LabVIEW help.
    I have two basic OOP functions I am doing examples for. I can get one to work easily and the other one is impossible.
    Background
    There are 3 basic situations in which you could use the "call parent method"
    You are calling the parent VI (or method) of a child VI from within the child VI
    You are calling the parent VI (or method) of a child VI from within a sibling VI
    You are calling the parent VI (or method) of a child VI from a different class/object.
    From the LabVIEW help system for "call parent method":
    Calls the nearest ancestor implementation of a class method. You can use the Call Parent Method node only on the block diagram of a member VI that belongs to a class that inherits member VIs from an ancestor class. The child member VI must be a dynamic dispatching member VI and have the same name as the ancestor member VI
    From my reading of that it means situation 3 is not supported but 1 & 2 should be.
    Unfortunately only Situation 1 works in LabVIEW 2012.
    Here is what I want
    And this is what I actually get
    What this means is that I can perform a classic "Extend Method" where a child VI will use the parent's implementation to augment it's functions BUT I cannot perform a "Revert Method" where I call the parent method's implementation rather than the one that belongs to the object.
    If you want a picture
    Any time I try and make operation2 the VI with the "call parent method" it shows up for about 1/2 sec and then turns into operation.
    So there are only 3 possibilities I can see
    Bug
    Neither situation 2 or 3 are intended to work (see above) and the help is misleading
    I just don't know what I am doing (and I am willing to accept this if someone can explain it to me)
    The downside is that if situation 2 above doesn't work it does make the "call parent node" much less usefull AND it's usage/application just doesn't make sense. You cannot just drop the "call parent node" on a diagram, it only works if you have an existing VI and you perform a replace. If you can only perform situation 1 (see above) then you should just drop the "call parent node" and it picks up the correct VI as there is only 1 option. Basically if situation 2 is not intended to work then the way you apply "call parent method" doesn't make sense.
    Attachements:
    For the really keen I have included 2 zip files
    One is the "Revert Method labVIEW project" which is of course not working properly because it wants to "call parent method" on operation not operation2
    The other zip file is all pictures with a PIN for both "Revert Method" and "Extend Method" so you can see the subtle but important differences and pictrures of the relavant block diagrams including what NI suggested to me as the original fix for this problem but wasn't (they were suggesting I implement Extend Method).
     If you are wondering where I got the names, concepts and PIN diagrams from see:
    Elemental Design Patterns
    By: Jason McColm Smith
    Publisher: Addison-Wesley Professional
    Pub. Date: March 28, 2012
    Print ISBN-10: 0-321-71192-0
    Print ISBN-13: 978-0-321-71192-2
    Web ISBN-10: 0-321-71255-2
    Web ISBN-13: 978-0-321-71255-4
     All the best
    David
    Attachments:
    Call parent node fault.zip ‏356 KB
    Call parent node fault.zip ‏356 KB

    Hi tst,
    Thankyou for your reply. Can you have a look at my comments below on the points you make.
    1) Have to disagree on that one. The help is unfortunately not clear. The part you quote in your reply only indicates that the VI you are applying "Call Parent Node" to must be dynamic dispatch. There is nowhere in the help it actually states that the call parent node applies to the VI of the block diagram it is placed into. Basically case 2 in my example fulfills all that the help file requires of it. The dynamic dispatch VI's operation are part of a class that inherits from a given ancestor. Operation 2 for Reverted behaviour is a child VI that is dynamic dispatch and has the same name as the ancestor VI (operation2). The help is missing one important piece of information and should be corrected.
    2) True it does work this way. I was trying to build case 2 and had not yet built my ancestor DD for operation so the function dropped but wasn't associated with any VI. I was able to do this via a replace (obviously once the ancestor Vi was built) so this one is just bad operator
    3) Keep in mind this is an example not my end goal. I have a child implementation because this is a case where I am trying to do a "reverse override" if you like.
    3a) The point of the example is to override an objects method (operation2) with it's parent's method NOT it's own. The reason there is a child implementation with specific code is to prove that the parent method is called not the one that relates to the object (child's VI). If I start having to put case structures into the child VI I make the child VI have to determine which code to execute. The point of Revert method is to take this function out of the method that is doing the work. (Single Use Principal and encapsulation)
    3b) The VI I am calling is a Dynamic Dispatch VI. That means if I drop the superclass's VI onto the child's block diagram it will become the child's implementation. Basically I can't use Dynamic Dispatch in this case at all. It would have to be static. That then means I have to put in additional logic unless there is some way to force a VI to use a particular version of a DD VI (which I can't seem to find).
    Additional Background
    One of the uses for "Revert Method" is in versioning.
    I have a parent Version1 implementation of something and a child Version2. The child uses Version2 BUT if it fails the error trapping performs a call to Version1.
    LabVIEW has the possibility of handling the scenario but only if both Case 1 and Case 2 work. It would actually be more useful if all 3 cases worked.
    The advantage of the call parent method moving one up the tree means I don't have the track what my current object is and choose from a possible list, if, for example the hierarchy is maybe 5 levels deep. (so V4 calls V3 with a simple application of "call parent method" rather than doing additional plumbing with case structures that require care and feeding). Basically the sort of thing OOP is meant to help reduce. Anything that doesn't allow case 2 or 3 means you have to work around the limitation from a software design perspective.
    If at the end of the day Case 2 and case 3 don't and won't ever work then the help file entry needs to be fixed.
    All the best
    David

  • Flex: Method doesn't work when being called on parentDocument

    Hi,
    I wonder is anyone can look at this code and tell me why calling the  removeSelectedChild works when called from the same document, but  returns the following error when called from the child  document/component.
    "ArgumentError: Error #2025: The supplied DisplayObject must be a  child of the caller."
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
      <mx:Accordion id="myAccordion"
      width="100%" height="100%"
      selectedIndex="0">
      <mx:Script>
        <![CDATA[
          public function removeSelectedChild():void {
            myAccordion.removeChild(myAccordion.selectedChild);
        ]]>
      </mx:Script>
      <mx:headerRenderer>
        <mx:Component>
          <mx:Button click="{ parentDocument.removeSelectedChild() }" />
        </mx:Component>
      </mx:headerRenderer>
      <mx:HBox>
        <mx:Button click="{ removeSelectedChild() }" />
      </mx:HBox>
      </mx:Accordion>
    </mx:Application>
    Clicking on the button in the child produces the expected result,  whilst clicking on the header throws an error despite the fact they both  call exactly the same method.
    Sorry that the example is a little contrived, this problem arose in a  quite complicated view, which was using all kinds of custom components.  This was the only way I could display it in a way that will be quick  for you to compile and easy to focus on the real issue without  background noise.
    I'm pulling my hair out on this one and would really appreciate it if  anyone could help.
    Cheers,
    Chris

    What are you trying to remove?
    myAccordion.removeChild(myAccordion.selectedChild);
    tries to remove the container, which is the child of the Accordion. Is that what you want?
    Also, I'm wondering if  parentDocument.removeSelectedChild() would try to remove the Accordion.
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex Training and Support Services

  • Premier 13 stops working when existing project is loaded (after uninstalling Premier 9 where the project started)

    I started a project using Premier 9. Then I upgraded to 13, edited and saved my existing project several times successfully. Decided that it appeared 13 was working well and I no longer needed 9 and 11 (both Photoshop Elements and Premier Elements) so I uninstalled them using the Control Panel app. Now 13 stops working when I try to load my project.
    I have since uninstalled/re-installed/rebooted everything in various sequences many many times with no luck. I even purchased and installed another copy of 9 (since the original was a download and I could not find my notes & serial numbers)! The 9 install encountered a problem "an installation process has encountered an error while installing", it stopped, then rolled the install back so I have nothing for 9.
    HELP
    Paul L

    PaulL
    Probably good idea to recreate the version 9 project in version 13. Investment of time in troubleshooting version 9 is questionable as you say.
    At this point, I would leave Premiere Elements 9.0/9.0.1 installed, just do not open it.
    When you are between Premiere Elements 13 projects and you want to get rid of Premiere Elements 9.0/9.0.1,
    consider
    1. Deactivate the program from an opened project's Help Menu/Deactivate...close out of the program.
    2. Uninstall the program the usual Control Panel way
    3. Do a free ccleaner run through (regular cleaner and registry cleaner parts) to get rid of leftovers from incomplete installs or uninstalls.
    CCleaner - Download
    Note: Deactivation is not the same as uninstall.
    Critical - after a project is saved closed, never move, delete, or rename files/folders that were imported into the project after the project's save close.
    When you import files into a project, all you get are copies of the originals. But, those copies need to trace back to the originals in the location where
    they were when they were first imported into the project. More on that later as indicated.
    Please let me know if any questions or clarification needed on any of the above. Are there any Elements Organizer consideration in any of this?
    If so, I would convert the Elements Organizer 9 catalog in Elements Organizer 13 before uninstalling Premiere Elements 9.0/9.0.1.
    Thanks for the follow ups.
    ATR

  • Differences between the 2 ways to play local swf files in flash player

    There are 2 ways to allow the flash player to play local swf files:
    Add the directory/file of the swf to the Global Flash Player Trust directory. http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7c95.html
    Add the directory/file of the swf to the Trusted Location Settings in the Local Settings Manager.http://help.adobe.com/en_US/FlashPlayer/LSM/WS6aa5ec234ff3f285139dc56112e3786b68c-7ff0.htm l#WS6aa5ec234ff3f285139dc56112e3786b68c-7fea
    Adobe doesn't mentioned in the document what's the differences between these 2 methods, and they look has the same effect. But when I'm doing it on OS X, Safari 6.1, the first method doesn't work (It was working when I was using Safari 6.0). And then I tried method 2, it works…
    So I'd like to ask what are the differences between these 2 methods to play local swf files?

    For playing local SWF files, Download the Macintosh Flash Player 11.9 Projector
    It's a standalone app. Just copy it to your Applications folder. Launch it, and drag the SWF to the Dock icon. It'll play.

  • Opening SWF Files in the Application window

    Hello Everyone,
    We have a problem in opening .swf files in our application.
    We had quick time movies(.mov) which we used to open and
    play inside the application window, using QuickTime Framework APIs
    in the code.
    Presently we had converted these quicktime movies(.mov) into
    .swf files and we are unable to open the same using Quick Time
    Framework in MacOSX.
    Can you please suggest me as how should I proceed, i.e which
    framework should I use in the code to open and play .swf files in
    the application window?
    It will be better, if you can send me a small sample code to
    use in my application for MacOSX.
    Awaiting for your kind reply,
    Thanking you,
    With Best regards,
    Anil.

    Hi Vaibhav,
    I need to display the serarch results in the same window.
    I have followed the steps mentioned by you in the thread
    <i> Search Results in the Same Window..as we have in SDN</i>
    Even after making changes to 2 PAR files mentioned in the above thread, on click
    of Search button nothing happens.
    It will be great if you can send me your modified PAR files, to identify where i am
    going wrong. My mail id is [email protected]
    Thanking you,
    Vikas

  • Getting Security Error when trying to use bitmapdata.draw method on youtube videos

    Hi All ,
    I am playing youtube videos in UIComponet of flex, but when I trying to capture the image using bitmapdata.draw() method it gives me an secutity error on server  , It works well locally in flex editor.
    Is any one knows how to resolve this bug??
    Thanks in advance
    sujit Rai

    Try nesting the clips and then adding the warp stabiliser to the nest.

  • I cannot figure out how to make the text larger on an incoming email.  The finger method doesn't work and I cannot find any toolbar with which to do it.  I could find nothing in settings also.  Plese help and thank you.

    I cannot figure out how to make the text larger in a received email.  The finger method doesn't work and I can find no tool bar as I can for composing emails.  I can find nothing in settings.  Please help and thank you in advance.

    Hi there,
    Download a piece of software called TinkerTool - that might just solve your problem. I have used it myself to change the system fonts on my iMac. It is software and not an app.
    Good wishes,
    John.

  • My speaker doesn't work when I try to listen to music or open up a quick time file, however they seem to work perfectly when I listen to a voice memo (p.s. the volume slider disappears in a song page and even in the multi tasking bar)

    my speaker doesn't work when I try to listen to music or open up a quick time file, however they seem to work perfectly when I listen to a voice memo (p.s. the volume slider disappears in a song page and even in the multi tasking bar)

    Thanks for your solution, it wasn't quite what solved the problem but i remembered that i had a bit of salt water on my phone recently and spraying the charging port with an anti-oxide spray solved my problem, do you mind if i ask, how is the charging port related with the volume or/and speakers?

  • I have different account ID's with my iphone and computer. I would like to standardise both to just the one. One of the ID's doesn't work, when I tried to list the second email with the preferred one a message telling me that this email is already in

    I have different account ID's with my iphone and computer.
    I would like to standardize both to just the one.
    One of the ID's doesn't work, when I tried to list this second email with the preferred one a message telling me that this email is already in use pops up.. yes it is, with me??
    Is there an easy to fix this please, Fabfitz

    If the email address you want to use is being used as the primary email address on a different ID you have to manage that ID and change it to a different primary email address.  This explains how: Change your Apple ID - Apple Support.
    If it is being used as an alternate or rescue address on a different ID, you manage the ID and either remove it or change it to a different email address.  This explains how: Manage your Apple ID primary, rescue, alternate, and notification email addresses - Apple Support.

  • [Photoshop CC 2014] Click&hold-move-release doesn't work when adding adjustment layer from the layer panel

    When selecting a menu item I used to click the left mouse button and hold it down, move the pointer to the desired menu item and release the mouse button. Everything works fine in the mine menu, but there's a problem when adding new adjustment layer from the layer panel: when I release the button nothing happens, I have to press the button again. In previous PS version it worked fine. How can I fix this?

    I don't think that is user fixable, meaning you'll have to wait till adobe fixes it with an update.
    Photoshop cc 2014
    windows does not work
    mac does work
    Did you already post over here:
    [Photoshop CC 2014] Click&hold-move-release doesn't work when adding adjustment layer from the layer panel

  • TS1398 The internet on my Iphone 4 doesn't work when I use the Wifi

    The internet on my Iphone 4 doesn't work when I use the Wifi at home. My Mac works fine. On the Iphone it shows it's connected but it doesn't open any app. Anyone knows what to do? Thanks

    Ÿ. If you tap and hold the "Y" does it appear? If so, just slide your finger up to select.

  • How do I delete items in my calendar when it doesn't work when I hover them over the trash can?

    How do I delete items in my calendar when it doesn't work when I hover them over the trash can?

    There are several ways
         - Selecting the event and hitting the "delete" key on your keyboard (as Wayne Contello said)
         - Selecting the event and opening the "edit" dropdown menubar item, and then selecting "delete"
         - Selecting the event and right clicking, then selecting "cut" (this option puts the event on your clipboard)

  • I m using apple mac pc, when we start windows 7 , apple mouse doesn't work properly it take to much time to gain signals from the pc and many times it not work but when we use mac it moves fastly and works properly. please suggest me. thanks ravi

    i m using apple mac pc, when we start windows 7 , apple mouse doesn't work properly it take to much time to gain signals from the pc and many times it not work but when we use mac it moves fastly and works properly. please suggest me.
    thanks
    ravi
    <Email removed by Host>                                                                                                                                                                                                                                       

    sounds more like Bluetooth rather than moue, but w/o knowing w/o posting mac model type/year we... will... not... know... what you have
    All computers are personal computers, a PC though is also "non-Apple" in common usage.
    Mac also is platform and OS.
    Very confused reading what you are trying to tell us.

  • Charger works when notebook is off, but it doesn't work when the notebook is on.

    I have a HP Pavilion dv6-3070tx Entertainment Notebook PC.
    My charger doesn't work when the notebook is on and plugged in, but when the notebook is off (or even when it is in sleep mode) it gets charged. I tested this by using different chargers that work in other hp notebooks. If this can be solved, I'll be grateful.

    Hi
    There are two structures of DVDs
    • Data-DVD - as burned from DeskTop/Finder
    • Video-DVD - to be played on a DVD-Player - Needs a program that can do this
    One can in iMovie - Export as QuickTime .mov and save this via DeskTop/Finder onto a DVD - BUT this will only play on a Computer and if it is a Window-PC this needs to download QT-player or VLC-player.
    But no DVD-player for TV can play back this.
    To get a Video-DVD then You need
    • iDVD (not from Apple any more) - or -
    • DVD Studio Pro (not from Apple any more) - or -
    • FinalCut Pro-X (can do simple Video-DVDs) - or -
    • Burn - http://www.digital-digest.com/software/Burn.html - FREE - but very PLAIN - no fancy things at all.
    • Roxio Toast™ 11 Pro - Fairly advanced - and costs a bit - still very Good and lot's of great tool's included. (I love it) - Can also back convert home made DVDs to an editable mode in an OK quality. With BD-component also capable to do sort of Blu-Ray DVDs.
    Yours Bengt W

Maybe you are looking for

  • Different Tax codes in SRM PO and replicate ECC PO

    Hello Experts, Problem related to the TaX code in replicated PO . We are in Extended classic scenario. In SRM, when creating Shopping cart we enter manual tax code like e1(20%) or e2(25%) etc and when PO gets generated and replicated in the backend t

  • Why is the trackpad on my iBook G4 sluggish

    The clicker on the trackpad of my iBook G4 has gotten very sluggish and most often doesnt click.  Ive been using an external mouse.  How can I make the clicker work properly.  I was wondering if somehow I could clean it.  Please help.  Thanks very mu

  • Need to implement Digital signature

    Hi, We are trying to implement digital signature for the client. As per the requirement ,Digitally signed document will be sent to the statutory bodies. Please guide me how to implement digital signature in SAP with smart card stored private key ,sin

  • Splash screen does not display correctly

    Hello everyone. I have a class which shows a spashscreen. When run from the main method it display the splash correcly. I have a login module. When the login is sucessful , I call the splashcreen module. Here the problem arises. It just gives me the

  • Aluminum Macbook missing install disks. What to do?

    I recently purchased a used 13" aluminum macbook, and it did not come with install/restore disks. I purchased a larger hard drive and want to install the OS. I understand that I cannot use versions of Leopard older than what originally came with the