Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-13-2009, 11:29 PM   #1
Registered User
Join Date: Mar 2009
Posts: 5
Default [AS3] [F3] - Creating Rotational Arm


Looking for some help creating an arm, I'm using flex and flash together in this one, I have a movie clip of an arm called "LightGun" and a file called LightGun.as that references this.

here is what I have so far, it pumps out an error and I'm totally confused with mouse events, can anyone help me with this? what I'm looking for basically is rotational movement on an axis. I've seen a couple tutorials but they haven't really helped.

//The LightGun

package classes {
	import com.citrusengine.events.*;
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;
	public class LightGun extends MovieClip{
		public function LightGun() {
		private function init(e:Event):void {
		addEventListener(Event.ADDED_TO_STAGE, init);
                removeEventListener(Event.ADDED_TO_STAGE, init);
                //this.y += 200 
                //this.x += 200;
		var LightGunXY:LightGun = new LightGun();
		addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
			function track(e:Event):void{
			    LightGunXY.x = mouseY;
			    LightGunXY.y = mouseX;
FrEaK40 is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[AS3] help creating a power bar that charges up LaSalle Gaming and Game Development 3 08-17-2008 07:39 PM
[AS3] creating and loading a local swf library rawrbot Gaming and Game Development 0 07-17-2008 07:55 PM
Creating a rotating arm with pivot - ideas? iblokh ActionScript 3.0 12 01-14-2008 10:59 PM
[AS3] Creating a gem dropping game. tracisummers Gaming and Game Development 0 11-09-2007 06:33 AM
Animating Software Grapebeer Other Flash General Questions 7 06-30-2004 08:32 PM

All times are GMT. The time now is 10:32 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.