Rotating objects

Hi guys,.

I tried this for a few hours today and I'm now desperate enough to ask...

In a project, I need to rotate a picture (not animated) around its Center. According to the web, there are several ways-Actionscript3, but none worked for me.

Here is my code base:

var cInner:Image = new Image;
    cInner.setImage('inner.png');
    cInner.setSize(470,470);
    cInner.setPosition(50,50);
    cont3Container.addChild(cInner); // cont3Container is used for layout purposes

I try

cInner.rotationZ = 10;

If none of the rotationX/Y/Z parameters are defined, the image magically disappears - while the AIR debugger displays always the right position and size of cInner.

Try II

cInner.rotation = 10;

It works "somehow", but deforms my image (tilt) and puts in another (x, y) coordinates.

Try III

Using the method I found here (creating a separate transition matrix). I get the same result try II: a distorted picture.

Try IV

One of my friends told me it would be wise wrap my image in a new MovieClip and rotate the full clip ("' the ' ol Flash way of doing things '"). But I did not create this special type of container:

mov = new MovieClip();
    mov.width = 470;
    mov.height = 470;
    mov.x = 50;
    mov.y = 50;
    addChild(mov); // or added to cont3Container - makes no difference

/* ... */

mov.addChild(cInner);

It is not - debugger AIR tells me, that the width of mov is 0 (zero).

I think I need an expert now. Who can help? Ugly workaround solutions are highly appreciated.

@biggerCC: the reason for the width not valid reading is because who gave reading of before is that the image is actually responsible. It takes time for the Image object to load the image of the file system. the code you have works 'instantly', so it prints it you until the load is complete. you have two options, to get a good read, you must either add an event listener and listen to the Event.COMPLETE event on the image, then retreieve and widths and heights, or you can use a built-in image and it'll work for you without the need of an event listener because the image is "preloaded" in your application.

with respect to the rotation, I never tried but looks really interesting. im going to have to try. Good luck!

Tags: BlackBerry Developers

Similar Questions

  • Bug: Slightly rotated objects.

    Nice day

    I noticed after I updated to El Capitan, my objects in Illustrator are all slightly by default turned. When I press SHIFT + click - move, my objects are not drawing to 0 degrees of Rotation. Text, as you can see on the screenshot below becomes biased. Anyone who knows this? I'll try a reboot.

    Screen Shot 2015-10-02 at 11.22.08 AM.png

    Screen Shot 2015-10-02 at 11.23.15 AM.png

    Check the angle of the constraint in the preferences > General

  • After Effects CS5.5 - rotating objects with precision?

    I searched throughout the day for an answer to this simple question and I keep finding the same answers that do NOT answer this question very simple: How to use the tool rotation accurately?  In other words, how can I make a perfect 90 degree rotation? How can I know what degree of rotation, I do?  There is nothing obviously followed rotations - I can't find anything that tells me what kind of rotation I do.  It's the most stupid thing, and I'm sure that I'm the fool who cannot see what is right in front of her, but I can't do accurate rotations.  It's 90 degrees?  It is 45?  23?  I have no idea.  And I'm really, really frustrated.  No more frustration.  I got to swear my head, actually.  I'm not necessarily talking 3d space (although it's me puzzled, also).  I speak "in 2d space general."  HOW TO ROTATE AN OBJECT WITH A SPECIFIC ROTATION ANGLE?  I played the guessing game and my project looks like garbage because none of the rotations are accurate.  Seriously, why DEVIL is something so damned hard to find? 

    Thank you.

    Display the Rotation property in the timeline panel. Enter any value you want.

    Using After Effects | The layer properties

  • How to rotate objects for a certain period of time

    h

    Animation of basic skills. You must rotate in the timeline panel, click the stopwatch to activate animations for this transformation. Create a startup key image if it is not already done. Move head to play the ending time, rotate your object and the keyframe of the judgment must be created.

    Much easier to do than to read or post.

  • Rotating objects face Center

    Hi, sorry you bug with this one - I'm usually good with math, but I'm feeling rather fragile this morning after the weekend... so I decided to put your neurons to good use instead

    All I have to do is rotate an object (which might lead at some point along each of the four sides of the screen) so that it is oriented toward the center of the screen. Of course this will be done using the .rotationZ property. I know the starting point of the object and the center point of the screen (400, 300). The object begins to confront directly ' ' (for example if it spawned directly under the center of the screen, it would be already at the correct angle).

    Thanks for any help here, I don't know if there is a command in the generation that I can use to do this easily!

    You can get the angle between two points with Math.atan2. In your case, you would do something like this:

    var ang:Number = Math.atan2 (myObject.y - 300, myObject.x - 400) * 57.295. angle in degrees
      
    myObject.rotation = ang - 90;

    I didn't try it in CS4 with rotationZ, but I drew a little circle with a vertical line extending from its center to the top. As I dragged the dotted line in front of the stage...

  • Animate 3D rotating objects

    Hello

    I work in Flash for about half a year now and consider my experience at some intermediate level. I'm really happy to Flash CS4 support for native 3D. I just opened me up to a whole new world.

    So, I learned how to use Matrix3D. I figured out how to rotate on a base object:

    Home.Transform.Matrix3D.appendRotation (90, Vector3D.Y_AXIS);

    Works great. I am now trying to animate a fluid movement so that it starts at 0 and moves at 90. I worked in PaperVision3D, I remember using Tweener to adjust the the mcs property directly. However I don't know where start animating in Flash 3D.

    I have attached my attempt of newbish even to do. There may be another option, as one built on the basis of interpolation SHOULD I use?

    If I say that, I think I can do some pretty cool stuff!

    Thanks in advance!

    lol * raises its head in shame *.

    So yes, apparently I can attribute a property called .rotateY. How... practice instead of transformation. Matrix... blah blah. It then informed me that Tweener and other packages based typical animation should work...

    ... then I answered my own question. ;-)

  • Rotate objects and stamps?

    Hello! I work in a store tools and matrices. We use Acrobat Standard XI for part master prints for each job. Each print has a job number, revision level and short list of quality information we have a dynamic character. Sometimes, the information is the same for several jobs; However, I can not always copy and paste because when I do the stamp automatically turns 90 degrees. Is it possible to rotate the stamp without having to start over? I searched the site forums and help for weeks and have found solutions, but they do not seem to work for me.

    Thanks in advance for any help!

    Paige

    You can rotate a stamp - it was the first place, or after you copy & paste into a new document:

    Select your stamp and then place your mouse cursor on the rotation "handle" at the top of the stamp (as shown in the screenshot above). Your cursor should change the cursor of rotation as shown. You can now drag the mouse to rotate the stamp. When you hold down the SHIFT key while turning, your angles of rotation will be constrained to multiples of 45deg.

  • Keyframe rotating objects to go from fast to slow

    Hey all,.

    I use the CC Ball Action plugin to create a column of spheres in rotation. I want the spheres to turn quickly, and then quickly (and dramatically) slow down. I have defined key frames, the balls turn quickly. But rather than slow down, they stop before starting again more slowly.

    A few tips on how to get them simply slow down without stopping?

    Thank you!

    Screen Shot 2012-03-14 at 12.59.11 AM.png

    I think you're simply misunderstanding the roattion parameter. This is an absolute angle, not a number of turns per second, or something like that. The ease in the Middle keyframe seems as if the animation stops. Just get rid of it and adjust the tension of the curve of the remeianing of the keyframes in the graph Editor to create a speed ramp.

    Mylenium

  • I can't resize/rotate object

    Newbie here!  I have a picture that I can catch and move, but I can't resize by clicking on a corner.  In fact, when I run the cursor over them, there isn't a box around it, it just shows the path and anchor point.  Did disable a setting?  Is there a reset settings button?  I have to do something with layers?  Need some help here.  Probably simple uber.  Thank you!

    Turn on encompassing.

  • Hardly no explainable inclined object (rotation) no issue of scrolling

    Thank you for your patience.

    I want my design elements to have a 4 degrees of tilt. I want to make rectangles so I may have some effects of scroll inside of them.

    I can't give a width of 100% rotated object so I have really wide rectangles. The problem is that these objects broad effect the width of the page.

    So the question is I can either:

    (A) make an object does not contribute to the width of the page?

    (B) make a skewed rectangle, or something else, which may have 100% width?

    I can't be the first to want that bit tilted look, perhaps there is another solution entirely.

    Here is a picture below where you can see the rotated rectangles.

    Thank you for your help in advance.

    Screen Shot 2015-08-14 at 8.53.36 am.png

    Unfortunately, we cannot make the width for content rotation, I think you're referring to different forms that can be used as full-width.

    More details:

    https://forums.Adobe.com/thread/1392874

    Thank you

    Sanjit

  • Error object rotation (Rotation of 180 degrees)

    Hello

    When I'm shooting a text in a text field (pallets-> Object-> layout-> buttons "turn to...") ', an error message appears "error of rotation of the object. 1 item (s) can not be turned 180 degrees. Rotation will cause the objects to appear outside the page boundaries. " However, the size of the text field are sufficient for this text. Does anyone have this situation?

    I thank very you much in advance!

    Kind regards

    Andrey

    You must place the textfield object more to the center of the shape before you rotate or change the anchor point "Center".

    The center of rotation is the handle that is selected in the drop-down box anchor (default value is "top left").

    The rotation does not change the dimensions of an object, so it can happen that the rotated object ecaple page borders.

    In this case the rotation does not run and you get an error message.

  • Find the angle of rotation of the anchored object, replace that specific object by letter

    I got indd file customer. General problem is that he described certain letters of the words.

    In fact, he described the letter e and that it rotates 180 °. It also makes with the letter c and there a rotation that anchored-178, 8250 ° oppose.

    Now, I tried to change this objects to the real letters. Problem is that I can't find the option for the rotation of an object in the Find/Replace dialog box, and also I can't fint in Grep. So, what are my options?

    Thanks in advance...

    PS. If there is a possibility to change one of them, I can change a second with finding anchored object and change it to specific letter...

    Looks like someone could not find the real schwa or o open on their keyboards

    Possible, but tricky.

    This Javascript will search history containing the text for items cursor which rotated 180 degrees and replace them with a question mark. Replace the question mark with the character really wanted in notation Unicode Javascript ("\u... ("-here character four-digit hexadecimal code).

    It really isn't a good way to check if it really is one that you should be replacing, so it does not blindly on all 180 degrees of rotation objects...

    (You can simply change the "180" to your another number to check the other characters).

    all_text = app.selection[0].parentStory;
    
    for (thingy=all_text.allPageItems.length-1; thingy>=0; thingy--)
    {
         alert (all_text.allPageItems[thingy].rotationAngle);
         if (all_text.allPageItems[thingy].rotationAngle == 180)
         {
              all_text.characters[all_text.allPageItems[thingy].parent.index].contents = "?";
         }
    }
    
  • How to find ROTATING vector objects in Illustrator

    Hi guys,.

    If I flip a line or box how can I find how much this object rotated. I mean I want to that of rotation in degrees. Some knows the solution to this issue, if it please let me know...

    Thanks in advance...

    HARIPicture 2.png

    To rotate objects in a vertical position, you can try this technique: http//www..vektorgarten.de/img/tut/rotate-back.mov

    Turn on the guides.

  • Make the camera zoom and rotation around object

    This has been requested before - and no response. Then.

    "Is there an easy way to duplicate the kind of camera rotation in the Director 3D preview window? -That is, where the horizontal movement of the mouse rotates the camera around the axis Y the world and vertical motion rotates around a Z axis relative to the camera (or something... eh, as lines of longitude and latitude on a globe). »

    I'm doing a model viewer, and the camera of the orbit and behaviors to rotate objects are not very convincing...

    I thank very you much for any help.

    Quote:
    [Posted by: ] wacko
    "Is there an easy way to duplicate the kind of camera rotation in the Director 3D preview window? -That is, where the horizontal movement of the mouse rotates the camera around the axis Y the world and vertical motion rotates around a Z axis relative to the camera (or something... eh, as lines of longitude and latitude on a globe). »

    I'm doing a model viewer, and the camera of the orbit and behaviors to rotate objects are not very convincing...

    Consider this example: http://necromanthus.com/Games/ShockWave/tutorials/PanCamera.html
    To "Zoom In / Zoom Out" just to translate the camera on its axis of 'X '.
    see you soon

  • Rotation tool rotates counterclockwise, when he must turn to the right.

    Here in the United Kingdom, I thought when we have something turn of 90 degrees, the object would turn clockwise by 90 degrees.  For example, I have a standing lamp post in front of me.  If I rotate it 90 degrees with the axis, the basis, I expect keel right that I have in front, in other words, it rotates 90 degrees to the right, swing to there base.

    However, when I go to Illustrator, create a new object, double-click the Rotate tool and type '90' and 'Enter'... and the object rotates 90 degrees to the left...

    I don't even know if it's supposed to be like this, I searched online and could not find similar problems, so I don't know if everyone always turns things to the left by default.  I however find it paradoxical and would like to know if there is a setting that I can change or if there is a way to reverse this trend, so that I can rotate objects clockwise by default?

    I look forward to any comments is on this...

    Hi Tom,

    You can always request a feature here:

    Feature request/Bug Report Form

Maybe you are looking for

  • Signs of bleeding each other - not on other browsers site

    I joined and example. The site is www.itsmf.org.za When I look on Safari, Chrome or Opera, it's fine, but he's bleeding, in this way, with firefox. I am running firefox: 41.0.1I'm running OS/x: 10.11 (A 15, 284) Any suggestions to fix this would be a

  • HP Pavilion Slimline s3315.uk graphical update

    My children have a HP Pavilion Slimline s3315.uk but I must improve the graphics cards, but don't want to spend too much. I was wondering if the ATI Radeon HD4650 1 GB DDR2 VGA/DVI PCI Express can be a good option. Any ideas?

  • How to create a channel for a PXI-6509

    I'm working on a program to fight the PXI-6509. The only area that I have problems with creates the string by calling the function DAQmxCreateDOChan. I get no errors during the first DAQmxCreateTask, but get an error when you try to create the channe

  • fingerprint driver has stopped working

    Hello Some time ago I bought a HP dv6-6135dx laptop PC with Kasperky Antivirus 2011, no problem so far, until recently. I decided to uninstall the AV because the license has expired and, because of this, the fingerprint driver stopped working (I use

  • Foglight - Powershell

    Hello Can someone point me to the example of the use of Powershell as custom agent? I found this, but I don't know exactly how the two things are handled https://support.quest.com/SolutionDetail.aspx?ID=SOL56005&category=solutions&SKB=1 (1) this caus