Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




_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



FlashKit > Flash Help > Flash ActionScript
Posted on: 10-14-2001, 11:07 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

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;
};

Y-axis
How do you make a 3d object move around the y-axis with action script

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!

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.

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!

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.

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

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

Sliding MC By Along An Axis
I have a couple of sliding text boxes on my Flash site. Each 'frame' on the slider is accessed by clicking on an up or down arrow button. This works fine with the code pasted below if there are only 2 frames. I've used y positioning in this case. However, what code should I use to slide along the axis by a certain amount of pixels rather than to a specific y position? Let's say I want the MC to slide 315px up or down rather than to 315, 0 or -315 on the y??

Also, when the slider is in the top or bottom position (ie, when there's no more frames of info to slide to, how do I make the up or down arrow button inactive so that it doesn't just keep sliding?

Thanks for your help.

import fl.transitions.*;
import fl.transitions.easing.*;

function slideAbout(yPos:Number){
var aboutSlide:Object = new Tween(aboutSlider_mc, "y", Strong.easeOut, aboutSlider_mc.y, yPos, 1, true);


}

function downAboutClick(myevent:MouseEvent):void{

slideAbout(-315);


}
this.downAbout_btn.addEventListener(MouseEvent.CLI CK, downAboutClick);


function upAboutClick(myevent:MouseEvent):void{
slideAbout (0);

}
this.upAbout_btn.addEventListener(MouseEvent.CLICK , upAboutClick);

[CS3] Locking The X Axis
hi all

i'm following a platform game tutorial at the mo but the camera tracks with the character along the x axis but not the y axis.

i want my game to scroll up with the character and lock the x axis in place because as it is you can jump off the top of the screen and disappear while you can also walk off to the side and just see blank non-game screen

thanks

Designing With Z Axis
Does anyone know how to design sites that use the z axis like this example: http://www.billyharveymusic.com ? Any tutorials or advice on how to zoom in and out like this site does. I am not even sure what to search for right now. Thanks

Imaginary _z Axis?
After my last post about depths... it actually never worked. I thought it did, but I tried it on another button and well it just grew and kept on growing!?

So I was wandering if there was a _z axis... thus instruction the button to come to a higher layer. I can imagine if theres say, 10 movie clips on the layer, then each one will have a z coordinate... so rather than using swap depths, which doesn't want to work, instead you tell it which _z coordinate to go to.

Does this make sense?

AI, Problem With Y Axis
Im new to actionscript and flash so please dont get frustrated if anyone could help me out with a problem im having I would be very thankfull if you open my zip and in the actions of my badguy pencil is the part of my code I need help with Logicaly it's Y axis should add by 40 every frame when its x axis and my players x axis meet but it doesnt seem to work please help me

How To Set The Axis Values
Hi all,

I am running on one serious problem in my graph project..
please Anyone can helpme out.. i am attached my source file here for your kind persual.
In this i am statically display the x and y axis values in textboxes..k..
i mean 20,40,60,80,100...... like this..k..
in my xml file , there are 2 graphs.. each graph have their x and y values..k
i want to find the max value and set the x and y axis values ...
hope you will undersatnd my expectation.. right..

any help will be appriciated..
Thanks in advance..

_x Axis Enigma
Can anyone help me with this?


PHP Code:



_root.mc_game.avatar_mc["avatar_"+whichPlayer]._x += 1;
trace ("X: "+_root.mc_game.avatar_mc["avatar_"+whichPlayer]._x);
_root.mc_game.avatar_mc["avatar_"+whichPlayer]._y += 1;
trace ("Y: "+_root.mc_game.avatar_mc["avatar_"+whichPlayer]._y); 




The movieclip moves on the y axis fine, but not on the x. The x axis however, RETURNS the x value as though it's moving, but doesn't acutally move the mc visibly on the stage???

Z X And Y Axis In Flash
Hey guys

This is for learning purposes, Im trying to create dynamic 3d kind of polaroid scene. So the images kind of rotate on a slanted x and y axis, and pending on the mouse or on a click of a button they kind of rotate to its correct image and x - y - z coordinate. Im not sure of this is clear or not, i can make an image if more clearity is needed. I just need some resources or a good place to start since ive never built such a thing with flash before.

Thanks!

any help is appreciated.!

How Do I Get The Opposite Of Y-axis?
Hi,


I have a function =

Code:
i = []
onMouseMove = function() {
i[0] = logo._y;
update();
trace(i[0])
}
startDrag(logo);
Currently, i[0] is equal to the logo._y number. When I move the mouse, I want this number to be the opposite (as if the y-axis has been inverted). So that when it moves up the screen, the number increases rather than decreases.

Using A Fake Z Axis
Hello,

I have been playing around with Trigonometry in flash using methods to "create" a z-axis by scale and event loops such as used in
http://www.actionscript.org/resource...ash/Page4.html

If you check out http://www.wms.com

The flash header has a rotating menu on some sort of fake Z axis.
The question is, how do you achieve the effect where the higher objects on the "Z Axis" appear over the lower "Z Axis" objects and then when going back in the "Z Axis" go under the other objects?

Arranging MC's Through The Z Axis?
Does anyone know how I'd go about moving MCs (that are dynamically added to the stage via code) through the Z axis?

I am using a fair few visual layers and some MCs when moved around are behind others. I wanted to re-arrange the layer priorities of them, if that makes sense?

Stop Mc On Y Axis
Hi, I am trying to get my movie clip to travel <up> along the Y axis & stop at a certain point. However the mc goes off the page without stopping.....

_______________


onClipEvent (load) {
//this should set the initial y position of my clip
this._y = 50;
}
onClipEvent (enterFrame) {
//trying to get the mc to stop
if (this._y<100) {
//this should move my clip 5 pixels up every frame
this._y -= 5;
}
}

Copyright © 2005-08 www.BigResource.com, All rights reserved