Rotating Ellipses
Hi,It's my first post here. I want to make a dynamically (using Drawing API) drawn ellipse rotate around its axis. It involves a lot of trigonometry which I'm not very good in .Can someone help ? Thanks
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 02-23-2005, 12:44 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Rotating Ellipses
Hi,
It's my first post here.
I want to make a dynamically (using Drawing API) drawn ellipse rotate around its axis. It involves a lot of trigonometry which I'm not very good in .
Can someone help ?
Thanks
Text Limiting Ellipses
I have text from an RSS feed parsed using AS3 and displayed on the stage in a few dynamic text fields. Some of the text is too long and I would like to limit the text in the field to "x" amount of characters and insert an ellipses (...) character when that limit is reached. Cannot seem to find any mention of it in the Adobe Help. Is there such a method or class that will do this? Help.
Forrest
Text Limiting Ellipses
I have text from an RSS feed parsed using AS3 and displayed on the stage in a few dynamic text fields. Some of the text is too long and I would like to limit the text in the field to "x" amount of characters and insert an ellipses (...) character when that limit is reached. Cannot seem to find any mention of it in the Adobe Help. Is there such a method or class that will do this? Help.
Forrest
Truncating And Adding Ellipses (...) To Texfields
does anyone know how to limit the lines of text in a dynamic textfield and then add the ellipsis (...) at the end?
i'm populating a dynamic textfield via XML and i only want the first two lines of text to be displayed. anything after that will be truncated and the ellipsis will be added.
seems simple enough but i'm having trouble getting it right.
thanks for your help!
Rotating Boxes-non-rotating Box/text
i have a rotating menu(boxes in circular motion). when a box is rolled over, all stop, but the text box that should appear in the middle between them, is not appearing where it should. it seems to be following the animation of its parent box.....any ideas?
jas
Moon Rotating Around Rotating Earth
I've got my earth revolving around the sun. I can't get the moon to revolve around the earth while it is revolving around the sun. Has anyone done this before, or is willing to help out?
Thanks
Rotating Menu With Non-Rotating Labels
I have a rotating menu that sets the selected button to the 3:00 position once clicked. I need the labels for the buttons to stay in the upright position as they rotate with the button. I have attached an image the help explain what I am trying to do. Anyone know of an action script that would keep the labels upright?
Rotating Mc
hi, anyone knows hows how to rotate a mc in circle using an action script instead of keyframing.
Thanx Giano
Rotating
I want to rotate a basic line, not from the centre but from one end, using the mouse_drag.
I want the line to move only within a certain range of angle.
does anyone know of how this is done or can anyone direct me to a tutorial for this.
Rotating
i found a web site sunday night that had an image of a plane or somethin cant excatly remeber what it was, but there were 3-4 of the same image. it would rotate in a circular motion til the next one was in front. couldnt find it tonight. does anyone know how to do that? i want to do some hearts the same way. please help. thanx
Rotating A MC
hi.
lets say i have a graphic of a box and i set the behavior as a movie clip and gave it an instance name of 'box'
and lets say i have a two buttons on the stage...
now my question is... what is the actionscript or how do i make it so button 1, when clicked, rotates the box 45 degrees clockwise each time its clicked and button 2 would make the box rotate counter clockwise 45 degress each time it is clicked?
Rotating A MC
hi.
lets say i have a graphic of a box and i set the behavior as a movie clip and gave it an instance name of 'box'
and lets say i have a two buttons on the stage...
now my question is... what is the actionscript or how do i make it so button 1, when clicked, rotates the box 45 degrees clockwise each time its clicked and button 2 would make the box rotate counter clockwise 45 degress each time it is clicked?
using flash 5
also.. how would i make a MC 'flip' horizontally or vertically when clicking a button?
Rotating
I have created a circle and I want it to continuously rotate. I have received many suggestions about what to include in the actionscript, but none of the suggestions have worked. I am a newbie when it comes to flash, but I am completely clueless when it comes to actionscripting. If someone could help me out I would greatly appreciate it.
The object is the outline of a circle. Here is the actionscript I have so far.
actions for the frame:
function rotate (circle) {
eval(circle).rotation += 2;
}
actions for object:
onClipEvent (enterFrame) {
_root.rotate(_parent);
}
the name of the instance is "circle"
Rotating JPG
I have been asked to create a rotating JPG image that pulls the filenames from a configuration file or that can pull the image filenames from a directory. This way, the images can be changed without updating the Flash file. Any suggestions?
Rotating
Hi,
I'm working on puzzle project for my site.
I was hit on the wall when i need to rotate puzzle. I dont know how to achieve these with actionscript.
I need make option for any piece of puzzle to rotate whet user click on any edge. And then start rotate it with mouse still pressed.
CAN ANYONE HLEP ME HERE ?
regards,
dbMG
Rotating ORB
Anyone have a tutorial or know how to do the rotating orb effect in flash?
Thanks
Prophecy
Help Me With Rotating
I have imported a PNG as an object. And I want to rotate it.
Now if i play it in Flash MX it looks fine and smooth, but if i play it externally (Ctrl+Enter) it looks awful! the animation speed is alrigt, but the quality of the rotation sucks - it's very blocky.
it looks very nice in MX but outside the resampling sucks. any ideas? - is there an option i need to turn on?
Rotating Box
To start off,
Hi. My name is Roger. 19years old, live in Norway.
Write PHP, graphics, and now I'm thinking about learning some simple flash.
I've used Swish, once upon a time, but who cares.
I want to create a rotating box. White, with black edges. So, the $10,000 question is, have I come to the right place?
Hope to get some good replies! Thanks
Rotating Box
To start off,
Hi. My name is Roger. 19years old, live in Norway.
Write PHP, graphics, and now I'm thinking about learning some simple flash.
I've used Swish, once upon a time, but who cares.
I want to create a rotating box. White, with black edges. So, the $10,000 question is, have I come to the right place?
Hope to get some good replies! Thanks
Rotating With AS
Hi,
I am still quite new to AS. I'd like to rotate a circle (compass_mc) around its centerpoint slowly forth/back with +/- 45 degree...or better randomly.
As file size is important, I can not solve it with MotionTween.
Up to this time I applied this code to the MC, which endlessly rotates it:
iranytu_mc.onEnterFrame = function(){
this._rotation+=1;
}
Do you have any idea how to apply that sort of random slow forth/back rotation to the circle with AS?
Many thanks,
Bacizone
Rotating
hey people does anyone know how to create this effect with the menu the coral
where you move the the slider to rotate the menu. or even if you click on a button and it rotates (one for left one for right) etc
Rotating
EDIT: I put [ as ] tags around your code - makes it much easier to read - jbum
Hi i have this code that tweens scale and position of a movieclip, and with my limited as knowledge have tried to make it rotate a movieclip too, alas to no avail. any help would be greatly appreciated!
code:
/*EASING ************************************************** ********************/
function ease (objet, targetX, targetY, speed) {
if(!easingArray) {
easingArray = [[],[]];
}
var found = false;
for(i=0; i<=easingArray[0].length; i++) {
if(easingArray[0][i] == objet) {
found = true;
if(easingArray[1][i] != objet._easing) {
clearInterval(easingArray[1][i]);
easingArray[1][i] = objet._easing;
};
if( (Math.ceil(objet._x) < ( Math.ceil(targetX - 1) ) ) || (Math.ceil(objet._x) > ( Math.ceil(targetX + 1) ) ) ){
objet._x += (targetX - objet._x)/speed;
} else {
objet._x = targetX;
};
if( (Math.ceil(objet._y) < ( Math.ceil(targetY - 1) ) ) || (Math.ceil(objet._y) > ( Math.ceil(targetY + 1) ) ) ){
objet._y += (targetY - objet._y)/speed;
} else {
objet._y = targetY;
};
if( (objet._x == targetX) && (objet._y == targetY) ) {
clearInterval(objet._easing);
};
};
};
if (found == false) {
var long = easingArray[0].length
easingArray[0][long] = objet;
easingArray[1][long]= objet._easing;
}
};
Movieclip.prototype.easing = function (targetX, targetY, speed) {
trace("ease");
clearInterval(this._easing);
this._easing = setInterval(ease, 40, this, targetX, targetY, speed);
}
/************************************************** ***************************/
/** RESIZE ************************************************** *****************/
function resizeMC (objet, X, Y, speed) {
trace("Resize");
if(!resizeMCArray) {
resizeMCArray = [[],[]];
}
var found = false;
for(i=0; i<=resizeMCArray[0].length; i++) {
if(resizeMCArray[0][i] == objet) {
found = true;
if(resizeMCArray[1][i] != objet._resize) {
clearInterval(resizeMCArray[1][i]);
resizeMCArray[1][i] = objet._resize;
};
if( (Math.ceil(objet._width) < ( Math.ceil(X - 1) ) ) || (Math.ceil(objet._width) > ( Math.ceil(X + 1) ) ) ){
objet._width += (X - objet._width)/speed;
} else {
objet._width = X;
};
if( (Math.ceil(objet._height) < ( Math.ceil(Y - 1) ) ) || (Math.ceil(objet._height) > ( Math.ceil(Y + 1) ) ) ){
objet._height += (Y - objet._height)/speed;
} else {
objet._height = Y;
};
if( (objet._width == X) && (objet._height == Y) ) {
clearInterval(objet._resize);
};
};
};
if (found == false) {
var long = resizeMCArray[0].length
resizeMCArray[0][long] = objet;
resizeMCArray[1][long]= objet._resize;
}
};
Movieclip.prototype.resize = function (targetX, targetY, speed) {
trace("rez");
clearInterval(this._resize);
this._resize = setInterval(resizeMC, 40, this, targetX, targetY, speed);
}
/************************************************** ***************************/
/** rotation ************************************************** *****************/
function rotationMC (objet, rotation, speed) {
trace("rotation");
if(!rotationMCArray) {
rotationMCArray = [[],[]];
}
var found = false;
for(i=0; i<=rotationMCArray[0].rotation; i++) {
if(rotationMCArray[0][i] == objet) {
found = true;
if(rotationMCArray[1][i] != objet._rotation) {
clearInterval(rotationMCArray[1][i]);
rotationMCArray[1][i] = objet._rotation;
};
if( (Math.ceil(objet._rotation) < ( Math.ceil( - 1) ) ) || (Math.ceil(objet._rotation) > ( Math.ceil( + 1) ) ) ){
objet._rotation += ( - objet._rotation)/speed;
} else {
objet._rotation = rotation;
};
if( (objet._rotation == rotation) ) {
clearInterval(objet._rotation);
};
};
};
if (found == false) {
var long = rotationMCArray[0]._rotation
rotationMCArray[0][long] = objet;
rotationMCArray[1][long]= objet._rotation;
}
};
Movieclip.prototype.rotation = function (rotation, speed) {
trace("rot");
clearInterval(this._rotation);
this._rotation = setInterval(rotationMC, 40, this, _rotation, speed);
}
/************************************************** ***************************/
this.btnR.onRelease = function () {
trace("coucou");
MC1.resize (200, 200, 10);
MC2.resize (200, 200, 10);
}
this.btnRE.onRelease = function () {
MC1.rotation (180, 10);
}
this.btnE.onRelease = function () {
MC1.easing (10, 250, 50);
MC2.easing (250, 250, 50);
}
this.btnReset.onRelease = function () {
MC1.resize (100, 100, 10);
MC2.resize (100, 100, 10);
MC1.easing (17, 19, 10);
MC2.easing (202, 25.9, 10);
MC1.rotation (0, 10);
MC2.rotation (0, 10);
}
Rotating 3D
Hi.
http://www.korsmyrasnickeri.se/3dvis/3duf1_2.htm
Does anyone know how to create this effect? Is there a script to use somewhere?
I have the rendered 3D-images, I just want to script it so that it rotates with the cursor, frame by frame.
TIA
/housefly
Rotating X,y
Hi,
what maths/code would I use to apply a rotation of n degree's to x, y coordinates?
thanks
boombanguk
Better Way Of Rotating?
Ok, quick question. I have to rotate 4-10 balls during a game and when I do this, the fps drops from 50 to 32 (using 4 balls). I tried having them only rotate every 3 or 4 frames, but it only helped a few +fps but it looked horrible. Is there a better way to do this?
Rotating Gif
hi there,
i would like a gif to rotate, spin constantly if possible.
if you visit this page , http://www.tweedmill.co.uk/newA/cafe.html
you will see and circular image displaying "Les Routiers ". At the moment its static but i would love it if it could rotate.
could anyone help me with this?
cheers
Rotating Mc
Hy guys me again. Have another problem which I cant solve. The problem is that i would like to rotate my mc on the press of a button. But i cant. The transition works the way i want it to but the problem is that it starts in the end ad finishes at the begging. if t change the IN to OUT works perfectly but disappears on the end or jumps to the beginning.
Can anyone help me. I didn't put any code in because noting works
my_mc.rotation = 90; works but there is no animation in between 0 and 90 degrees.
tnx in advance
GP
Rotating On The.. Erm.. Z...? X....? Y...?
I would like to be able to do this:
http://www1.ap.dell.com/content/products/productdetails.aspx/xpsdt_710?c=au&cs=audhs1&l=en&s=dhs
Do I need any special plugin?
I realise one of the steps is taking photos, but how do I stitch them together in Flash?
On a side note, has Flash CS3 been released yet?
3D Rotating Box?
Does anyone know of a way to create a Box with 4(maybe more) sides that can/will rotate... then pause on a side... rotate... then pause on a side... etc.?
I see this Flash Component at FlashLoaded.com but I'm not sure if it's correct. Looks like a 3d box but...
I would like my box to be a Rectangle that has links to 'Movie 1' - 'Movie 2' - 'Movie 3' - etc.
That's why I want to build it with a Pause. This is to give the user time to Click the Link.
All help is greatly appreciated.
Rotating 360
Ok so I want to rotate a picture in a complete circle, how is this done rather than doing it using motion tween? what action script would be best?
3D Rotating Nav
Found this menu idea that I would like to experiment with, but I'm not too good with math in flash yet.
Question: Is it possible to make this menu rotate horizontally instead of vertically?
I've fooled around with a bunch of other horizontally rotating menus, but I like this particular idea the best and would like to see what it looks like as a horizontal menu.
thanks.
Rotating MC
hey,
I searched the forums and found a few threads, but they didn't seem to give me the information I needed.
I have this as my menu, which I would like to rotate (as you might see)
The squares on uses this code to glide around the stage:
//determines how fast the MC morphs
onClipEvent (enterFrame) {
power = 6;
}
//makes the MC "sqaure" morph into the size the 'button' specifies
onClipEvent (enterFrame) {
if (_root.squareONEx) {
speedx = (_x-_parent.squareONEx)/power;
speedy = (_y-_parent.squareONEy)/power;
_x -= speedx;
_y -= speedy;
}
}
Id like to put them into a new MC and add a code, so that the texts get displayed right. No matter which rotation its at.
Can anybody help me with this.
They need to be rotated 0 degrees, 90 degrees, 180 degrees and 270 degrees ccw to display the text rightly, as you can see.
Hope somebody can help me with a script here.
Thanks VERY much in advance
Morten Rosenberg
Rotating Help
Anyone know how to make a MC point (rotate) to where the mouse was clicked on stage ?
Rotating A MC
ok, i'd like to have a circle with pic contained within it. I'd like to rotate the circle but have the picture always remain right side up as the circle rotates (like a viewmaster, that will be the final navigation). I'm kinda lost on just how to achieve this effect. Any help would be greatly appreciated.
Thank you.
tim
[as2] Rotating Mc
Hey all,
hope you can help me...
I would like to rotate a parent mc, every time the child mc hits frame 31.
If I use this._rotation=+10, once the mc hits frame 31, the mc rotates non-stop.
I want it to rotate only 10 degrees - once - everytime it hits frame 31.
Bless me with thoust knowledge
-adam
Rotating Cog
Would anyone know where or how I could make a 3d turning cog ?
I am looking for the cog to look something like this -> http://spaciest.com/cog.gif
Any help will be much appreciated
Rotating Menu
Hi everyone, im looking for some help. im using a rotating menu on my site, which i got from a tutorial from this site.if anyones familiar with it you maybe able to help me. basically the menu spins depending on where the cursor is on the movie so if the mouse is in the top half of the movie it spins up,and the same for down. it also enlarges if you go closer to the menu. this is what i want to stop. i want the spinning menu but i dont want it to enlarge.im very new to this actionscipt so all help would be appreciated. you can see what ive done so far on the front end of my site.
http://www.purplesquare.net
its very new and doesnt have much on it but watch this space for the future.
also there a forum on my site which you can register, just like here,and you can post messages there so give it a go.
thanks in advance
melv
Get X Value Of Rotating Graphic
Not a problem you would think..
I would like to get the x value of a ball MC, which is contained in a movieclip that's rotating via an enterframe clip event.
i.e.
I have a moviclip called "ball" which is located in a moviclip called "rotate", this actionScript is on the clip event of "rotate".
onClipEvent (enterFrame) {
setProperty ("_root.rotate", _rotation, _rotation+10);
..:xBall = getProperty("-root.rotate.ball", _x);
}
However this appears to return a value of x IN RELATION to my rotate MC, i.e. it's a static value.
Is there a way of getting Flash to return properties in relation to the stage, or do I have to hit that maths books again!
I tired using a controlClip insted of the clipevent script but that gave me a very strange x value????
Thanks for any pointers in advance,
Stu
Rotating And Shrinking
Why do my movie clips that are rotating using actionscript allways shrinking after some time and is there a way to fix that?
Rotating And Shrinking
Why do my movie clips that are rotating using actionscript allways shrinking after some time and is there a way to fix that?
Rotating A Gun And Fireing.
We are making a game with a gun that we wish to rotate and fire out of. We are able to rotate the gun but are having trouble getting a movieclip to move from the gun in the correct angle and continue to go at the same angle. Please help!
3D Rotating Interface
I have designed a 3D rotating interface that moves according to the mouse position - similar to the one used on http://www.egomedia.com in the 'process' section. I have 8 panels, and am using the swapDepths action to make it so that when one panel is infront of another it's level is greater and therefore the proportion of the back panel covered is hidden. However, I want the part of the back panel covered by the front panel to have a reduced alpha rather than be completely hidden. How do I do this? I can't work out how to do it by changing the levels using swapDepths - is there another method?
Thanks for your time,
Shaka
Rotating MC - Mouseover?
Help will be appreciated.
I have a rotating MC (using tween). How can make it stop with mouseover?
Rotating 3d Navigation
I need an Fla,Or Director file for a navigation system as similar to
http://www.kerb.co.uk (look in the services section)
http://www.navihedron.com
Or any links to a Director site with forum...
Many Thanks
C
Rotating Object
how can i rotate an object non-stop?
Can anyone pls helpppppp
W.
Rotating Dial
Does anyone know where I can find a rotating dial? I found one that rotates the dial 360 degrees, but I only need it to rotate 180 degrees. Here's the ActionScript. I don't know if anyone can help.. thanks..
// these functions get called in the
// onPress and onRelease action of the
// knob button
function startRotate () {
state = DRAGGING;
}
function stopRotate () {
state = COASTING;
}
function getRotationFromMouse () {
// Set Up initial variables
someNum = 0.0175;
Xpos = _root._xmouse;
Ypos = _root._ymouse;
circleXpos = _x;
circleYpos = _y;
x = Xpos-circleXpos;
y = Ypos-circleYpos;
r = Math.sqrt((x*x)+(y*y));
// too far from the center of the radar
// stop the dragging
if ( r > _width<<2 ) {
return 0;
}
sinTheta = y/r;
theta = Math.asin(sinTheta);
// check quadrants & do the rotations
if (Xpos < circleXpos)
val = (180-(theta/someNum)+90);
else if (Xpos>circleXpos)
val = (theta/someNum+90);
return val;
}
function setRotation ( angle ) {
knob._rotation = angle;
m_lastRotation = m_rotation;
if (knob._rotation < 0 )
m_rotation = knob._rotation + 360;
else
m_rotation = knob._rotation;
m_rotationDiff = m_rotation - m_lastRotation;
if (m_rotationDiff < -200 )
m_rotationDiff += 360;
if (m_rotationDiff > 200 )
m_rotationDiff -= 360;
lg_wedge._rotation += m_rotationDiff/6;
}
function checkRotation ( ) {
//zeroAdjust = 90;
rotation = knob._rotation;
if (rotation < 0 )
rotation += 360;
// HERE YOU CAN CHECK THE KNOB's ANGLE
return 0;
}
Rotating Cubes Anyone?
hey guys...i'm sure we've all seen many rotating cubes out there, and lots of tutes on creating them, but so far i've only come across wireframe cubes and scary chunks of 3d maths.
I need to create a filled rotating cube that rotates left and right according to the direction of the mouse. anyone can help me? is there an easy yet effective way of achieving it? or must I start reading up on 3d maths...*gulp*
please help!
Rotating A Symbol...
Hey,
I want to rotate a symbol by a specific amount of degrees, rather than just inaccurately just using "Modify - Transform - Rotate".
So i go to "Windows - Panel - Transform" and enter 10.0 degrees into the 'Rotate' box and it doesn't change the symbol at all.
What am i doing wrong?
Thanks.
Rotating 3d Circle
How do i rotate a circle and give the affect that it is 3d, with an image on the 3d circle.
like the 3d circle at matinee.co.uk
|