Rotate An "angled" Wheel/circle In Flash?

May 16, 2011

Is there an easy way to rotate an "angled" wheel/circle in flash? I played around with the 3D Rotate tool and nothing seemed to do what i wanted.

Attached is an image below that shows a quick mockup of the type of wheel I am going to use. I want to show the lines rotating around the circle.

[URL]

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Rotate Wheel To Specific Position?

Nov 1, 2006

I have searched the forum and could not find anything specific, so if you do, please show me the link. Let me set some theoretic environment for the question. let's take a circle that is like an anolog clock but only has 8 numbers; 12 o'clock, somewhere around 1:30, 3 o'clock, 4:30, 6, and so on.

I want to have each number, a button, and when clicked will rotate to the top of the circle.NOTE this is a static image, so the numbers will upside down, etc...the do not need to stay rightside up, as they will rotate with the circle image.

Every time a number is clicked, it will rotate the circle until that number is at the top, and can move either left or right depending on which number is clicked. I thought of doing this in design time, but there are many combinations, and it would be too weighty.

I do not know how to rotate it in actionscript and then have it stop at a certain position, which I assume I could plan out in degrees, and possibly use flags to tell which had been clicked in which position,

View 3 Replies

ActionScript 3.0 :: Rotate Wheel 90 Degrees With Button Click?

Mar 30, 2009

Flash CS3 Actionscript 3.0

Most of them have been random "wheel of fortune" type projects and those get me close, but most of them are in AS 2.0 and don't hit exactly what Im looking for.

So here is what I need:

A wheel with 4 sections and a button.

When you press the button, the Wheel rotates 90 degrees, easing into the rotation and easing out of the rotation.

Sounds simple right? Well, I got the easing part down and the code i have is designed to rotate 180 degrees. However, the trouble is that, my wheel code only works once, and only rotates the wheel once. Im having trouble making the code keep track of the wheel position and rotate from the position that it left off at.

Ultimately what will happen is, each of the 4 sections will trigger a sound loop. So each of the 4 sections will also have a hitTest function, but that is not my concern right now. I just want the rotation mechanism down pat. Here is my messy, overcomplicated code for your consideration (again, designed to rotate 180 degrees for simplicity but I need 90 degrees):

var i:int = .01;
var s:int = 10;
//add event listener for my_btn
my_btn.addEventListener(MouseEvent.CLICK, wheelRotate);

[Code].....

View 11 Replies

ActionScript 2.0 :: Drag / Rotate Functionality For Navigation Wheel?

Jul 19, 2009

I'm trying to create a navigation system that relies on the user dragging on a wheel in order to rotate it into a specific position: [URL]. The problem I have is that whenever a drag is initiated, the wheel jumps to a position where it points the zero-rotation point (indicated in the example by the red dashline) at the mouse direction. Whenever the drag is ended, the wheel stays at the position where the mouse has left it, which is correct.

However, when another drag is initiated, the same thing reoccurs - the dashed red line jumps to point towards the direction of the mouse. In short, I need the wheel to drag/rotate directly from the position where it was previously left or where it is by default. It shouldn't matter from which position the user drags the wheel. The code is located in the script of the wheel-movieClip, and is as follows:

Code:
onClipEvent (enterFrame){
this.onPress = function(){
// when the mouse presses on the wheel
this.onMouseMove = function(){
// get an angle to the mouse using atan2 (gets radians)
var angle = Math.atan2(this._parent._ymouse-this._y,this._parent._xmouse-this._x);
[Code] .....

How to implement it so that the wheel rotation is independent from the position of mouse, while it is dragged.

View 2 Replies

ActionScript 2.0 :: Drag/rotate Functionality For A Navigation Wheel?

Jul 19, 2009

I'm trying to create a navigation system that relies on the user dragging on a wheel in order to rotate it into a specific position:

[URL]

The problem I have is that whenever a drag is initiated, the wheel jumps to a position where it points the zero-rotation point (indicated in the example by the red dashline) at the mouse direction. Whenever the drag is ended, the wheel stays at the position where the mouse has left it, which is correct. However, when another drag is initiated, the same thing reoccurs - the dashed red line jumps to point towards the direction of the mouse. In short, I need the wheel to drag/rotate directly from the position where it was previously left or where it is by default. It shouldn't matter from which position the user drags the wheel.

The code is located in the script of the wheel-movieClip, and is as follows:

ActionScript Code:
onClipEvent (enterFrame){
this.onPress = function(){
// when the mouse presses on the wheel

[code]....

I can see how lacking the code is, and I can see why it does what it does. I just can't figure out how to implement it so that the wheel rotation is independent from the position of mouse, while it is dragged.

View 5 Replies

Flex :: Rotate MXML Component Round Its Center Like A Wheel Respectfully To Mouse?

Jun 16, 2010

So I have that panel or any other mxml component. I want somehow to rotate it around like a wheel of a car with which you drive it... loke a Racing wheel... sow like when mousebutton is down it captures pont of component... when you move mouse component rotates (not moves) according to new mouse position... How to rotate MXML component round its center like a wheel respectfully to mouse?

View 2 Replies

ActionScript 2.0 :: Make A Wheel Graphic Rotate A Certain Number Of Degrees To Loop The Animation?

Nov 12, 2002

I 'm a Flash novice trying to make a wheel graphic rotate a certain number of degrees using Actionscript to loop the animation, and use an if/else statement to check if the rotation is true. I cannot get it to work.

View 11 Replies

Professional :: Rotate A Circle With A Cut In (looks Like Pacman)?

Aug 9, 2011

Simple animation..I want to rotate a circle with a cut in (looks like pacman).I want to rotate i 1 x clockwise and devide this animation in 4 parts. so if you think of a clock it goes, 9, 12, 3, 9, ...The rotation works perfect until i start adding the keyframes and adjusting the rotation, at some point it always goes wrong.. insted of going the right way (clockwise) the circle starts to move counter clockwise.. I have to add some extra keyframes to keep the rotation on track, this result in a not so smooth rotation.
 
ps: Just to make my self clear, it happents only once you start to manualy rotate and adjust pacman - this is a must since i have to have keyframes in certen points (when the packman is at 90 degree rotation) [URL]

View 1 Replies

ActionScript 2.0 :: Rotate Circle On Its Own Place?

Oct 25, 2004

i got a circle inside a mc (116x116 px) and i want it to rotate continuous...if i do it in flash itself it works great the circle rotates nice on its own axis(tween) , but if i try it with actionscript the circle gets of its place and makes a big rotation

PHP Code:

onClipEvent (enterFrame)     {     this._rotation+=1; 

View 5 Replies

ActionScript 2.0 :: Rotate The Line Mc Move Clip In A Counterclockwise Rotation When Scroll The Mouse Wheel Up Instead Of Down .... CCW?

Aug 7, 2007

What do I do to make this rotate the line_mc move clip in a counterclockwise rotation when I scroll the mouse wheel up instead of down. Currently it rotates the movie clip in a clockwise fashion regardless of which way I scrool the mouse wheel.

[Code]...

ps. is there anyway to get this thing to ease when it rotates... instead of the jerky rotation it does now.

View 7 Replies

ActionScript 3.0 :: How To Rotate Circle And Use It As Volume Knob

Apr 22, 2009

I want to rotate a circle so I can use it as a volume knob. I can change the volume with a slider but not a knob.

View 1 Replies

ActionScript 2.0 :: Rotate Circle With Mouse Movement?

Jul 15, 2009

I'm trying to make a dummy from a circular menu that reacts (rotate) to mouse movement, I uploaded a fla example, different colors, size, etc, but essentially the same in function; but for now I'm freezed how to do somethings, I'm not a programer or actionscripter, but I want to learn.Currently using CS3 and AS2, downloading the FLA example may help. in the "fla", you will see a circle who rotates versus mouse movement (I would like to make a delay rotation for a smooth feelling when mouse is moving, those like "_x += (_xmouse/5)" but with rotation. Other thing I would like to do,is... that the movement stops progressively a few degrees before the mouse reach de cian angles(a1,a2), and then, the circles doesn't move if the mouse is moving under those angles, like a... an inactive area(U1), and if it could work with instances.

View 0 Replies

ActionScript 2.0 :: Make A Circle Rotate Over 6 Seconds

Feb 27, 2008

I want to make a circle rotate over 6 seconds. Does anyone know how to code this in AS 2.0 so that it happens over the 6 seconds. Basically I want the twelve oclock position on the circle will rotate all the way around back to the top over the 6 seconds.

View 2 Replies

ActionScript 2.0 :: Rotate Circle With Mouse Movement

Jul 15, 2009

I'm trying to make a dummy from a circular menu that reacts (rotate) to mouse movement, I uploaded a fla example, different colors, size, etc, but essentially the same in function; but for now I'm freezed how to do somethings, I'm not a programer or actionscripter, but I want to learn. Currently using CS3 and AS2, downloading the FLA.

Ok, in the "fla", you will see a circle who rotates versus mouse movement (I would like to make a delay rotation for a smooth feelling when mouse is moving, those like "_x += (_xmouse/5)" but with rotation. Other thing I would like to do,is... that the movement stops progressively a few degrees before the mouse reach de cian angles(a1,a2), and then, the circles doesn't move if the mouse is moving under those angles, like a... an inactive area(U1), and if it could work with instances.

View 1 Replies

ActionScript 2.0 :: .rotate Circle With Buttons, Change Direction?

Oct 20, 2010

what i have is a circle image (for this purpose lets say it looks like a clock). For example: when you click 3 o'clock, the whole clock needs to rotate around with the 3 o'clock btn at the 6 o'clock position (with the pivot point in the centre). each of the 'time' positions (2 o'clock, 3 o'clock, 4 o'clock ...etc) needs to be a button and thus be able to rotate around to the 6 o'clock position.This would seem simple enough by just using a.rotate value or using tween movieclips...however the tricky part is:the actionscript needs to determine which way the clock turns (anti/clockwise), dependant on where the clicked time-btn's position is. it needs to be some sort of if statement that says:if (3'oclock-btn) is positioned between 0 degrees (being original 12'oclock position) and 180 degrees (original 6 o'clock position), then rotate clockwise to the 6 o'clock position. If the (3o'clock btn) is positioned between 180degrees and 259 degrees (12 o'clock position), rotate anti-clockwise to the 6'oclock position.

View 5 Replies

ActionScript 2.0 :: Drag To Rotate Circle And Ring Independently?

Jun 5, 2005

I have this problem...no worries it is only about ActionScript! I have created two movieclips: one is called "sun_mc" (with a nice smile) and a ring of sunrays (short and long ones) called "ring_mc".the ring is situated around the sun.

The user clicks the sun and drags to rotate it.The user can click the ring to rotate that too.When the sun is rotating...the ring should not be...and vice versa.

I have three problems...

1) I can't get the two mc's to move independently 2) When rotating the mouse position always jumps to a certain point on the movieclip...not the point where you clicked it first 3) The ring is also rotating when the mouse is outside the ring...

What should I do?I tried to obscure a part of the ring_mc with some masking...That didn't work.Should I try hitTest? And how should I do that? That only works with squares doesn't it?

[Code]...

View 2 Replies

Actionscript 3.0 :: Rotation A Wheel/circle With Mouse (Hold Mouse)?

Apr 19, 2011

i create this code but i cant spinning it with mouse (when i hold it)

Code: Select allmthr.addEventListener(Event.ENTER_FRAME,rotate);

function rotate (e:Event)
{[code]....

View 3 Replies

Don't Want Angled Button's Hit Area To Be Bounding Box

Jun 12, 2009

I am trying to create buttons on a 45 degree angle. They are simply text. I have tried drawing different hit areas for the button, but when I publish the swf the hit area for the button is always its bounding box (so there is a huge space in the upper left and lower right corner which activates the button).

View 1 Replies

ActionScript 2.0 :: Smooth An Image That Has Been Slightly Angled?

May 30, 2007

How do you smooth an image that has been slightly angled?

View 1 Replies

ActionScript 3.0 :: Reflect A Movie Clip Across An Angled Line?

Apr 7, 2011

I'm trying to build a tool similar to this.I'm using movie clips for the shapes.I am placing the reflected shape by figuring out the point on the line perpendicular to the original shape's registration point, then using the distance and angle. The part I'm stuck on is how to actually reflect it.It seems that if I was just drawing a shape I could use each point to determine new ones as I did above and redraw it, but I also have to reflect more irregular movie clips like illustrations and bitmaps. I tried rotating and Any insights on the best way to approach this? Is there a way to use a matrix?

View 2 Replies

ActionScript 3.0 :: Wheel Of Fortune Wheel With Momentum

Feb 13, 2012

I have been designing at a professional level for about 5 years now but I am new to flash. I've been tasked with creative a wheel of fortune game in flash, and I am trying to create a script that will make my wheel spin with a blur and then slowly decelerate to a random tile.

[Code]...

View 2 Replies

ActionScript 2.0 :: Custom Scroll Bar With Mouse Wheel - When It Come To Firefox, It Can't Wheel But Can Scroll?

Jun 14, 2009

i recently doing a custom scroll bar with mouse wheel,i succes to make it scroll and wheel in internet explorer, but when it come to firefox, it can't wheel but can scroll. I wonder how can i solve this problem.Here is the script ( it actually the tutorial from kirupa, i remember some people have post it before, but i wonder he/she can wheel in firefox.)

scrolling = function () {
var scrollHeight:Number = scrollTrack._height;
var contentHeight:Number = contentMain._height;[code]....

View 1 Replies

ActionScript 2.0 :: Create A "Wheel Of Fortune" Style Wheel?

Oct 23, 2007

I need to create a "Wheel Of Fortune" style wheel, where if a person clicks a button it spins, slows down, and then stops at a random location.

View 2 Replies

ActionScript 2.0 :: Calculate The Direction And Speed A Circle Has After Colliding With A Static (non-moving) Circle?

Mar 8, 2005

I'm developing a game atm, and I need some help on the mathematics/coding of colliding circles (and their change in x/y speed). What i need to know is how to calculate the direction and speed a circle has after colliding with a static (non-moving) circle. I know how to detect a collision between the two, but I'm not sure about the maths I need to give the circle the right speed and direction after the collision

If i do know how far away the two circle-points (in the middle of each) are to each other (in both x and y coords) would it be easy for me to find the new speed and direction of the large circle in the example above? I know that I somehow should use the angles to pretend the circle hits a flat "wall" (as it only hits one point), and then calculate the new speed/direction. My only problem is that I'm not sure how to decide the angle of this flat "wall" and how x and y speeds should change when colliding with a wall that is angled. Does anyone here have any insight, links or tips on how I can du this?

View 6 Replies

ActionScript 2.0 :: Make One Circle Follow The Mouse Cursor Inside Another Circle

Sep 30, 2005

i want to make one circle follow the mouse cursor, inside another circle. Similar to an eye looking at the cursor. Ive attached an example.

View 4 Replies

ActionScript 2.0 :: If Statement / Variable - Say If Circle Shows Up Change It To Circle (french)

Nov 5, 2008

I have text in a dynamic field showing up as circle. I want to say if circle shows up change it to cercle (french).

[Code]...

View 1 Replies

ActionScript 2.0 :: Calculate Direction And Speed Circle Has After Colliding With A Static Circle?

Mar 8, 2005

What i need to know is how to calculate the direction and speed a circle has after colliding with a static (non-moving) circle. I know how to detect a collision between the two, but I'm not sure about the maths I need to give the circle the right speed and direction after the collision.If i do know how far away the two circle-points (in the middle of each) are to each other (in both x and y coords) would it be easy for me to find the new speed and direction of the large circle in the example above? I know that I somehow should use the angles to pretend the circle hits a flat "wall" (as it only hits one point), and then calculate the new speed/direction. My only problem is that I'm not sure how to decide the angle of this flat "wall" and how x and y speeds should change when colliding with a wall that is angled.

View 6 Replies

ActionScript 3.0 :: Graphics - Paint (change Color) Inside Of Circle When A User Draw A Circle

Aug 24, 2009

I`m working on a app that you can draw lines.....like circles, rectangles... my problem is when a user draw a circle for example....i wanna be able to paint (change color) inside of this circle. I`ve tried working on Shapes with cacheAsBitmap = true and Bitmaps with BitmapData but it doesn`t seens to work.

View 4 Replies

Actionscript 3 :: Change Shape Of Circle By Dragging Point On Circle

Mar 16, 2012

I want to create circle, and put 8 points on it. So, user can drag each point in order to change it's shape.

Is there any way to do this in flash?

I have some following code:

Ref. - How to draw a continuous curved line from 3 given points at a time

package{import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.geom.Point;

[Code].....

So, can anyone convert these three point curve line to 8 points circle?

View 1 Replies

ActionScript 2.0 :: Drawing A Circle - Circle Diameter Has To Be Controlled By A Button

Oct 6, 2009

I have to draw a circle using action script. The Circle Diameter has to be controlled by a button.

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved