ActionScript 3.0 :: CS5 IK Rotation Value To Variable?
Sep 8, 2010
I have a simple 4 bone IK setup, and I want to get the current rotation value of each joint and store it in a variable (and update a dynamic text box).I see there is a public function get rotation():Number property, but how do I use it?
I'm working on a flash movie that involves the use of rotating 3 objects in a matter that the first one moves 18000 degrees cw according to the value in the 'num' variable. The 2nd object rotates -1800 degrees. The third one rotates 180 degrees.
What I actually want to do is create a movie of the older analogue electric meters that had the 5 dials that represented each digit so if the far right dial moved from 0 to 5 the 2nd would move the opposite way to be between 0 and 1 and the third a hair to the right of '0' and so on in increments of 1/10.
When I run the below code the dials ( I currently useing jetplanes until I draw or locate a pointer image file as well as the circle with 0-9 marked off in it) stay on 500 and should be moving a bit since I have another variable that increments num by 1. I tried using the Timer event and would get several errors. I also know that the way it runs now doesn't work since num is going to be assign the same value of 18000 since I have it setup to gotoAndPlay(1) in frame 2. How would I be able to have it so that so it would increment without getting undefined variables. I also tried a for loop to increment the num but the stage would instantly show the end result after the loop was done.
code -------------- var num:Number = 18000; var i:Number= 0;
I have a movieclip and when I do 3D rotation from Transform panel, It rotates perfect, center is in the middle of image, and when I apply mc.rotationY, rotation center is in left of the image, aren't 3D rotation from Transform panel and mc.rotationY from AS same? what's up?
I'm trying to do some augmented reality projects with flartoolkit . I can now put simple 3d objects on my marker and it works fine , but I wanna give my project some events that the user can interact with. I'm trying to trace the rotation of the marker. there's a container:DisplayObject3D which my application uses to add the 3d objects , I traced this :"trace(container.rotationZ)" but it's just returning 0 . I studied another AR application's source code and it was using the rotation of it's container object without problem .and I think I should mention that I'm using the exercise file of seb lee delisle papervision3d course from [URL]. anyone has any experience with flartoolkit? the main functions of my my code is as below:
Is it possible to have the child movieclip rotate separate of the rotation properties assigned to the parent? so ultimately giving the child element it's own axis?I've customized Lee Brimelows (gotoandlearn.com) 3D carousel to spin on the x axis to make it a vertical carousel. I've also rotated that by 45 degrees on the y axis to see all the items, and wrote a snippet of code to hide the left portion of the carousel. The entire carousel is contained within the 'container' movieclip, and inside of that are my carousel items (as seen below), with the larger item being the item in focus.
On rollover of the item in focus, I want to rotate it so it faces the viewer (as seen below),basically removing the 45 degree rotation applied to the container.The problem i'm running into is when you rotate the container (changing the rotationX of the container), the axis basically rotates with it, so when i rollover the next item 'in focus', the following happens..(in the example where it appears how it want it to, the carousel is at a rotationX of 0, so it works fine)
Program A has a cannon that aims to line up with where-ever the mouse is pointing, in 360 degrees, and fires when the mouse is is clicked. Program B has an eye instead of a cannon that should in theory do similar functions when the capslock key is toggled, but instead only has a 90 degree range of motion from the Right of the eye toward the bottom (quadrant 4 only). Where did the ther 270 degrees of rotation disappear to?
i.m trying to create a 3d rotation much like the widely used carousel only the rotation i desire consist of four upright(90 degrees) movieclips resting on a slanted, 30 degree plane which rotate onEnterFrame or following a tween on a oval like path - then pause for a given number of seconds at the four movieclips positions equal in distance on the plane
function around() { this._x = Math.cos(this.angle) * radiusX + centerX; this._y = Math.sin(this.angle) * radiusY + centerY; var s = this._y /(centerY+radiusY);
I am watching the tutorial on the motion editor and when he opens the motion editor to edit the Rotation X and Rotation Y values I'm in trouble.My motion editor now only shows Rotation Z but, no Rotation X or Rotation Y. What am I doing wrong?
I am trying to do a simple "pseudo 3D" rotation of a movie clip. The clip would "flip" on to the screen. I have created the effect using PaperVision3D, however, the final SWF is about 64k and my project requires a smaller file size. I tried to create the flip effect manually by creating skewed versions of the clip and tweening between them, except this doesn't work because the shape is not tweaked along the vanishing point as it should be. It looks like perhaps I could accomplish what I want to do using the MatrixTransformer but I've not had much luck so far.
i have a variable take away another variable which makes answer1 variable i then want answer1 to be to the power of another variable how can i do this in flash
This works fine but now I would like to have another pointer but with an starting angle of 60degrees. Is there an easy way to ad a starting degree or angle value on this code?
How can I control the center of rotation when manipulating CS4's 3D properties? --I mean in code, that is. I've set the 3D Center Point in the Transform Panel, and if I rotate the MovieClip in the IDE, it rotates correctly... but when I manipulate rotationY via code, that 3D Center Point is not used.
So I've found numerous tutorials on rotating to face the mouse, and none of the rotation equations work properly for me. I made my own that worked but then it just over complicated things such as bullet direction and the likes so I want to figure out what's going wrong.
Code: var radians:Number =Math.atan2(mouseY-ME.y,mouseX-ME.x) var degrees:Number = (radians/Math.PI)*180;
I have a client that wants a product to rotate around its axis for a full 360 degree view of the product. The final view needs to be draggable - so a user can use their mouse to turn it left or right. I took photos of the product in 10 degree increments and created a movie clip - but I can't figure out how to get it so a user can control the view: turning the product left or right.
As you can see in my code, I'm trying to adjust on the fly the x and y properties so that the movieclip gives the impression to rotate from its center and not from its corner at 0,0
Code: var myclip:MovieClip = new MovieClip(); myclip.buttonMode = true; myclip.graphics.beginFill(0);
[code]....
but it doesn't work and the clip does not rotate well
I am trying create a rotating circle with buttons/menus around the edges and this would simply rotate around, not like a 3D carousel, just basic rotation of a circle triggered by movement of the mouse on a vertical axis!I have attached a jpg example to give you an idea of what I am trying to create.Would anyone be able to direct me to some tutorial something similar as I can't seem to find anything.
i was wondering if theres a way to link the amount and direction of an objects rotation to the mouse position. I want it so if you move the mouse far to the left the object spins fast anticlockwise but if you move it to the center it stops.
I recently started creating a small banner with a cog positioned half on the canvas in constant rotation and multiple buttons placed on the cog so they spin on and off the canvas. Unfortunatey at a slow rotation something like 400 frames at 25/sec the cog jitters a lot, even more when more buttons are added.
I was wondering if there was anyway to smooth out the tween for a nice non disruptive rotation and if there is anyway to cause the cog to slow down when hovering over a button.I can make it stop completely on a roll over and start again on a roll out but I was hoping for more of a speed decrease and have never worked with altering this before.
Is there a simple AC3 code to make a object rotate? I wish for the object to rotate on the X axis (in other words, if it were a 3D object, it would look like a rotation) Is there a simple AC3 fix for this?
Also, to prevent another thread being made; I used Arial text, then I swited to David text, but no matter what I try (Save, republish, simulate download) the text stays Arial text;
How do you get the rotation of the marker in FLARToolKit? All that I can find is how to do it with papervision3D but since I am using Unity3 for the 3D, this is not optimal.
I built an app in flash where you can rotate objects and save positions and rotation to xml.... that xml then feeds html to produce a layout that is then rendered the a pdf It seems that every time it goes to the html, a rotated object in positioned a little to the lower right then the position in flash.
I know the rotation in css in different, but I think if I can find the true top left of the rotated object in flash and pass that it will solve the issue.
I tried this
newx = imageHolder.parent.localToGlobal(new Point(imageHolder.x,0)).x; newy = imageHolder.parent.localToGlobal(new Point(0,imageHolder.y)).y; also this imageHolder.parent.globalToLocal(imageHolder.localToGlobal(imageHolder.getBounds(imageHolder).topLeft));
Is there any way to rotate a 3D object in AS3 using absolute axes rather than the x, y and z axes of the object itself?For instance, increasing the value of rotationZ will make a movieclip rotate clockwise, but if the movieclip is first rotated 180 degrees around its y axis, increasing rotationZ will now rotate the movieclip counter-clockwise instead. Add rotation along the x axis, and things get really complicated.In my code, I simply want to flip a cube (consisting of four movieclip faces) 90 degrees around the default x and z axes, no matter what its current values of rotationX, rotationY and rotationZ are. My naive initial assumption was that it is only a matter of increasing rotationZ with 90 degrees to flip the cube left, or decrease rotationX to flip the cube "into" the screen
I am using flash cs4 and flash player 10 to flip a card using rotaionY and rotationZ.Its a movieclip with a dynamic textfield inside, font is embeded and antialias for readability is set.Textfield is on full pixels as usuall, but the problem is that after rotation text becomes smudged.
So I've found numerous tutorials on rotating to face the mouse, and none of the rotation equations work properly for me. I made my own that worked but then it just over complicated things such as bullet direction. Code: var radians:Number =Math.atan2(mouseY-ME.y,mouseX-ME.x) var degrees:Number = (radians/Math.PI)*180; ME.rotation=degrees; That is the only code that changes the rotation of my movieclip. and it always seems to be about 45 degrees behind my mouse?
I have an object, the center of the object I believe is the rotation point. When I click transform and edit the rotation properties on the right side to like 55 degrees then it works, it rotates from the point it's suppose to and looks great. The problem is when I use AS .rotation on the object, I have no idea where it's rotating from and it's going all over the freaking place. I assumed it would rotate from the same rotation point as the transform tool rotates the object from. I also assumed 0-360 was the options for rotation. What am I doing wrong? from the looks of it's odd rotation I can't even tell where it's centering.