Axis Rotating
can someone give me a step-by-step explanaition of how to make a graphic or text rotate around it's own axis (diagonally, horizontaly, vertically etc.). i know this is a common and easy thing...i'm just very new to flash. THANX!
FlashKit > Flash Help > Flash Newbies
Posted on: 02-17-2002, 11:29 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Rotating On Axis
Hello once again! Hope all is well. I am having a problem with rotating a circle. Now I know that if you draw a flat circle and put a rotate on it, it would'nt look like it is rotating, So I added some lines to it, and a sphere in the center. When I add a rotation on it, It does'nt spin on its axis. You can see it move slightly off course. Now the circle is perfectly round, not oval. Can someone help me with rotating this circle in one spot on its proper axis.
Rotating On An Axis...
I developed a short intro for a site, and am sure I did it the hard way... look at the link below ( http://www.mdredlinerz.com/ ) and in the intro you'll see the rpm needle moving... I did it by cutting and pasting and manually rotating each frame so that it looked "about right" .... I'd like to, however, learn how to be able to have the needle rotate on an axis of a pre-deignated axis point, either using the tools within flash, or action scripting. Any help with this would be greatfully appreciated. Thanks in advance...
RC
Rotating Around Y Axis
Hi, I have a prolem, lets say I create a regular circle that looks like a coin and I convert it into a MovieClip, how can I make that the coin whill rotate around the Y axis, so I could see a coin turning around?
Rotating Cube -- X-axis Only
i THINK this should be fairly simple but i can't seem to find tut's or help for it anywhere.
i want to create a cube-style site or menu that rotates on the x-axis only...kind of like the user-switching in the new Mac OS X if you've seen that.
any help would be great!
thanks
CB
[F8] Rotating Pics On Y Axis
Can anybody help me? I am new here but I am glad I found this forum. I am using Flash 8. What I am trying to do is take two pictures and have like they are back to back. I want to rotate them on the y axis so one shows and during the rotation the second will appear. Spinning in a 360 degree circle like a revolving sign. I know some flash, is this something that can be done or is there a program that will do this? Thanks for the help.
Rotating Square Around X Axis
i want to rotate square around x axis. this is the code for rotating 1 point(draw a circle or something like that and copy code):
Code:
var centar:Object = new Object();
centar.x = 250;
centar.y = 250;
var angle:Number = 0;
var radius:Number = 50;
var speed:Number = 4;
var size:Number = 100;
function rotationX() {
this._y = Math.sin(angle*Math.PI/180)*radius+centar.y;
z = Math.cos(angle*Math.PI/180)*radius+size;
this._xscale = this._yscale=z;
angle += speed;
}
_root.MC.onEnterFrame = rotationX;
but i want to rotate square.for that i need 4 points(actually angles because i`m using sin and cos), and then i need to rotate each point individualy and connect the points. but i doesn`t work. if anybody knows the solution please tell. any other ways of rotating a square(around x axis of course)are also welcome
here is the code i wrote:
Code:
//vars
var point:Array = new Array();
var speed:Number = 4;
var radius:Number = 100;
var centar:Object = new Object();
centar.x = 250;
centar.y = 250;
_root.createEmptyMovieClip("square", 1);
_root.square.lineStyle(2, 0xff0000, 100);
//square points, they are actually angels
point = [135, 45, 315, 215];
function rotation() {
for (n=0; n<=point.length; n++) {
y = Math.sin(point[n]*Math.PI/180)*radius+centar.y;
z = Math.cos(point[n]*Math.PI/180)*radius+size;
this._xscale = this._yscale=z;
point[n] += speed;
if (n == 0) {
this.moveTo(z, y);
} else {
this.lineTo(z, y);
}
point[n] += speed;
}
}
_root.square.onEnterFrame = rotation;
How Design Rotating On Axis
First, i'm running on Flash 5.
Can anyone tell me how to design a flash for couple pictures that will be line together and then it will rotate on the vertical axis 360 degree.
Thanks.
Rotating 3d Menu Along X-axis
hi i was wonderin if anyone has an idea how to creat a menu system such as the one in www.napkindesign.com under portfolio. i have tried the scrolling menu tutorials by pom and the one on kirupa but this menu is different because of the 3d perspective it provides and i would appreciate any help i can get. im either just too new to flashmx and actionscripting or im just plain dumb
Rotating Symbol On Perfect Axis?
I'm having lots of trouble rotating a symbol/graphic on a perfect axis, and also it does not spin smoothly. It looks somewhat like a pinwheel, and when it spins it becomes very jagged and choppy.
Can anyone provide me some ideas as to how I can go about creating this spinning symbol the proper way?
Thanks so much!
Help With 3d Rotating Nav (depth, Axis, Mouse Etc)
ok I am not even sure where to begin on this one...I am sure I have seen one like it before used on a website but can't remember where.
anyway I want something like this http://www.flashkit.com/tutorials/3D...-801/index.php
where the mouse controls the depth and axis of the buttons.
what I want is this to be the menu system, where the buttons are sort of floating, rotating....and if you mouse over a button, it rotates to the front, it should get bigger when near the front and the back buttons smaller, if clicked on a sub mav should pop out...is there a fla out there or tutorial better than the flower one that has depth etc?
Rotating On Same Axis Menu Buttons
Hi
Well I'm off to a good start ... first post is a question.
I've been trying to figure this menu out for a while and I just can't. What i'm trying to do is to have a similar menu to this http://www.templatemonster.com/flash...tes/12947.html
So far, I created some buttons with each different instance name (Example_btn).
ActionScript Code:
This is the code I'm using right now or at least experimenting on.
import fl.transitions.*;
import fl.transitions.easing.*;
import fl.motion.*;
import fl.motion.Animator;
import fl.transitions.Tween;
var btnTween:Tween
Nouveaute_btn.addEventListener(MouseEvent.ROLL_OVER, rotateIn);
ProduitsServices_btn.addEventListener(MouseEvent.ROLL_OVER, rotateIn);
Portfolio_btn.addEventListener(MouseEvent.ROLL_OVER, rotateIn);
Contact_btn.addEventListener(MouseEvent.ROLL_OVER, rotateIn);
function rotateIn(e:MouseEvent):void{
btnTween = new Tween(e.currentTarget, "rotation", Strong.easeOut, -150, 3, .25, false)
}
Nouveaute_btn.addEventListener(MouseEvent.ROLL_OUT, rotateOut);
function rotateOut(e:MouseEvent):void{
btnTween = new Tween(e.currentTarget, "rotation", Strong.easeOut, -150, 3, .25, false)
}
I can't make the button rotate only. When I mouse over, it will be moved in a "circular" motion, which is not what I'm trying to make it do.
Anyone?
ps: sry for my terrible english.
X Axis, Y Axis, Location Problem
Hello Friends,
I am having an alignment problem.
I have 5 buttons (actually they are pages of text turned into to buttons), my stage is 780x420. I have the first page (their size is w=109.7 h=151.8) coming in at x=379.7 - y=291.8 on the stage, I am using motion tween to get the first page to point x=59.9 - y=291.8, thats fine, now, I want to put a movie clip in the over state of the button that when the mouse moves over the page, the page will move back to center and go from 25% (which is the height and width of the page now) to 100% on of its size.
Ok
So, when I am setting up my movie clips motion tween in the edit stage of the movie, I use the same coordinates as the actual page has on the stage (stage size is the same), but when I put the movie together, they don't line up and it just goes crazy on the stage. I have a "stop" action on the last frame of the movie clip but still don't work properly.
Any advice would be appreciated
Thank you
Thorrax
Sliding Stuff On X Axis Vs. Y Axis
hi everyone,
i did a tutorial on sliding menus from the kirupa site, it's here: http://www.kirupa.com/developer/mx20...ith_slider.htm
i've made a lot of great stuff with it, my menus are sliding all over the place as we speak, but only on the x axis.
now i'm trying to make one that slides up and down on the y axis, and i can't get the coding to make it work right. i have seven buttons this time instead of 5, and i've changed all the "x's" in the actionscript to "y's"
it still slides along the x axis!!!!! what's going on. does flash not like using the y axis. perhaps this is impossible?
this is the code, maybe someone can tell me what i'm doing wrong?
easeSpeed = 5;
slider_mc.onEnterFrame = function() {
this._y += (yMove1-this._y)/easeSpeed;
};
button_1.onPress = function() {
yMove = button_1._y;
};
button_2.onPress = function() {
yMove = button_2._y;
};
button_3.onPress = function() {
yMove = button_3._y;
};
button_4.onPress = function() {
yMove = button_4._y;
};
button_5.onPress = function() {
yMove = button_5._y;
};
button_6.onPress = function() {
yMove = button_6._y;
};
button_7.onPress = function() {
yMove = button_7._y;
};
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?
Y-axis
How do you make a 3d object move around the y-axis with action script
_x And _y Axis?
Hello all,
I have to load an external .swf into my movie...but i cant seem to get it to load in the spot that I need it.
loadMovieNum ("correct.swf", 1)
I know it has to do with _x and _ y but I cannot get it to work...any ideas?
Thanks
Aron
Z Axis
I also am new to animation. I am trying to animate text by moving it along a z axis. The closest to this would be in the start titles of all Star Wars movies eg
Episode IV
A new hope
It is a time of turmoil etc.
In this title, the text appears to slide in from the bottom, changing its X axis as it does so thereby making it smaller. However the slide looks to me as if it is a 3D effect moving along the Z axis rather than the Y axis. I can't see how this is done with Swish. Any help would be appreciated.
Thanks
Ross
Cannot Seem To Get The Y Axis Value.
please look at the first graph.
i am trying to get the _y value of my mouse when it is roll over the graph. It will reflect the _y value i set for the graph. I should also get value like 95.5, 73. i have settle the x axis but just can figure out the _y value
X Axis Help Plz
ran in to a little bit of a problem maybe someone can help... i tried to attached the fla below but my zip file is bigger then 500k and it wont let me post it here.. i am trying to make the 3 buttons at that top scroll through the man images using actionscript
on(release){
_root.images_mc._x = -2; // coorrordinates change for each button
}
but when i click the buttons they jump to each co ordinate on the mc instead of smoothly scrolling through the mc... if that makes any sense to you
if someone could help out that would be great thanks guys
Cannot Seem To Get The Y Axis Value.
please look at the first graph.
i am trying to get the _y value of my mouse when it is roll over the graph. It will reflect the _y value i set for the graph. I should also get value like 95.5, 73. i have settle the x axis but just can figure out the _y value.
below is the link to my.fla http://s31.yousendit.com/d.aspx?id=3...Y3GT8GPQVA0OJF
i tried delete the unnecessary stuff but still cannot upload into the server here.
please do PM if you need to send the file back to me as i will PM you my email address .. .sorry for the inconvience.
Cannot Seem To Get The Y Axis Value.
please look at the first graph.
i am trying to get the _y value of my mouse when it is roll over the graph. It will reflect the _y value i set for the graph. I should also get value like 95.5, 73. i have settle the x axis but just can figure out the _y value.
below is the link to my.fla http://s31.yousendit.com/d.aspx?id=3...Y3GT8GPQVA0OJF
i tried delete the unnecessary stuff but still cannot upload into the server here.
please do PM if you need to send the file back to me as i will PM you my email address .. .sorry for the inconvience.
Z Axis
I keep seeing these sites that use the z axis to simulate real-world depth perspective. Here are some examples:
http://www.flowersforhope.com
http://www.rpa.com/
Can someone please direct me to where I can learn this technique? Or at least give me a hint as to how its done?
Thanks!
Z-axis
I was wondering is anyone knows of an example out there for a z-axis scroller, like photos or text?
Thanks
Z Axis
I keep seeing these sites that use the z axis to simulate real-world depth perspective. Here are some examples:
http://www.flowersforhope.com
http://www.rpa.com/
Can someone please direct me to where I can learn this technique? Or at least give me a hint as to how its done?
Thanks!
Sliding MC Across X Axis +PLEASE HELP+
OK, I'll try to make as much sense as possible...
I have a movie clip whose position along the x axis is controlled by buttons at the top. The buttons actions for moving my movie clip are as follws:
on (release) (
_root.movieclip.xpos = 100;
)
I need 2 more buttons which tell my movie clip to go forwards or backwards by 750. My buttons tell the movie clip EXACTLY where to stop along the x-axis,
but I can't seem to figure out how to tell my movie clip to slide along in the same way by 750 at a time.
This is the action attatched to the movie clip which gives it that sliding effect...
onClipEvent (enterframe) {
Xsquare = _root.movieclip._x;
Xdiff = Xpos - Xsquare;
Xmove = xdiff/6;
_root.movieclip._x = Xsquare+move;
updateAfterEvent (enterframe);
}
Any help would be greatly appreciated.
Thanks so much
-Justin
Drag Along Axis
can you drag an mc along an axis that isn't straight, but diagonal?
Point To Axis Help
ok to expand on what I mean..
I'm trying to create a basic function where when i press a button my points move to random positions on the screen.. ok got that worked out.. now I want to add lines inbetween the points but i have no idea how i would make them move and stretch with the points.. if anyone can help I would be most thankful!
X & Y Axis In A Movie (help Please)
I am developing a movie were I would like the cursor to move the opposite direction of the pic. So if you move the mouse to the left the pic moves right. I want this to work with x & y axis. Any help would be appreciated.
Thanks
Revolve On Y Axis
i am in need of assistance in the animation of a 3d menu item. i have a ~ 1"x1" bible that i want to spin on its Y axis while in mouse rollover state.
i cant think of anyway to do this with a motion guide (am i wrong?)
creating a motion tween and having the book in its regular state at the first keyframe than choose modify>transform>flip horizontal at the last keyframe wont work because it will only appear to spin 180 degrees than flip back 180 degrees as opposed to spinning 360 degrees continuosly.
so im hoping there might be a way to do this with AS but I cant find anything in my foundation AS book or online.
any help would be greatly appreciated.
thanks in advance,
>>kyle
Behaviour Of Z-axis
I'm doing a 3D application using Flash. I need to introduce the z-axis to my current script. I have a few questions. For z-axis, are points nearer to you positive or negative? Also, when the z-coordinate of one of my movie clips is changing constantly, I need to change its size too, to give an illusion of 3D. How do I change the movie clip's size according to its z-coordinate? Use x-scale / y-scale? Can give an example? Thanks in advance!
Limit Y Axis
After a too long of a break I'm trying to learn Flash all over again.
Here's a run down of what's what. Movie height of 200 with a dragable MC that has a height of 250. At the start the y axis of the clip is -25.
This is the code I'm using for moving the clip up and down
y = getProperty("/hidden", _y);
offset_y = (start_y+y)/16;
cur_y1 = getProperty("/movie1", _y);
setProperty ("/movie1", _y, Number(cur_y1)+Number(offset_y));
I want the clip to movie either up till the y axis = -50 then go no higher or have the movie go down until the y axis = 0 then go no lower.
I've been looking for the answer for a while and have tried a half a dozen things with some funny results and I'm sure it's an easy thing.
Can anyone please point me into which scripting commands I need to look at to learn how to do this?
Setting Z-axis?
I have three movie clips on the same layer on the _root level. These movie clips may or may not be visible (depending on the user), but if all three are visible at the same time how do I set the z-axis so whatever one the user clicks on come to the front. I tryed a javascript focus()(movieclip.focus() method, but I couldn't get it to work. Anyone have any suggestions, it would be greatly appreciated.
Question About X Axis
hi i have a problem, i am mirroring this website
http://www.signumprojects.de/
for learing purposes. and iam stuck at this point
u c the little triangle above the mouse moving on x-axis which moves when u move the mouse i dont know wut the code for that is, can some one help me out thank u
some one wrote me this code but it doesnt work
"make a triangular shape, turn it into MC.
Put a code:
code:
onClipEvent(enterFrame){
this._y=_root._ymouse-15; //set it higher than mouse by 15
this._x=_root._xmouse; // set the _x of triangle as the mouse's
}
"
thanx u
HELP Backwards On X Axis?
Ok, here's my problem, the following code is used to randomly scroll symbols from left to right on the x axis at random speeds, sizes, transparency's and at random heights on the y axis.
onClipEvent (load) {
a = random(100)+50;
_x = Math.random()*750;
speed = Math.random()*5+1;
_y = Math.random()*300-(_height/2);
_xscale = a;
_yscale = a;
_alpha = Math.random()*30+40;
}
onClipEvent (enterFrame) {
b = random(100)+50;
_x += speed;
if (_x>=750) {
_xscale = b;
_yscale = b;
speed = Math.random()*5+1;
_y = Math.random()*300-(_height/2);
_x = _width*-1;
_alpha = Math.random()*30+40;
}
}
But I want to scroll the symbols from right to left. When I change these lines, speed = Math.random()*5+1;, to speed = Math.random()*-5-1;, it works but it does'nt loop like is supposed to. Go to http://www.isometricshadows.com/movi...m_movement.swf to get an idea of what i mean.
Can Someone Help With Axis Problem?
Ok...heres my problem...
I want to make an MC follow a mouse to a button when the button is in the over state and then ease out when the mouse is off the button...if someone moves their mouse over a different button I would like for the MC to move over that button....and etc.
I can limit the MC's movement to one axis...thats not a problem. But I cant get it to only move when the button is in the over state...in fact I have no clue how I would go about doing this. And then the easing out is another issue because I dont know how I would do that either.
If anyone can help I would be much appreciative.
Thanks,
Sean
Rotate Using Specified Axis
Hey,
How do I tell an object to rotate along a specified axis? I did "edit center" and while it rotates just fine using the rotate tool in the toolset, the _rotation script rotates it using the original center.
any help would be greatly appreciated
Follow On X-axis
How would I go about getting a movie clip to stay on a certain point on the x-axis, but it follows the mouse?
Rottation Z-axis
hi there,
how can i rotate this cylinder a bit along its z-axis in order to achieve some perspective?
thanx u777
Mouse Axis
I am a user of flash 5 and was wondering how I could program an graphic object to move down in response to the mouse moving up, moving left in response to the mouse moving right, etc. Thank you in advance.
X, Y, And Z Axis Rotation.
How do I rotate a mc along theses three axis using AS or will I need to do it manualy frame by frame?
Cheers.
Rotate Around Y Axis?
Is it possible to rotate text (or any graphic symbol) around the y axis in Flash MX, as shown in frames 75-138 of this movie?
http://www.flashkit.com/movies/Effec...-358/index.php
Or is this accomplished with a program like Swish?
Thank you.
Tooltip Y Axis
Using this tooltip function
code:
function homecaption (string) {
xmouse = getProperty("", _xmouse);
ymouse = getProperty("", _ymouse);
duplicateMovieClip ("_root.tooltip", "homecaption1", 1);
homecaption1.homecaption = string;
setProperty (homecaption1, _x, xmouse);
setProperty (homecaption1, _y, ymouse);
startDrag ("_root.homecaption1");
homecaption1.gotoAndPlay(2);
}
function remove_homecaption () {
stopDrag ();
removeMovieClip ("homecaption1");
}
i want the Y axis to remain at a certain position, but allow the X axis to still follow the mouse!
Anyone shed some light?
Anotherthing How do you put code into the "code" quotes rather then how ive done it using the ordinary quotes thing on this message board?
EDIT: I fixed your post to use [ as ] tags - edit your message to see what they look like. - jbum
StartDrag And The Y Axis Help
Hi there, is it possible to drag a movieclip only along the y axis?
I presume it has something to do with tricking the clip into thinking the stage doesn't exist on the right or left but how can I achieve this.
Thanks - itchyjam
Here's is my current code;
on (press) {
startDrag(this);
this.swapDepths(100);
}
on (release) {
stopDrag();
if (this._droptarget=="/gear2") {
setProperty(this, _x, 440);
setProperty(this, _y, 285);
_root. nav_mc.gotoAndPlay("menu1");
} else if (this._droptarget=="/gear3") {
setProperty(this, _x, 440);
setProperty(this, _y, 265);
_root.nav_mc.gotoAndPlay("menu2");
} else {
setProperty(this, _x, 440);
setProperty(this, _y, 300);
_root.nav_mc.gotoAndPlay("menu3");
}
}
Relative Y Axis
please help this noob figure out actionscript (flash 5) for the movement of one symbol's y axis to affect another symbol's y axis automatically. i only want the movement of one to affect the other, and not both. so, if a is the controlled, a moves down, and b moves up ; if a moves up, b moves down.
X & Y Axis Basics
Hi all,
I already posted this but I can't find it so I do apologise if you find it else where.
I'm wondering if someone can please explain the x&y axis?
What is it used for?
How do I map it? ie- how do I know where the numbers correspond to what area on the movie?
I'm guessing I can use it to define a mouse roll over point?
ANy help you can give would be greeeeeeatly appreciated!
Thanks in advance
Reflection In Y-axis
I'm trying on an exercise that need to check whether the new position of an image is correctly reflect in the y-axis.
The basically of this exercise is:
Let say there is an object (a dot) at coordinate (2,3). When I click at a new position, a new image of the original object will be flipped at the new position there. So in order to check whether the flipping object is correctly reflected in y-axis, what should be done? Hope someone could help me out. Thanks in advance.
Scrolling Axis Help
ran in to a little bit of a problem maybe someone can help... i tried to attached the fla below but my zip file is bigger then 300k and it wont let me post it here.. i am trying to make the 3 buttons at that top scroll through the man images using actionscript
on(release){
_root.images_mc._x = -2; // coorrordinates change for each button
}
but when i click the buttons they jump to each co ordinate on the mc instead of smoothly scrolling through the mc... if that makes any sense to you
if someone could help out that would be great thanks guys
|