Ask a Question related to Macromedia Director Basics, Design and Development.

  1. #1

    Default Rotate Image

    Hi,

    I'd like to know how to rotate an image A and then, with copyPixels,
    insert it into image B, is this possible?

    If you have any function/method done that rotates an image a certain
    number of degrees please post it.

    I think this is done using quads, but I'm having trouble to do it
    right.


    TomaHawK Guest

  2. Similar Questions and Discussions

    1. RE-rotate
      Hi, all I have a scene include only one cast member called "cube" and this cast member include model called "red", all my need to do is "when I...
    2. 3d rotate
      Is there a way or some software that will allow me to rotate an image forward, like it is on an axis that is paralell to the ground? I am trying...
    3. Rotate Tool Won't Rotate
      I'm sure this is a simple thing, but I'm blind on it. I've got Freehand MX running on Panther. When I select an object, click the rotate tool and try...
    4. CCW Rotate and 180 rotate in PS CS are not working properly
      I have installed the singel version of Photoshop CS on a G4 under Panther and a newly purchased G5 using Panther. When a bitmap file is created (i.e....
    5. Help on Rotate in 3D
      I'm trying to get the camera to move and rotate to a set position over a number of keyframes. It does this when the mouse is run over another sprite....
  3. #2

    Default Re: Rotate Image

    of course, multiples of 90 degrees are a breeze to do with quads.

    a cheat for other angles, for those trig impaired types, is to have
    director do the rotation to quad conversion, on stage.

    1. make a 3x3 pixel bitmap member, with centered regpoint.

    2. place on stage, make inviible using ink, blend v,isibility or
    location proeperty. This is the invisible 'survey sprite'

    whan about to do copybits

    a. set the rect of the invisible survey sprite to the destination rect
    updatestage

    b. set the rotation of the sprite to desired angle.

    c. get the resulting quad of the sprite, apply this quad to copybits
    destination, might need an ink or mask parameter to hide encloding rect
    edges.
    JB Guest

  4. #3

    Default Re: Rotate Image

    Thank you for input, but as I'm not an imaging Lingo expert I don't
    get much of it :(

    Do you have anything already done that you can post?
    That would be of a great help.

    Thanks

    On Sun, 24 Aug 2003 16:17:35 -0700, JB <lingoguy@sbcglobal.net> wrote:
    >of course, multiples of 90 degrees are a breeze to do with quads.
    >
    >a cheat for other angles, for those trig impaired types, is to have
    >director do the rotation to quad conversion, on stage.
    >
    >1. make a 3x3 pixel bitmap member, with centered regpoint.
    >
    >2. place on stage, make inviible using ink, blend v,isibility or
    >location proeperty. This is the invisible 'survey sprite'
    >
    > whan about to do copybits
    >
    >a. set the rect of the invisible survey sprite to the destination rect
    > updatestage
    >
    >b. set the rotation of the sprite to desired angle.
    >
    >c. get the resulting quad of the sprite, apply this quad to copybits
    >destination, might need an ink or mask parameter to hide encloding rect
    >edges.
    TomaHawK Guest

  5. #4

    Default Re:Rotate Image

    on rectToQuad(r)
    return [\
    point(r[1],r[2]),\
    point(r[3],r[2]),\
    point(r[1],r[4]),\
    point(r[3],r[4])\
    ]
    end

    on getAngle(p0,p1)
    y = p1[2] - p0[2] + 0.000001
    x = p1[1] - p0[1] + 0.000001
    if(y < 0 and x > 0) then beta = 360
    if(y > 0 and x > 0) then beta = 0
    if(x < 0) then beta = 180
    return atan(y/x) * 180/pi + beta
    end

    on rotatePointTo (p0,p1,angle)
    radius = sqrt((p0[1] - p1[1])*(p0[1] - p1[1]) + (p0[2] - p1[2])*(p0[2] - p1[2]))
    return point(cos(angle*pi/180)*radius + p0[1],sin (angle*pi/180)*radius + p0[2])
    end

    on rotatePointBy (p0,p1,angle)
    return rotatePointTo (p0,p1,angle + getAngle(p0,p1))
    end


    [Not Responding] webforumsuser@macromedia.com Guest

  6. #5

    Default Re:Rotate Image

    i'm not sure about the superimposition of pics, but to just simply rotate an image/sprite, go to property inspector and be sure that the entire window is opened up at the bottom so that it shows your x,y coordinates etc., and to rotate merely change the number in the 3rd box down from the left in the drop down window (just under your y coordinate, has a little arrow in a circle next to box).....this will rotate your image and also note that you can use negative numbers.....please let me know if this helped.....i wish i could help somebody, i wish i could get helped !...


    D.Reefus webforumsuser@macromedia.com Guest

  7. #6

    Default Re:Rotate Image

    Kinda hard to understand what you mean exactly...but here goes nothing...

    on enterFrame me

    repeat while sprite(X).blend > 0

    sprite(X).rotate = sprite(X).rotate + Y
    sprite(X).blend = sprite(X).blend - N
    updateStage

    end repeat

    end

    This will rotate "sprite X" (X being the number of your sprite of course) along with changing the blend (opacity) of it as well by rotation increments of Y and opacity decrements of N until sprite X is completely transparent. Theres probably a good measure of rotation degrees combined with the level of opacity, but I'm too lazy to do the math for ya. Hope this is something you can use....I never used copyPixels() before I'm sure you can do some kind of member swaping method of some kind.


    Eberlini webforumsuser@macromedia.com Guest

  8. #7

    Default rotate image

    Hi there,

    I'm rotating an image in director via Lingo.
    The thing is that the image looks pretty "jagged" after the rotation.
    I've tried with booth png and jpg.

    Can I come around this?

    /Emil


    Emil RT webforumsuser@macromedia.com Guest

  9. #8

    Default Re: rotate image

    You could use Effector Set I from
    [url]http://www.medialab.com/products/EffectorSets.htm[/url]
    Or have the original rather larger than the image you want displayed and use
    copyPixels with quads to shrink and rotate the image.
    Or make the shape as a vector shape.

    You can search in the advanced groups search at groups.google.com for previous
    posts on the above subjects.

    Andrew

    Andrew Morton Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139