Hi,
my problem is that even if the registration point of the MC I want to rotate is in its center it keeps rotating in its upper left corn.
The MC is a jpg I load dynamically.
The syntax I use is :
_root.photo._rotation += 90;
Any idea?
TY.
Hi,
my problem is that even if the registration point of the MC I want to rotate is in its center it keeps rotating in its upper left corn.
The MC is a jpg I load dynamically.
The syntax I use is :
_root.photo._rotation += 90;
Any idea?
TY.
post your fla here so we can take a look at it…
jpgs dont load in the center. They load from the upperleft corner down like in reading a page. What you can do is put the movieclip you load the image into inside another movieclip and position the jpg clip accordingly so you can rotate that new movieclip which holds it and have the image rotate from the center (which would be up and to the left from the center)
good to hear that…
I mean…
if I do the following:
_root.createEmptyMovieClip(“container”,1);
container.loadMovie(“flower.jpg”);
_root.container._rotation +=90;
I know that the mc rotates in the upper left corner but
if I draw a rectangle , I convert it into a mc and I set the registration point in its center and only than I load the jpg I believed that the rotation was in its center…
Why am I wrong?
Well you were wrong, that’s all jpgs (and swfs) don’t load in the center. But you can make a little script that will move your jpg when it’s loaded :phil:
it doesnt matter what you draw in the movieclip, like I said, loaded images always load from the upperleft corner down (and to the right). This is from the centerpoint of the movieclip they’re loaded into.
+-------
| |
| image |
| |
-------
also, as I said before, what you’ll have to do is have another movieclip to put it into so you can rotate that instead, positioning the loaded image within accordingly.
if the image is 240x480 then youd position container to be -120, -240 within the new rotating clip
_root.createEmptyMovieClip(“rotater”,1);
_root.rotater.createEmptyMovieClip(“container”,1);
_root.rotater.container._x = -120;
_root.rotater.container._y = -240;
_root.rotater.container.loadMovie(“flower.jpg”);
_root.rotater._rotation +=90;
Stop repeating what I say, Sen :bad: [SIZE=1]especially when I’m repeating what you’ve already said…[/SIZE]
stop writing such short replies so you dont post them faster than I can write mine
do like me, always post something usefull
ok
see?
another useful post
you always have to have the last post dont you
told you :beam:
let me have the last word! :bad:
ok
I appreciated your suggestions…it works fine now.
I need to work on it anyway.
Bye
:: Copyright KIRUPA 2024 //--