BitmapData.draw () do not draw together MovieClip

Hi, all.

I'm doing a few skinny blitting to a rotating object by rotating once at startup and capturing a snapshot of BitmapData of each 5 degrees.  The problem I have is that the the BitmapData object draw() method resumes only the pixels in the MovieClip which are below and to the right of the alignment point.  If I change the MC so that the registration point is in the upper left corner, I sometimes what looks like most of the pixels, but the whole of the object turns in and out of the framework, since it revolves around the corner and not the centre.

Has anyone encountered before, and if so is there a solution?

Thank you;

Amy Blankenship

flexdiary.blogspot.com

Information of BitmapData.

BimapData will and can only caputure bitmaps unadjusted and always point TopLeft originally.

However, it may sometimes seem like the captured bitmap filter effects or rotating, the thing is there not at least on the object in the draw was taken for target.

If the object you draw children have turned to is opposed and filters etc they will appear in the draw by lot, because they were like children.

Say that to turn something bitmap because you are blitting, this image will be a top left point of origin.  rotation 180 degrees even actually will mess up your draw.

because top left original point is where you will turn around... not the Center.  so when you draw this image, it will always ONLY draw with is right and below 0.0

It must be taken into account whenever you draw.

for this purpose, first focus your bitmap with translate(-bitmap.width*.5,-bitmapHeight*.5)

var: matrix new matrix())

Matrix.translate(-bitmap.) Width*.5, - bitmapHeight *. 5)

Matrix.Rotate)90 * (Math.PI / 180))

Matrix.translate (bitmap. Width*.5, bitmapHeight*.5)

Draw (bitmap, Matrix)

Whoops swap bitmapHeight and width

Tags: Adobe Animate

Similar Questions

  • BitmapData.draw is not rendered content outside of the visible part of the canvas

    My application has a canvas with a bunch of items to this topic and who has a scroll bar to see the entire contents of it, i.e. the canvas has a height of 200px, but objects in extend beyond the 200px all the way to 400px. When I pass this canvas object to my BitmapData instance which I created with a height of 400px, the result is that I get a 400px image, but only the top 200px are actually rendered. If I move the scroll bar down and you call the draw, I get the background of the canvas, rendered 200px on half superior of the BitmapData.

    Is there a way to make all of the content of the object from the canvas and not only what is currently visible in the display window?

    Thank you

    Ruy

    It is internal, which means that it is not documented, but it should be in the rawChildren or you can access it via mx_internal.  I think that if you set the height = 400, called validateNow() and bitmapData.draw then it might work.

    You can also try setting scrollRect = null.

    FWIW, people often have a print view that connects to the same model of data.

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • BitmapData.Draw () does not work with crossdomain images

    We develop a gallery of dynamic moving images using Flash 8 & AS2, for which images are called from another area. I used the Reflection class (in which bitmapdata.draw () of works) to achieve reflections. It works fine when the images are called from the same domain. But when the images are called from another area, the Reflection class does not work because bitmapdata.draw () does not work on images of crossdomain due to security sandbox. Although the images are appearing. I would be very grateful if anyone can answer, because I tried this for the last few days with little success.

    There is some information at the bottom of this page:

    http://livedocs.Adobe.com/Flash/8/main/00001950.html

    And here
    http://flashforever.homeip.net/blog/?p=4#comment-31

  • BitmapData.draw and clipRect

    Hello

    I am writing a sprite animation system that requires transformations on the individual sprites that are stored as BitmapData sprite sheets.

    I use BitmapData.draw to do my job - that has worked well for files individual bitmap, but when it comes to the transformation that a piece of a bitmap, that is what clipRect is supposed to do according to the literature, it does not work.

    It seems that clipRect is actually the clipping to the destination, not the source region. I wonder there is a function which source of cutting before transformation to destination. Otherwise, I fear that I'll have to use an intermediate bitmapData to copy my frame of the sprite to before I turn.

    Kind regards!

    No, just do it in 2 steps, it seems.

  • Security sandbox violation: BitmapData.draw (video)

    Background:
    Video files on the amazon S3 service.
    Each compartment of S3 (file/URL) that contains videos also have a crossdomain.xml policy file.
    My main server running MySQL dB and data-services that communicate with the Flash/Flex client and are deployed on another host/server environment.

    The SWF also used this "area" (where are deployed Data-Services and Db).

    The application is generally a variety of virtual editing and manipulation of video and multimedia content on media projects.

    Now to a module, I take a BitImage of the videos using BitmapData.draw () snapshots using the video (flash.media.Video instance) as the source for the draw randomly.

    Everything is fine when I'm currently running/debugging locally (for example, the SWF file was made in the Flex builder environment) However, when I make I get an error "security sandbox Violation".
    The individual:
    > > > > > > >
    SecurityError: Error #2122: security sandbox violation: BitmapData.draw: URL http:// < host > AppWrapper.swf cannot access the url http:// < amazon S3 > / < name of the video file > .flv. A policy file is required, but the checkPolicyFile flag was not established when this media was loaded.
    at flash.display::BitmapData/draw()
    at as_classes::FlxVideo/takeSnapshot()
    at components.popups::NewFootagePopup/takeImage()
    at components.popups::NewFootagePopup/__imageButton_click()
    < < < < < <
    Reading and Googling autour, I understand that I must create a LoaderContext, set his loaderContext.checkPolicyFile = true; and attach it to the Loader object that is responsible for the video.
    However, I can find no relevant objects that I can associate it with for example:

    flash.media.Video isn't a loader object
    Netsream (flash.net.NetStream) that only the 'game' is not a nor the flash.net.NetConnection object and which is also involved.

    I tried various other related security setting as the allowDomain (.) and others but nothing is.

    Thank you anyone with ideas/tips/pointers


    Thank you

    Yoav

    Problem solved. (bad me)
    NetStream class a checkPolicyFile property!
    The value is false, and all is well!
    (the docs specifically states:)
    Set this property to true when you load a video file from outside the domain of the calling SWF file, and you use the BitmapData.Draw (pixel) method - access the video on. If you call BitmapData.draw () without setting the checkPolicyFile property to true at loading time, you may get a SecurityError exception because the required policy file has not been downloaded.)

  • SecurityError: Error #2123: security sandbox violation: BitmapData.draw:

    Hello

    I develop a swf in Flash Builder 4.7 to run in the FlashPlayer_sa.exe (11.5). Inside this application, I load another swf in the same folder and inside of it, I load a video from a subfolder.

    To have an effect of paging on my content, I use a copy of the bitmap of the original content. When I have my videos attatched I can do my copy bitmap (copypixels) of the content item and video inside. Now, the "funny" is when I put the video on null stream I get this violation sandboy error:

    SecurityError: Error #2123: security sandbox violation: BitmapData.draw: file:///P:/_projekte/...

    I also add my project folder to the trusted locations in settings global flah. It seems that the verification of the securety has a problem with a stream of the null value and acts like it is from a different domain. A way around this?

    Flash is probably looking for a null file.

    What is the full error message.

  • bitmapData.draw (SecurityError): security sandbox violation

    I'm loading and playing a local video file with appendBytes() and when I call a bitmapData.draw function)

    below the exception comes up.

    SecurityError: Error #2123: security sandbox violation: BitmapData.draw

    cannot access to null. Access granted to any policy files.

    What should I do? ....

    Mr President, I have already mentioned in my last post, I test with the two relative and absolute.

    Yes, I related paths khow works very well when I do something like this

    bitmap. Draw works very well in above case, but my scenario is different I load a complete video as a bytearray before play and play the video of this bytes

    private void fileLoaderComplete(event:Event):void

    {

    Transmit the bytes loaded to drive

    drive. AddVideo (urlLoader.data);

    }

    It is to add video function in Player.mxml

    public void AddVideo(VideobyteArray:ByteArray):void

    {

    if(NS == null)

    {

    var nc:NetConnection = new NetConnection();

    NC. Connect (null);

    NS = new NetStream (nc);

    ns.checkPolicyFile = true;

    ns.soundTransform = new SoundTransform (0.0);

    NS.client = this;

    ns.addEventListener (NetStatusEvent.NET_STATUS, nsStatus);

    }

    videodata = VideobyteArray;

    GetTags (videoData);

    NS. Play (null);

    ns.appendBytesAction (NetStreamAppendBytesAction.RESET_BEGIN);

    ns.appendBytes (VideobyteArray);

    video.attachNetStream (ns);

    playBar.TogglePlay (true);

    }

    I think it's a bug in flash sdk 4.6 (Flash Player 11)

    bitmap. Draw function is somehow in conflict with the appendBytesAction or appendBytes

    This question is posted on the forum of ActionScript 3.0 front

    http://forums.Adobe.com/message/4650890#4650890

    JM.html http://Flash.bigresource.com/flash-use-BitmapData-Draw-with-NetStream-AppendBytes--iTNz6LV

    pendbytes http://StackOverflow.com/questions/5607047/How-can-i-use-BitmapData-Draw-with-NetStream-AP

  • BitmapData.draw security error

    I paint to MediaContainer bitmap:

    var mediaContainer:MediaContainer = new MediaContainer();

    bitmapData.draw (mediaContainer);

    It works, but when I switch the video, an error occurs:

    SecurityError: Error #2123: security sandbox violation: BitmapData.draw

    cannot access unknown URL. Access granted to any policy files.

    Any ideas?

    Here you go:

    http://flashboard.info/files/DrawTest.FXP

    There ways HTTP and RTMP.

    I tried to launch of http:// and file:// - both work fine for me.

    Links within the app are to our production servers.

    Kind regards!

  • Policy file on video rtmp and BitmapData.draw)

    Hello

    I hope that there is response to my dilemma from the point of view aside server.

    I have a video resource is streamed from rtmp. The url is: rtmp://blah.domain.com/directory/anotherone/asset.flv

    I need to call BitmapData.draw () on that asset.

    There a crossdomain.xml file on http://blah.domain.com/crossdomain.XML which allows all areas.

    When is instantiate the flow I write:

    stream.checkPolicyFile = true;

    Also, I load crossdomain of http://blah.domain.com/crossdomain.XML and rtmp://blah.domain.com/crossdomain.xml

    I have tried all the combination of the above.

    In any case, when I try BitmapData.draw () - I get:

    Can't access to rtmp://blah.domain.com/directory/anotherone/. Access granted to any policy files.
    at flash.display::BitmapData/draw()

    So, it means that each final folder must have its own crossdomain.xml? Although the root directory has a?

    In addition, it considers that it would be strange to asking crossdomain.xml rtmp.

    Is there a way around it?

    Can anyone try to resolve my confusion please?

    Thank you.

    Flash Player clients are allowed to access flow data in the directories specified in the Client.audioSampleAccess ActionScript on the server side and Client.videoSampleAccess

    Properties:

    5th http://help.Adobe.com/en_US/FlashMediaServer/3.5_SS_ASD/WS5b3ccc516d4fbf351e63e3d11a11afc9 - 7ec3.html #WS5b3ccc516d4fbf351e63e3d11a11afc95e-7fcb

    HTH,

    Jody

  • BitmapData.draw and allowDomain

    This post in the documentation Adobe for BitmapData.draw sums up my situation:

    Quote:
    "If you control both areas in a cross-domain situation, you can use System.security.allowDomain to permit BitmapData.draw to work on several areas. Say that domain A is a BitmapData.draw call, and domain B is where the media was loaded. If domain B media are a SWF file, it can call System.security.allowDomain ("domainA.com"), and then the domain A SWF can call BitmapData.draw. »
  • Qosmio G50 - FM Tuner/TV Tuner do not work together

    Hello

    I search for a solution to my problem but still have not seen anywhere.
    My problem is with my G50 (Aust version PQG55A-04J01Y) which has the tuner FM (Toshiba FM Tuner FM - 100 v1.1.0.48) and the TV tuner (Toshiba USB DVB-T/Analog Hibrid Tuner v 2.3.3.21) built in.

    I am running Vista Home Premium (32 bit) with all the latest updates from Microsoft.
    I can't get the two to work together, they function separately.
    I'm not talking at the same time. I need to configure each one whenever I have swap between them.

    * To implement, I open WMC and go to:
    * "Tasks".
    * Settings.
    * "TV".
    * Set Up TV Signal.
    * Confirm my region as the Australia
    * WMC then download the latest info for my region and I can then "Select your TV Signal"
    * Here, I get to choose between 'Câble', 'Satalite' and 'antenna '.
    * I select 'Antenna' and click Next
    * I then have the chance to choose between:
    # "Analog terrestrial (PAL/SECAM)" - which activate the FM tuner
    # "Digital terrestrial television (DTT)" - which activates the TV

    If I set up the TV I lose access to my FM radio and WMC tells me that I don't have a FM tuner installed.
    If I set up the FM tuner I lose all my TV channels that I've saved.

    Why the two could not work together? :_|

    Hello

    > Note that in the bowels of the system, there is a 32-bit program FM tuner, but also an FM tuner 64-bit, but maybe you can run a?

    I think you can notice a program 32 bits and 64bitbit because of the different versions of Vista. Vista 64 bit OD needs a 64-bit driver and Vista 32 bit needs a 32-bit driver.

    Back to your problem with the FM and TV tuner:
    I put t have an Australian series G50, but I think the Akuma is right. Tuner FM and TV tuner is a device I think, so you can safely just sort of signals; TV or FM.

    See you soon

  • Desktop SMS and Windows Mail are not working together

    Hello

    thought I'd post here here as having a few issues with my Windows Mail but my desktop computer suffers the same problems and on a Vista forum where I posted my problem a few very useful told me who to try to solve the problems.

    One of them suddenly realized I had said my laptop is a Toshiba, and apparently the Desktop SMS and Windows Mail are not working together so that the person suggested unless I use it to uninstall apparently amongst the technically trained its known that these two programs do not like each other and explain why my office is not the problem but the laptop don't.

    After you have reset the Touch of Windows Mail (tutorial on a site http://www.vistax64.com/tutorials/ vista) wood don't be put off by vistax64 as site 32 and 64 and followed great reset Windows Mail from Brink (do not restore all mail) then uninstalled Desktop SMS and touch of the drink no more mail questions that gave me problems almost every day with marking than reading/sending project messages.

    So had to click forward then remove those bits and complete the email to send and touch wood since doing these two things as soon as send an email to the box shipment or project to obtain the number of emails in parentheses, whereas before it wouldn't happen unless I closed the program and then reopened.

    Hoping that these solutions have solved my problem and wanted to share it with someone else who wants to read this thread and you recommend Vista 64 because they are all very useful there and speak in non-technical terms for those of us not technically trained.

    Debbie

    Thanks for this piece of information. Should be useful for some of us.

  • I reciently reinstalled windows and now the fence, restore down and minimize buttons are not mixed together.

    I reciently reinstalled windows and now the fence, restore down and minimize buttons are not mixed together. they are indervidual buttons. Have all the updates and service pack installed.

    I saw the screen shot, I think that Aero is disabled, or the Desktop Window Manager Session Manager service is disabled or stopped. Try to run the troubleshooter 'display the Aero effects. " And when firstly, you had the drivers that do NOT support Aero and then updates, Windows does NOT automatically update the settings. You must recaulculate the computer for Aero Performance Index is enabled.

    Or you can see more help on this page, which contains explanations of the Aero and a link to a Web page for downlading an application which solves the problems.

    Hope that helps!

    Marko Calasan.

  • on Windows Movie Maker: when the film and the sound is not synchronized together.

    is there a way to fix this? It is the only film that I imported where the film and sound are not synchronized together, and that means I can't change it.

    Thanks for the help!

    I found a solution, thanks

  • Satellite L30 - 10 s - two 1 GB memory modules do not work together

    Hi guys,.

    So a couple of weeks ago, I bought a capsual of 1 GB for my laptop - I run vista 32 bit and I already have (1) 1 GB capsual and capsual 512 MB (1).
    The problem is that when I put the two 1GBs together, only a GB of RAM shows. But when I put a new one just in my old 512 MB and everything is fine - display of 1.5 GB of RAM.

    I read the other topics on this subject and it seems quite a common problem - but I have no idea what whatever it or speak it so any help on as BOS or something, I have to do would be great...

    Thank you a lot =)

    Hello!

    Can you please send the exact specifications of these two RAM modules?

    Hmm, I really never heard Capsual memory. I put t know why two modules of 1 GB don't work together, but maybe they are not compatible for the laptop or don t work in dual channel mode

    In your case I would try it with Kingston memory. I always use it to improve my notebooks and I m very happy.
    Normally, you can improve the Satellite L30 to 2 GB RAM Max and you need DDR2-533 modules to upgrade.

    Good bye

Maybe you are looking for

  • Installation of Outlook 2007 with Yahoo

    I have a HP Pavilion running Windows 7. I also have Office 2007. I tried several times while they years to configure outlook to work with yahoo mail and never succeeded. I need someone to guide me through it. Ken [personal information]

  • Windows startup error: Windows NT did not quite long memory

    WHEN I START MY SYSTEM FOLLOWING MESSAGE APPEARS: "WINDOWS NT HAS NOT RECOVERED MEMORY FAIRLY EXTENSIVE." 7 MB OF MEMORY SPAN IS REQUIRED TO RUN WINDOWS NT., YOU NEED TO MAYBE UPGRADE YOUR COMPUTER OR RUN A PROGRAM OF CONFIGURATION PROVIDED BY THE MA

  • How can I add popular records to my Movie Maker project?

    I'm working on my niece video bride in Windows Movie Maker.  She gave me a list of songs that she would like to have in the soundtrack.  I bought five MP3s at Amazon today.  All the play well in Media Player, but would not import into WMM, three othe

  • Windows Restore stuck

    It is a Windows 7 Pro computer that works very poorly as of late. Usually after a few minutes of running programs that they just lock up. So I tried a system restore. That did not work from a normal startup. Now I tried a safe start-up and it was 6 h

  • How to upgrade RAM memory?

    It comes to my specifications specifications: ASUS - X450CC double hearts 2117U -2 GB RAM / HDD500Gb -GPU Gforce GT720M -Windows: Win 7 64-bit Home Basic SP1 OEM original its license (updated) (I used the new Asus X450CC driver for Win 7 update of 20