Ext.mc Position
Hi, Can someone help. I am trying to give a position(x &y) to a external swf on the main scene. Here is what i write: but it doesnt work
loadMovieNum("im1.swf", 1); _x = 300; _Y = 50;
Thanx
Mel*
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 10-28-2003, 05:54 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Reset Movie Clip X-position & Y-position Back To Original
Is there a command to reset x-position, y-position and rotation all at once...like reset command?...or would I have to find the original x-positions and y-positions to all elements and hardcode that back....EEEK!!
Many Thanks
Andrea
SoundChannel.position - Trouble Triggering Event Based On .position
I would like to trigger an addChild event when my mp3 reaches a certain point.
My trace statements will only fire if I use <= but not ==
The goal is to add text to the stage when the MP3 has reached one second, what am I missing?
Ultimately there will be several trigger marks I need to hit along the MP3.
ActionScript Code:
var buffer:SoundLoaderContext = new SoundLoaderContext(10000);var welcome:Sound = new Sound(new URLRequest("Intro.mp3"), buffer);var welcomesc:SoundChannel = welcome.play();addEventListener(Event.ENTER_FRAME, playMessage);function playMessage(event:Event):void{trace(Math.floor(welcomesc.position));if (welcomesc.position == 1000) { trace("NOW!!!!!!!"); } else { trace("WAIT-------------"); }welcomesc.addEventListener(Event.SOUND_COMPLETE, soundComplete);}
How To Position Mc_example Depending On Position Of Empty Movieclip?
I have a series of movieclips (graphics) which I want to position in a row.
I know that I can define the position of each movieclip individually by _x and _y. But can I place an empty MC on the stage and define the position of every single MC with _x and _y IN RESPECT TO THE POSITION OF THE EMPTY MC - so that ALL movieclips will change their position when I move the empty mc?
Thanks for helping
Aribert
[F8] Control Position Of Playhead In Movieclip By Position Of A Button
I am fairly new to actionscripting and just need a little help.
I have a bar which has a slideable block on it. When this block is dragged, to the left/right i want it to control the playhead inside another movieclip.
For example, when the block is to the far left, the playhead (of my movieclip) will be at the first frame. When the block is dragged to the right it will play the movieclip at the speed that the block is being moved and when it is at the far right it will be on the last frame of the movieclip. And when the block is dragged to the left it will play the movie backwards at the same speed etc...
It is just like the scrubber bars that are in media players, but instead of playing an actual video, i want to play the movieclip which is of an animation.
How would I do this?
Thanks
Flash Y Position Converted To Browser Scroll Position
I have a Flash movie that makes an fscommand call to the HTML page, and via Javascript, it moves the browser window scroll position down. I need to be able to scroll down to a position that coincides with a Y position on my Flash page, but I can't seem to figure out how to convert coordinates from a Flash Y position to a browser-window vertical scroll position. I hope this makes sense. Does anyone know how to do this? (I have all the code working to do this, except for this coordinate issue. That's the only part I need.)
Example:
Code:
myMC.onRelease = function() {
//Command to Javascript function in html doc
//Scroll down in browser to Y pos specified
//This scrolls down to 1000 position within browser window but
//but does NOT equate to a Y position of 1000 in .swf movie
//even if .swf movie is at 0,0 left & top margins within browser
fscommand("scrollToAnchor",1000);
};
Ultimately, what I am trying to do is simulate anchor points from HTML (not anchor points in Flash to go 'Back'), whereby you have a link at the top of the page, and you click it and it takes you somewhere else lower on the same page. Then you have a link there that says "Back to top", and it takes you back to the top of the page, etc.
Any ideas?
X Position? Y Position? Differs In MovieClips From _root?
Hey!
I'm confused:
I want to move a movieClip that is embedded in another movieClip:
firstMovieClip >> floatingMovieClip
Now, X = 0 IS NOT the upper left corner when I try to direct floatingMovieClip.
When I investigate the movieClip sets it's X = 0 in the middle. But on _root lever, X = 0 is the upper left corner.
Is it supposed to be this silly way?
THanks!
Regards
Help With Tweening From Current Position To Clicked Position
Hi
I have a motion tweening question-
I have a large rotary dial with an arrow on it, around that are 5 buttons. I want to set it up so that when the user clicks any button, the rotary dial will rotate until the arrow is pointing to that particular button. I can't figure out how to make it so that the dial tweens from one position to the other, which is of course dicated by where the user clicks. I also want that dial to stay pointed to that specific button until another one is clicked.
How can I do this?
Thanks!!!
-Steve
Mouse X Position To Control Movie Position?
Hi, my understanding of actionscript is very basic and I'd like some help with writing a very simple script. Basically the x position of the mouse should control the play position of a movie. Do I need something like an event handler (I'm not sure exactly what these do, but I've seen similar scripts that seem to use them).
Reported X Position Doesn't = Actual X Position?
I can't figure this out. I'm loading a serious of pages of images in the same flash document, but all pages after the first one have a lower y position of about the height of one of the images. When I trace their y position they all say 30, when it's clearly more like 150. What's going on here?
I ?guess? It Is About _x.position And _y.position
My Flash 5 file attached !
When you hit button 2 and 4, you will see the word "Congratulations"
Now I would like the word just appear in the yellow area.
"You nerd - just drag the Congrats Clip in the yellow area, that's it" Hehe I know that but in my real program I have more than 110 clips which almost fill up my screen. Therefore I do not want to overlap tons of clips.
Position Of Mouse = Position Of MC
How would I tell a movie clip to move along with the mouse without dragging. Also how would I define the area to which the movie clip can move?
Why Won't MC Chang X Position According To Another MC's Position?
Trying to make it so this movie clip moves it's x position when the "hero" mc is 10 or more ahead of it. But it only reacts if it's x position is at ahead of it at all. I want it to stop moving when it's closer than 10 pixels, but it only stops if it's x position is exactly past it. Is there anyway to change that?
I tried
code: onClipEvent (enterFrame) {
if (this._x <= (_root.hero._x + 10)) {
this._x += speed;
}
}
but that just moves the hero movieclip. It seems as though any variation of that coding doesn't help.
Thanks in advance if anyone can help.
X Y Position ?
jow guys, ive made a positionchecker, this is an emtymovieclip witch checks the x and y position of an movieclip, if the position is smaller the it wil count x & y + 5 until its on the right place, untill here its work fine, BUT
i dont understand the definition of the x and y, how can i get the perfect x and y position of a symbol, when i use the infopallette it doesnt work just fine, the x and y position doesnt match, how do i do this
._x Position
The setup for a game I am making has a main character that fires a gun. When the gun is fired if the bullet hit test with the enemies is true I want to get the x position of the enemy movie clips the hit test is true for and then determine which clip is closest to the main character so that only the enemy closest is damaged. Can someone help explain how to go about scripting such an event?
X And Y Position---
Is there anyway to tell the X and Y positions without
have to do the actionscript(changing the numbers over and over)to get your required placement
(x),(y) Position
I want to set the (x) and (y) position of a movie.How to do that?
_x & _y Position
Hi,
I'd like to have a MC "ball" to be dragged over the stage. After some time the movie jumps to the next scene. There is an MC "rectangle".
When you arrive in the next scene to ball changes to a rectangle, but the rectangle must be at the same spot you've dropped the ball in the first scene.
I've used this code in the first frame of the second scene:
Code:
_root.rectangle._x = _root.ball._x;
_root.rectangle._y = _root.ball._y;
It doesn't work
Maybe my question isn't formed well, so take a look at my file and then you'll now what I mean
http://www.vbsjabbeke.com/~karl/kgpproblem.fla
Thank you for your time
kgp
X And Y Position Of An SWF
Please can anyone tell me how I can define the X and Y position of an SWF when loading it on a level. Ex if I have the Main.swf on level 0 and I want to load another SWF, called profile.swf on Level1, but I want it to appear in a particular region of the screen, how can I define its X and Y position?
Thanks in advance
X Position
Hi
I am designing a slide which contains small photopics on it. What I intend to do is that when the user single clicks on the menu button, I tell the timeline to go to a particular label (moving the slide on the screen), and when the user double clicks, I tell the timeline to go to another label (moving the slide out of the screen). However, when the slide is already on the screen and the user clicks once, the timeline goes to the first label again and the slide re-appears on the screen. I wish to do some sort of trapping to tell the timeline that if the slide is already on the screen and the user single clicks, the slide does not re-appear and just does nothing, and the same goes to the double click action.
I was going to do it by determining the X Position of the slide, which is a movie clip. Do you know how I can get this XPosition of the slide movieclip from the screen, or else, do you have a better solution for my error trapping?
Thanks in advance
X, Y Position
I'm trying to make two dynamic text boxes, one displaying the mouses x position and one displaying tthhe mouses y position. Right now i'm just using the basic:
xtext=_xmouse
ytext=_ymouse
This works, but I want the numbers to display the x and y postions in real time as the mouse moves about the movie clip but for some reason all it's doing is displaying wherever the mouse is at when the movie opens, it doesnt change. any advice?
X Position Y Position
All-
Seems simple but I am trying to move a MC from one point of the stage to the other using actionscript. I would like this movement to be gradual, as I am also scaling the clip from about 10% to 100%. My code for the scale seems to work okay, (see below) but I can't figure out how to get the movement to mirror the scaling action. I would like to move the clip (_root.plane2) from the upper right hand corner of the stage to the center. My stage size is 1024x768.
Thanks in advance,
Randall
current_x = getProperty (_root.plane2, _x);
current_y = getProperty (_root.plane2, _y);
target_x = (_root.plane2, _x, 491.2);
target_y = (_root.plane2, _y, 371.2);
current_xscale = getProperty (_root.plane2, _xscale);
current_yscale = getProperty (_root.plane2, _yscale);
var i = 1;
x_diff = current_x - target_x;
y_diff = current_y - target_x;
fadelength = 50;
target_xscale = 50;
target_yscale = 50;
scalex_diff = target_xscale + current_xscale;
scaley_diff = target_yscale + current_yscale;
while (i <= fadelength)
{
// --fadelength;
inc_pos_x = x_diff / fadelength;
inc_pos_y = y_diff / fadelength;
inc_scale = scalex_diff / fadelength;
new_x = current_x + inc_pos_x;
new_y = current_y + inc_pos_y;
newscalex = current_xscale + inc_scale;
newscaley = current_yscale + inc_scale;
setProperty (_root.plane2, _x, new_x);
setProperty (_root.plane2, _y, new_y);
setProperty (_root.plane2, _xscale, newscalex);
setProperty (_root.plane2, _yscale, newscaley);
i++;
trace (new_x);
trace (new_y);
if (new_x<=491.1 and newscalex >= 100)
{
gotoAndStop (1);
// setProperty (_root.plane2, _x, 491.1);
// setProperty (_root.plane2, _y, 371.2);
with (_root.mc_components)
{
gotoAndPlay (1);
with (_root.mc_text1)
{
gotoAndPlay (2);
with (_root.mc_text2)
{
gotoAndPlay (2);
Help Position
hello
I want to move mc with the following instruction
on (press) { _ root.feld2_x = 300; _ root.feld2_y = 20; }
as far as so well now I want to start however a further mc if specified mc at the indicated, the above, place am thus speak if feld2 the position x = 300 and y 20 reached am a further mc to be started. have somehow blockade
thankx black
Mc Position
please help!!!
I have a movie clip named "one" in my library and I want to use attachMovie to place it on my stage.
i am using _root.one._x=0;
but it does not get placed at the left most point in my movie. it gets placed far more left...like a -x value.
why is that happening? how do you position an attached mc??
please help. thank you.
Position
How do I save a MC's position and apply that position to another MC.(In frame one save MCone position and then in frame 2 Move MCtwo to the same position MCone was in frame one)
Thanks
Swf Position
Flash MX
i have a button that loads an external mc into my main movie.
how can i set the position of that external mc???
Position, Position...and Position...
Hello, well every time ive had a question, it's been anwsered, so iam very thankful for those who take the time to help us newbs out
Okay, so here's my question: i have this website (www.geocities.com/shaolingoon) and it's solely done in flash. I would like to know how i position the movie in the center of the screen regardless of the resolution/browser the user is using. Right now at a resolution of 1024x768 it looks just fine, but if u change ur resolution, it'll either get positioned in the left upper corner or bottom right corner. I have used Dreamweaver for the positioning i used a css code position: absolute. But the thing is, with this code, regardless of the number of pixel put there, it doesnt change the position of the element. I can manually change it's position though. So if anyone could give me a hand with, it would be greatly appreciated. Thanks in advance!!
shaolin_goon
Position
i want the _y position of the movie aboutinf to become a bit bigger if counter is bigger then pos, if pos is by example 100 and i use a button to set counter to 196.4 then pos will become bigger until it is 196.4 and it works perfect. you can see that the _y position = pos, it works perfect like this but pos only becomes bigger with 1 at a time and i want it to go bigger with more than 1 at a time for example with 5.
i used this action and it becomes biggeer with 1 at a time.
----------------------------------------------------
pos = _root.movie.info.about.aboutinf._y;
if ( counter > pos ) {
pos = _root.movie.info.about.aboutinf._y++;
}
----------------------------------------------------
i just don't understaind why it is becoming bigger with 5 at a time if i use this
----------------------------------------------------
pos = _root.movie.info.about.aboutinf._y;
if ( counter > pos ) {
pos = _root.movie.info.about.aboutinf._y+5;
}
----------------------------------------------------
i used a button with this action to set the counter
----------------------------------------------------
on (press) {
_root.movie.info.about.counter = 196.4;
}
on (release) {
_root.movie.info.about.counter = _root.movie.info.about.pos;
}
----------------------------------------------------
i am sure it is just a little mistake that i make but i don't know what.
Position
how do I capture MC1's x position and y position to set MC2's x position and y position to those values?
SWF Position?...
Using actionScript, how do I change the position (x/y coordinates) of a SWF that I'm loading into my movie? Also, can I change the size as well? As an example, how would I ammend the following line of code to reflect a position of x=400, y=100, and a size of 200x200, if possible - thanks!...
loadMovie("myMovie.swf", 2);
Position MC?
How do you position a movie clip in your main movie when using the following script: loadMovieNum("image.jpg", 1); so flash MX reads it from an external file.
It always defaults to the top right hand corner of my main movie. Do i need to script the positioning in the MC: Image001 & if so what is that script - haven't got a clue where to go from here. Also is there a way while working on my fla I can see when moving my mouse how the co-ordinates change?
X And Y Position
Hi everyone !!
I have a simple question : I would like to get the x and y position of the mouse and display them on the screen. I thought I could get the x and y position thanks to a MovieClip and then display them thanks to a dynamic textfield. It doesn't seem to work. Anyone has a clue ??
Thanks ;-)
Position Of Swf
hi
i have a load movie function that would load a swf file..how do make it so it opens up in the center of the page as appose to it opening in the top left corner
thanks
X Position
Hi
I want to write an if/else statement that checks to see if a dragged movieclip's x position is 350 (on the _root), and if so, then tell another movie to goto frame "drag_ok". If not do nothing.
Set X Position
i have an object i need that i need the x position set by an outside generated text file.. i need help in what exactluy needs to be in the text file to make this happen.
this is an example of what i thought would work.
_root.object. _x =400
nada..
thanks
X Y Position
Hey everyone
i HAVE THESES 3 BLOCKS WHICH WILL BE POSITIONED FOR A TRAINING AID. i NEED FOUR BLOCKS BUT I FOUND THESE 3 THEY USE TO BE HANDS BUT i CHANGED THEM TO BLOCKS
i INCLUDED THE FILE SO IF YOU KNOW HOW TO MAKE 4 LET ME KNOW ALSO
I WANT TO HAVE MY X Y DIPLAY CORRECTLY. I WOULD LIKE MY READOUT TO DISPLAY X Y LIKE WE WERE TOUGHT IN MATH CLASS.
0,0 IS THE CENTER OF THE STAGE
ANYTHING TO THE RIGHT OF Y AND ABOVE X HAS POSITIVE VALUES.
ANYTHING TO THE LEFT OF Y AND ABOVE X HAS POSITIVE AND NEGATIVE VALUES VALUES.
BELOW AND TO THE RIGHT IS MINUS VALUES FOR BOTH X, Y
SAME FOR THE LEFT.
i PUT THIS TOGETHER FROM THE FOUREM SO FAR BUT IT NEEDS A LITTLE EXTRA
ANY HELP OR SUGGESTIONS WOULD BE GREAT.
THANKS EVERYBODY
X And Y Position For MCs
Can someone please help another dreaded newbie?
When I load an MC into another container SWF using:
loadMovieNum("movie.swf",15);
this._x = 137;
this._y = 202;
stop();
On say frame 25...
The MC is positioned out of the window of the container SWF -- like it's using the exact negative numbers (-137 & -202). When I use negative numbers, then the container SWF itself moves up and out of the window -- leaving the loaded MC at x=0 y=0.
I know it is possible to load an MC in a container SWF at predetermined x/y coordinates, what am I doing wrong?
Thanks in advance.
Position X Y
Hi all,
I need to rewrite this code, so that I can load mc to chosen position x and y.
Thank you for any help.
onClipEvent (load) {
startx=_x;
starty=_y;
x=Math.random()*120+30;
y=Math.random()*120+30;
_x=x;
_y=y;
newy=_y;
newx=_x;
}
onClipEvent (enterFrame) {
if (_parent.i==true) {
_x+=(startx-newx)/10;
_y+=(starty-newy)/10;
newx=_x;
newy=_y;
}
}
Help With X-position
I need help making a panorama in my project slide from left to right based on the position of the user's mouse. I've tried tutorials and nothing is helping me.
Does someone have a good tutorial or could someone help?
X Position Help
Hi everyone, I've got a question regarding using x-position to trigger alpha-fades. My movie has 4 sections (4 vertical columns). Depending on the mouse's x-position, I'd like the columns' respective movie clips to fade up (preferably with actionscript, as it'd be easier to change later and, if I understand correctly, use less processing power). So, for column 1, when x is in the first quarter of the screen, movieclip1 should fade to 99 or 100% alpha. When x is not in the first 1/4 of the screen, movieclip1 should fade out and the movieclip that x is over (movieclip2, movieclip3, or movieclip4) should fade up. This is the code I've come up with so far, but it's not doing what I'd like. Also, it starts everything at 100% alpha, while I'd like everything to start at 0%:
(this is for movieclip 1 (in the first quarter of the stage):
onClipEvent(enterFrame){
if(_x < Stage.width/4 ) {
this._alpha+=2;
if (this._alpha >= 99)
{
this._alpha = 99;
}
}else{
this._alpha-=2;
if (this._alpha <= 1)
{
this._alpha = 1;
}
}
}
Can anyone help me with this? Thanks for your time.
edit: one other thing I forgot to add: I think I'll need to express x position as ranges, as in movie one is x<(screenwidth/4), movie two is (screenwidth/4)<X<(screenwidth/2), movie three is (screenwidth/2)<x<((3(screenwidth))/4), and movie four is x>(3(screenwidth)/4). How is this done? Thanks.
Y Position
i made a simple program where part of it was lining up 3 items vertically
i used the code
Code:
thing1._y = 50
thing2._y = 50
thing3._y = 50
but for some reason they were not lined up
when i modifyed theyre positions by manually putting 50 in their y co-ordinate boxes, they lined up fine
why did this happen?
Getting MC Position
Hi guys!
How could I get the position of a MC not in the stage rather a fullscreen window?
TIA.
Set _x And _ Y To Position
Hi.I have this script where x and y properties move to a predefined place after a button is pressed.What I am trying to figure out is how to limit the _x
property from going past a certain point.So i can't figure out a function to keep x from going beyond a point.So code below.
code:
cionbe._x = 135.5;
cionbe._y = 134.8;
// initialize to the first one
var myLocationsX:Array = [2, 38, 89, 138,180,217,254,289,322,353,379,410,437,463,484,50 9,533,554,577,599,618,636,655, 670, 683];
var myLocationsY:Array = [121, 102, 83, 65, 46, 30];
mybuttons = [C,CSDF, D, DSEF, E, F, FSGF, G, GSAF, A, ASBF, A];
for(i in mybuttons) {
mybuttons[i].locationX = myLocationsX[i];
mybuttons[i].locationY = myLocationsY[i];
mybuttons[i].onRelease = moveEm;
}
function moveEm (){
var pos:Number = random(myLocationsX.length);
cionbe._x = myLocationsX[pos];
cionbe._y = myLocationsY[pos];
// this sets cionbe to one of the preset locations randomly
}
So say i have two more buttons and one is for not letting _x go beyond 322,and another button for not letting _x go beyond 577.How would I go about doing that?
I hope this makes sense if not let me know I will try to explain it better.
[F8] Put A MC In A Certain Position
Hi guys,
How can I put an MC in a certain position I mean every time I test an movie I want to the MC stays in x = 60 y = 50 for instance.
cheers
X Y Position
I made a ball (movie clip). I want when swf running the ball will be moving and in a text box its _x and _y position will be shown...
help me please.... I am a newbie
X And Y Position
Ok,
this has been bothering me for awhile and I have just been estimating but I want to get exact movement now.
I am scripting movement. I set a startx and endx. Now for the positions i set something like 500 startx and 300 endx.
On the stage with the rulers this is where i want it to move to. But when i script the movement it ends up somewhere else. Why is this and how do I find out exactly where the movie will move to?
SWF Position On Top
Hey,
when I put SWF file in Dreamweaver table, it doesn't appear o top. There is a 0.5 centimeter gap. I would like the SWF to be positioned on top, without any space.
How can I make this?
Thanks,
Jure
Z Position
I'm haveing a hard time reconciling the scale and z of my movie clip. I can't seem to get it publish at 100%. Shouldn't myMcContainter.z = 0; myMc.scaleX = myMc.scaleY = 1; publish myMC at 100%?
_X And _Y Position
Hi all!! Good morning!!
I need to control the X and Y position of some movie clips but it's not working. This is what I'm doing:
Code:
i = 1;
my_picture = this._name.substr(0, 9);
my_X_position = this._x;
my_Y_position = this._y;
while (i<=N_pictures) {
picture = "picture_"+i;
if (picture == my_picture) {
eval(my_picture)._x = my_X_position;
eval(my_picture)._y = my_Y_position;
eval(my_picture)._alpha = 100;
i = i+1;
} else if (picture<>my_picture) {
eval(picture)._alpha = 0;
eval(picture)._x = 2000; //I'm sending the movie clip far away
eval(picture)._y = 2000;
i = i+1;
}
}
I put the movie clips with an _alpha = 0 at the beggining in the correct position. When picture = my_picture, the script should put the movie clip at it's position but instead it puts it somewhere else.
The script is not in the main timeline, everything is inside a symbol. Could this be the problem?, How do I solve this?
Thank you very much in advance!!
Lasbi
Can U Ask: If ANY Mc Is In A Certain Position?
I would like to check in an IF statement, if any 1 of 18 movie clips are in a cerain x and y position.
Is there a way I can check this without writing a similar piece of code 18 times?
Many thanks,,
Mark
Need A Little Help With MC Position.
Hi everyone.
I have a very small problem with the attached Flash File.
You will see there are 3 different Images that scroll (if you click on one of the circles on top of the page) This works fine.
But what I need is to display the proper "story name" when the third image lay out slides in.
I think you will understand better if you examine the attached file. It is very small and simple.
Any help is very appreciated.
Thanks
NOTE: I tried uploading the file but it was not small enough to be uploaded here. So I uploaded this to my server.
the path is here.
www.nuvoblue.com/cem/swf1.fla.sit
|