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


Similar Posts:


ActionScript 3.0 :: Drawing Ring Or Center Less Circle?

Feb 8, 2009

How do I draw a ring or a center less circle in as?

View 2 Replies

ActionScript 2.0 :: User To Be Able To Activate A Ball (ball_mc) Which Will Rotate Around A Circlular Ring?

Aug 6, 2004

1. I want the user to be able to activate a ball (ball_mc) which will rotate around a circlular ring (ring_mc).

2. I want the user to be able to control the speed or tempo at which this ball moves around the ring.

3. One rotation of the ring will equate with a bar of music. Therefore the user should also be able to decide on the beat length of the ring in musical time i.e. 2,3, 4, 5, 6, 7, 8, 9, 10, or 12 beats.

4. On the ring the user will also be able to place movie clips which represent percussion sounds (duration_mc) and I therefore also want the ball_mc to trigger the percussion sound when it encounters the duration_mc.

5.I want the percussion sound triggered to be determined by the colour of the ring_mc and the user should be able to drag different coloured rings on to the stage. I have created an empty movie clip called canvas_mc to house the rings and I have seven different coloured rings which will each have a different associated sound.

View 5 Replies

Professional :: Make A Small Round Ring Rotate As Long As The File Is Loading?

May 30, 2010

im following some suggestions to cut my flash website into a few sections to make preloading a bit easier.
so all i want is to make a small round ring rotate as long as the file is loading. so i looked and followed a lot tutorials but all the preloaders tutorials are much more compliceted then i need. they all have persentige sowing, and a bar that is filling according to how much the file has loaded, and colors changing etc. so i tried to take from the tutorials wat i need for my simple preloader to work but i get stuck.i built the animation of the rotating ring, but i get stuck with the actions i need to make the animation work as long as the file is working. i called my ring animation "circularloader". here is a image of the page with the ring:

View 14 Replies

ActionScript 3.0 :: Get An Attached Movie To Drag With Its Parent & Not Move Independently?

Oct 15, 2009

I would like to attach (using A3) a movie clip to a draggable movie clip. I has set up a movie clip using startDrag() all works fine. But I would like to be able to dynamically place a movie clip inside it so that it too drags. Ive got it to partly work you can drag the original movie clip around and the attached movie clip (using aadChild) moves too. But if I grab the attached movie clip instead of the original clip it moves independently.

Is there a way of getting a movie clip inside the draggable movie clip and have it fixed in place and not move if you happen to attempt to drag it.

View 6 Replies

Professional :: Object Movement - Drag Up And Down Independently With The Mouse (vertically Only) Between Set Limits

Jul 11, 2011

I would like 2 objects that I can drag up and down indipendantly with the mouse (vertically only) between set limits. I would also like a line between the two objects that stretches like a piece of elastic.

View 9 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 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 :: [FMX]Drag-to-rotate MC?

Apr 21, 2011

I am having problems with this Flash movie of an draggable, rotatable XML blog. I have got the XML stuff working OK. I'm just having problems making the drag-to-rotate thing work. I want it to be able to be moved around the page like a piece of paper and rotated such.

View 1 Replies

Actionscript 3 :: Constrain MovieClip Drag To A Circle?

Jun 28, 2011

I have a draggable slider that looks like this:

The blue bar has the instance name track and the pink dot has the instance name puck.

I need the puck to be constrained within the blue area at all times, and this is where my maths failings work against me! So far I have the puck moving along the x axis only like this:

private function init():void
{
zeroPoint = track.x + (track.width/2);
puck.x = zeroPoint-(puck.width/2);

[Code]....

View 3 Replies

Actionscript :: Rotate Object On Drag?

May 26, 2011

I have an object I need to rotate by clicking and dragging. Following some AS2 code I got the object to rotate a bit every time the mouse is clicked, but can't get it to work with drag.

needle.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag_2);
stage.addEventListener(MouseEvent.MOUSE_UP, fl_ReleaseToDrop_2);
function fl_ClickToDrag_2(event:MouseEvent):void

[Code].....

View 1 Replies

ActionScript 3.0 :: Drag And Rotate To MovieClip

Mar 29, 2012

I want functionality of Drag and Rotate to my MovieClip just like this example [URL] Or

View 2 Replies

ActionScript 3.0 :: Drag & Rotate & Throw Multiple MCs?

Nov 3, 2010

I am trying to create a drag and throw effect I have most of the effect working correctly but I am wondering how to only move one item at a time and have that thrown unaffected til the friction brings the item to a stop. what happens currently is if an mc is moving and you select another it moves both items.

Code:
var mx0; // Previous Mouse X Position
var my0; // Previous Mouse Y Position
var velocityX = 0; // Velocity in X Direction[code]...................

View 2 Replies

Professional :: Drag Drop And Rotate Object?

Feb 6, 2010

Would like to develop simple (in browser) puzzle games where shapes (such as a puzzle piece shape) can be simultaneously dragged and rotated, then dropped on the screen or canvas. The game mode would be to click and drag the shape or object, while simultaneously rotating the piece using arrow keys  Is this possible in Flash? This simple general activity of simultaneous drag and rotate, then drop, is my intended overallweb site game basis. I'm new to Flash but have developed Windows executables for many years. I'm trying to decide whether to purchase and learn Flash as platform for interactive educational puzzle games running in browser windows.

View 4 Replies

ActionScript 3.0 :: Photo Gallery With Drag And Rotate?

Jul 9, 2009

I've recently downloaded a great gallery from FFILES.COM. Here's the link: [URL]

I want to add in a menu bar at the bottom of the gallery. Meaning to say, all the photos that load up from the XML will be behind the menu bar. I tried with creating a new layer on top of every other things (inserted a rectangle box for testing), but the photos for the gallery comes infront of my rectangle box.

View 5 Replies

ActionScript 3.0 :: Drag And Rotate MovieClip On Click?

Nov 5, 2009

Basically what I am trying to do is have my movie clip rotate/pivot when I press on it, same as the arm on the record player of this [URL]. At the moment, the movie clip rotates according to mouse follow, but I would like to click, drag and rotate so it pivots from one point.

Code:
const TO_DEGREE:Number = 180/Math.PI;
addEventListener(Event.ENTER_FRAME, rotateObject);
var maxRotSpeed:Number = 5;
var rotScale:Number = 0.2;
function rotateObject(e:Event):void {
[Code] .....

View 0 Replies

ActionScript 3.0 :: Drag & Rotate Movieclip From Centre?

Jan 5, 2012

I'm trying to drag & rotate a planet so it spins around with the mouse -instance name: PlayerThe code works really well but it doesn't seem to rotate around the centre, instead it rotates from the top left corner.I'm quite a noob at as3 so I'm not quite sure where I've gone wrong with my code to be able to fix this. Do I need to specify the dimensions of the stage or the planet? I have altered the Stage from the the default 550 x 400 (if this could be the problem).

ActionScript Code:
import flash.events.MouseEvent;
import flash.events.Event;

[code].....

View 2 Replies

ActionScript 2.0 :: Realistic Drag + Rotate MC Around The Stage?

Jun 29, 2007

Been working on this for days and can't quite get it. Place a standard playing card or something similar on your desk in front of you. Lightly press your finger onto a random point on that card and drag it around your desk. See how it rotates towards the direction you are moving and such? I want to simulate that behavior.

View 8 Replies

ActionScript 3.0 :: Rotate On Drag Not Mouse Position?

Feb 24, 2009

i have some script that creates a rotating video wall/carousel effect that rotates left and right depending on where the mouse is.I want the carousel to only rotate when the mouse is down and dragging - but just can't seem to work out what i need to change.how do I define the drag action instead of the current +x & -x co-ordinates?here is the full script for the entire carousel

Code:
*/
import org.papervision3d.scenes.*;
import org.papervision3d.cameras.*;

[code]....

View 4 Replies

ActionScript 3.0 :: Mouse Drag Frame Rotate?

Apr 2, 2009

I have a 40 frame animation that in sequence rotates an image. That I need to add a mouse drag function so I can scrub through the images like here

http:[url].....

View 1 Replies

ActionScript 2.0 :: Photo Gallery With Drag And Rotate

Jul 9, 2009

I want to add in a menu bar at the bottom of the gallery. Meaning to say, all the photos that load up from the XML will be behind the menu bar. I tried with creating a new layer on top of every other things (inserted a rectangle box for testing), but the photos for the gallery comes infront of my rectangle box.

View 2 Replies

IDE :: Drag - Drop And Rotate Selected MovieClip

Oct 14, 2009

Im building a game, where the user has several images as movieclips. He can drag them to an area of the stage, and selecting them, he could rotate it. Does anybody knows some tutorials on hoe to start?

View 2 Replies

ActionScript 3.0 :: Drag And Rotate Function On Mousedown

Mar 15, 2010

I'm trying to create a script that would imitate an old rotary phone dial. I have this script, but need it to function on MOUSE_DOWN:

Code:
handle.addEventListener(MouseEvent.ENTER_FRAME, startRotate);
function startRotate(e:Event):void {
var dx:Number=mouseX-handle.x;
var dy:Number=mouseY-handle.y;
// presupposes position of object to be facing to the right.
var radians:Number=Math.atan2(dy,dx);
handle.rotation=radians*180/Math.PI;
var hR:Number = Math.round(handle.rotation);
rotationA.text = String(hR);
}

Changing the event handler doesn't work. Somehow the MouseDown function should be working like an EnterFrame event, I guess. The condition I want to check is whether or not the handle is at a certain degree angle to stop the dial from rotating.
if (handle.rotation >= 30) {
handle.rotation = ?;
}
Not sure what I need to put in there to stop it from rotating.

View 1 Replies

ActionScript 2.0 :: Drag And Rotate Clock Hands?

Oct 3, 2002

I am stuck at the mo trying to create an interactive clock. I have got it to do everything, I would like the user to be able to drag and rotate the clocks hands clockwise 360 degrees.. ive got the hands to rotate by themselves what do i need to do?

View 5 Replies

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







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