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




[FMX]need To Load Movie Into Certain Coordinate



I am loading a swf into my website using loadMovie on level 1 (which i am not sure is the best way) and it shows up in the upper left hand corner by default i guess. how do i give it the coordinates so that it appears where i want it to.any help is appreciated..thx



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 08-07-2007, 03:06 PM


View Complete Forum Thread with Replies

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

How Do I Load Movie To A Specific Coordinate?
I need to load a movie into a specific coordinate in my main movie. I understand the loadmovie action but can't figure out how/where to add the x and y coordinates.

Thank you.

[F8] Form To Create Flash Movie, Image Moving From Coordinate To Coordinate.
First, I am a 99.9% Actionscript noob. All I know how to do in AS is stop, start, go to frame, simple buttons, etc.

Second, the thing I am trying to do is semi-complicated (I think, as i have nothing to base it on)

Third, here it is:
Basically I would want something set up like this:

*********Form in HTML (or flash)*********
Coord 1 (x): |_______|
Coord 2 (y): |_______|
Frames: |_|

Coord 1a (x): |______|
Coord2a (y): |______|
Frames: |_|

etc. etc
*********************
Then I would want it to somehow (:P) take that, and generate a flash movie (well just the content-ish), so that a symbol will move from the x,y coords to the other in the specified amount of frames.

i.e.
Coord1=5
Coord2=10
Frames=6
Coord1a=20
Coord2a=34
Frames=8

Then the symbol would start at 0,0, move to 5,10 in 6 frames, then move to 20,34 in 8 frames.


Is this possible, if so, is anyone willing to code this, or provide me with some suggestions on how to do this?

Form To Create Flash Movie, Image Moving From Coordinate To Coordinate.
First, I am a 99.9% Actionscript noob. All I know how to do in AS is stop, start, go to frame, simple buttons, etc.

Second, the thing I am trying to do is semi-complicated (I think, as i have nothing to base it on)

Third, here it is:
Basically I would want something set up like this:

*********Form in HTML (or flash)*********
Coord 1 (x): |_______|
Coord 2 (y): |_______|
Frames: |_|

Coord 1a (x): |______|
Coord2a (y): |______|
Frames: |_|

etc. etc
*********************
Then I would want it to somehow (:P) take that, and generate a flash movie (well just the content-ish), so that a symbol will move from the x,y coords to the other in the specified amount of frames.

i.e.
Coord1=5
Coord2=10
Frames=6
Coord1a=20
Coord2a=34
Frames=8

Then the symbol would start at 0,0, move to 5,10 in 6 frames, then move to 20,34 in 8 frames.


Is this possible, if so, is anyone willing to code this, or provide me with some suggestions on how to do this?

Load .SWF In Specific Coordinate
I have a project that is 800x600. I am using the loadMovie command to bring in different .swf files that have .flv's. I want the .swf to load in a specific coordinate (x=286 and y=140) on the page. How do I do this? I could go back and place the flv in another 800x600 file in the correct coordinate and make all new .swf files, but that would be very time consuming as I have about 50 swf's to load throughout the whole project. I am laoding all movies on level 1. Does anyone have a suggestion as to how I can load a .swf that is smaller than my main movie in a specific coordinate? Any help is much appreciated.





























Edited: 06/11/2007 at 12:55:46 PM by necie

Loading A Movie To A Certain X, Y Coordinate
I am trying to use a button on my main movie to then load another movie. Problem is, the loaded movie keeps playing at the top left corner on the main movie. I want it to be at a certain point on the stage.
I can not find a tutorial for this specific problem. If someone could point me to one or just let me know I would appreciate it. Thanks.

Link To _y Coordinate In Movie Clip
I have a movieclip which is a bunch of thumnail images inside of a scroll pane. It will be set up so you can scroll down or I also want people to be able to click on a button and go to a particular section of that movieclip

The button is on the main timeline for that scene and here's the code I've tried... pane is the instance for the scrollpane and thumb is the instance for the thumbnail movieclip. I can get the scrollpane to move -50 if I take out the thumb instance, but I can't get the parent child thing to happen.

on (release) {
_pane.thumb._y = - 50;
}


on (release) {
_root.pane.thumb._y = - 50;
}


on (release) {
pane.thumb._y = - 50;
}

Sliding Coordinate Movie Clips
I had a site (offline, lost the file) that had jpgs in a movie clip and which slid on an x-axis to a specified coordinate upon clicking.

The first frame went something like this:

ActionScript Code:
loops = 0;
_root.target_x = 1157;
_root.xdiv = (_root.target_x-_root.portBar._x)/5;
2nd frame:

ActionScript Code:
loops++;
_root.portBar._x += _root.xdiv;
3rd frame:

ActionScript Code:
loops++;
_root.portBar._x += _root.xdiv;
if (loops<5) {
    gotoAndPlay(2);
I was wondering if anyone knows a way to have images move like the portfolio images in Asterik Studio? If there is a post on this or a tutorial (any kind of image sliding like this would be great) I would appreciate a link. Thank you.

How To Coordinate Multiple Movie Clips...
I want to make it so when I release one of my menu buttons AS does the follow:
on(Release) If Movieclip1 is on frame 2, the movieclip1 go to and play frame 3

If Movieclip1 is on frame 2, the movieclip1 go to and play frame 3

Really the only problem I am having with this is i don't know if i can say multiple if then statment on one trigger and I also dont know how to say "is on frame..." properly in an if then statement. Could someone please tell me how it should probably look. Thanks. Mike

How To Coordinate Multiple Movie Clips...
I want to make it so when I release one of my menu buttons AS does the follow:
on(Release) If Movieclip1 is on frame 2, the movieclip1 go to and play frame 3

If Movieclip1 is on frame 2, the movieclip1 go to and play frame 3

Really the only problem I am having with this is i don't know if i can say multiple if then statment on one trigger and I also dont know how to say "is on frame..." properly in an if then statement. Could someone please tell me how it should probably look. Thanks. Mike

Setting The X, Y Coordinate For A Button In A Movie Clip
I am trying to set the x and y coordinate of a button that I have placed an instance of into a movie clip. The problem is that it is not moving it relative to the movie clip, but relative to the screen coordinates, which I do not want.

The code is executed as an "on (release)" of another button located in the movie clip.

Any help would be appreciated. Thanks

How To Move A Movie Clip To Absolute Coordinate
Hi All,
I am making a sliding submenu.
http://www.teamhayes.net/multicom/multicom_02.html
When you go to the portfolio section and click on the buttons "Brand strategy", "Packaging" or "collateral" the submenu moves to a new y value on the screen. I am using this script to move the movie clip in the submenu

on (release){
this.tester.mc._y=90
}

It works until you use the scroll (up/down arrows)buttons on the submenu the when you click on "Brand strategy", "Packaging" or "collateral" buttons you see the y value is relative to the last position the submenu was in.
I need to know how to move the movie clip to an absolute y coordinate on the stage.
Here is the link to the test site:
http://www.teamhayes.net/multicom/multicom_02.html
I hope this makes sense.

Can You Shift The Coordinate System Of A Movie Clip In Flash?
This could be a simple "no" answer but I really hope it's not.

I'm working on a mario-esque side scroller for flash. My next task is to handle camera movement. In other words, leave the player in the center of the screen and move the world around him or her. I was wondering if there is an option in flash to shift the coordinate system?

For example, say my movie is 500 x 500. If the player is at (1,000, 1,000), my movie's coordinate system would no longer start at (0,0) in the top left, but instead would start at (750, 750). This would put the center of my flash movie on the player at spot (1,000, 1,000).

This would eliminate the need for me to update every objects associated movie clip in the world one at a time.

Can The Load Movie Action Be Used To Load A Specific Frame Of A Movie?
can the load movie action be used to load a specific frame in a movie?

Max And Min X And Y Coordinate
How do I set the maximum and minimum limit the x and y axis could go for a MC? Thanks.

GPS Coordinate
Is there any transform function or a way to define a viewbox (like in SVG) in order to be able to read GPS data from database and plot places (x, y) accurately on map (enable use of real-world coordinate systems).

I would also like the user to be able to click on the map and get the GPS x, y and store it. Would that be possible?

X, Y Coordinate Help ?
Hi, I am a graphic design student and I'm trying to create a simple webpage in flash, I have been trying to search for this specific thing i need and have no clue what its called but heres what im trying to do.

I have a large image file that i would like to divide into 4 sections, whether its divided mentally, visually, i just want it to stay a whole image and use it as 4 quadrents. I would love to just be able to put the image file in flash, make some simple buttons so that when i click on one it takes me to a section(quadrent) on that picture so its scrolling around on the x & y axis on that picture instead of creating new pages. Does anyone understand what im trying to do or have any sample code/movie clips to simplify this so i can understand whats happening. I have a Flash 8 quickstart book and nothing is really covered in there for what i want to do. Any help you can give is greatly appreciated! thanks

[F8] X Y Coordinate Help
Hello,
My question is how to move a movie clip along an the x coordinate. It's a long movie clip that extends pass the right side of the stage. I want a button each time when pressed to move the movie clip about 500 pixels along the x coordinate to the left. Is there any actionscript that can do this or know of any tutorials? Any suggestion are appreciated! Thanks!

X And Y Coordinate Help
hey guys, I was wondering if you could lend a hand...

I want to write a script that would work something like this: when the cursor is between 125 and 175 on the x plane and 100 and 125 on the y plane, mymc.gotoAndPlay (2).

I was thinking about using the _xmouse and y_mouse commands but I can't seem to get them to work correctly...the movie clip always plays from the start.

Following The Y Coordinate Only...
It has to be simple.... err ok. I have a rocket launcher. I know how to make it follow the mouse.. but I only want it to follow the y coordinate. I need the x position to stay locked, so the launcher will only move up and down with the mouse.

so, simply thinking, I put this on the launcher:


ActionScript Code:
onClipEvent (enterFrame)      {       this._y = _ymouse        }


when I preview the movie, it just dissapears

*sigh* why?

after that I tried all kinds of things relating to stopping and start dragging, hit testing various movie clips, etc. and nothing works right.

X And Y Coordinate = 0
hi i generate numbers of sprite in a loop and i put them at the stage with random coordinates. When i look their x and y (sprite.x or sprite.y) coordinate they seems 0.
i guess the 0 is the origin of the sprites i want to learn their position according to stage

how can i do that?

Does Load Movie LOAD Entire Movie, How Can I Stream It?
i have a load movie loading my music. I have a preloader at the front of my music, but i dont think the preloader is working on load movie. Does the load movie command download the whole movie into cache, or does it just start playing the movie.

IE.. if i have a 5 meg mp3 that i wanna dled and listen to, is it just downloading the whole thing, until the movie is loaded, and then playing, or is it streaming it in?

i tried to make a preloader for it, but it looks like the preloader just instantly zooms across... how can i show status of this movie loading?

thanks

External Movie Will Not Load, But Does Load When I Use 'test Movie'?
I had my external movies loading wonderfully then all of a sudden one of the externals (that I use 'loadmovie' on) will not load? The weird thing is that when I test my movie using 'test movie' in my main movie, it works fine, but when I go to my staging (test) site: www.gbebos.com/Liz/Hit.htm the one movie in 'Earth elements' page will not load, but the other movies i.e. 'Crystal Elegance' and 'Silver Essence' work fine. I made sure that the .swf and .html were transfered to the domain and they are both there.

Any help for this newbie would be greatly appreciated!

Thanks again to ya all at Flashkit!

gbebos

How Do I Stop My Second Movie Load Clearing My First Movie Load?
Hi,
Working on a home page where a swf movie loads and plays on the timeline.
The problem is when the second swf movie loads and plays further along the timeline the first swf movie disappears...I want it to remain on my stage!

Any ideas?

Cheere Jim

Here is the code I'm using to load the swf movies:

this.createEmptyMovieClip ("emptyClip",this.getNextHighestDepth());
emptyClip.LoadMovie(...swf");

Please Help With Random X-coordinate
I'm trying to create a flash with a MC that has a random x coordinate and then pauses a few secs before moving to a new random x coordinate. I'm an actionscript newbie, please help.

Coordinate Confusion.
Hello all need help on newbie question,

I place a pic onto scene 1.
Then, I make a new MC contains that pic.

The problem is I don't know how to place the pic on the MC, same place as the pic on scene 1. Tried to key in the X and Y coordinate of the pic in MC same as the coordinate of pic in scene 1 but still dislocate.

Help With X Coordinate Variable
Hi,

I'm trying to use the x coordinate of one of my movie clips as a variable in a particular scene. The x coordinate of this movie clip changes around alot. I'm looking for some actionscript property or code which will grab the x coordinate as a variable whenever the movie clip reaches a stopping point ( I don't wnat multiple variables, just one that changes value whenever the x coordinate changes). Is this what "GetProperty" does? Also, I need to feed this variable into another movie clip embedded into the one whose x coordinate" I'm trying to get. I realize this message is probably pretty convoluted. But if you can decipher this message and help me out, I'd greatly appreciate it. Thanks

Rob

X And Y Coordinate Return
In the code below, I have a button named "rmc" within a mc named "redmc". In the rmc button code on the second on release (if) statement is true, (the target is not hit), the "rmc" does not return to the exact same location as it is initially set. Whats up with that.

Thanks for the help!!!!


on (press) {
startDrag(_root.rmc, true);
}
on (release) {
stopDrag();
if (_root.rmc._droptarget == "/rtarget") {
_root.correct.gotoAndPlay(2);
}
}
on (release) {
if (_root.rmc._droptarget !== "/rtarget") {
_root.rmc._x = "75.9";
_root.rmc._y = "224.8";
}
}

Coordinate Confusion
I found some code that allows me to move an object across the stage and ease it into position:

onClipEvent (load) {
point_a = -25;
point_b = 400;
this._x = point_a;
speed = 7;
}
onClipEvent (enterFrame) {
this._x += (point_b-this._x)/speed;
}

I used this code on some symbols that I planned to add to the root timeline at some point. In fact I put the afore mentioned symbols into another symbol (B) to be added to the timeline.

I noticed that when i put the coded symbols into symbol B that the objects didn't slide into the correct position on the stage when I previewed.

After wracking my brain I realized that the coordinates of the root and preview timelines are different than symbol timelines. Symbols tend to put the 0,0 position in the middle of the screen. The root/preview timelines puts 0,0 in the upper left.

To rectify this I put my coded symbols into the lower right corner of symbol B (all positive _x._y values.) This worked but it squeezed me into the corner. I don't have access to the full 800 px width of the _root movie.

Is there a better way to do this? Why does Flash treat the coordinates of the main stage and the symbol stage differently? How come when I center a graphic in a symbol it only shows the positive area of the symbol when I preview it?

Any thought or help would be appreciated.

Thanks.

D

X Coordinate Motion
Hi all,

This being my first post and venture into flash my lingo may be a little hard to understand but I shall try to explain myself.

I have attached an example file of what I am trying to do. I need to learn how to move mc's off the screen by way of only an x coordinate change on a button press.

For example when you press the red button I want the green blocks going accross the screen to move off the screen and then come back on as red. And then the same back to green or blue.

Thanks a lot for your help and please tell me if this does not make sense

Xy Coordinate Menu
I am trying to design to a flash layout where every link (menu option) changes the XY coordinates of the content on the page. Essentially the whole page is moving except for the menu.

This example is the closest thing on this site that I could find:

http://www.flashkit.com/movies/Appli...0560/index.php

The difference would be that clicking on a menu item would cause the content to move to one specified set of XY coordinates. Anyone have any tips on how to accomplish this sucker?

Thanks a lot,
Chris Bjerken

Getting The X Or Y Coordinate Of A Movieclip
This is probably real simple. I am trying to create a variable that will tell me the y coordinate of movieclip "object1_mc" and then use that in the below tween. I am just trying to figure this out, I will eventually want to put an if statement in there, to run the tween only if that movieclip is on the stage. Thanks for any help.


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

white_btn.addEventListener(MouseEvent.CLICK, doClick1)
function doClick1(e:MouseEvent):void
{
var myTween:Tween = new Tween(object1_mc, "y", None.easeOut, 0, 600, 1.5, true);
}

Coordinate Systems
I'm having an issue resolving the correct dimensions for the stage. Check out this code below:


Code:
var brick1:Sprite = new Sprite();
var brickHolder:Sprite = new Sprite();
stage.addChild(brickHolder);
brickHolder.addChild(brick1);

brickHolder.x =0;
brickHolder.y = 0;
brickHolder.graphics.beginFill(0x00ffff);
brickHolder.graphics.drawRect(brickHolder.x, brickHolder.y, stage.stageWidth, stage.stageHeight);
brickHolder.graphics.endFill();

brick1.x = brickHolder.width/2-10;
brick1.y = brickHolder.height/2-10;
brick1.graphics.beginFill(0x000000);
brick1.graphics.drawRect(brick1.x, brick1.y, 20, 20);
trace("This brick is at: "+brick1.x+" "+ brick1.y);
trace("Stage size: "+stage.stageWidth + " " +stage.stageHeight);
brick1.graphics.endFill();
Now, what I expected to happen was there would be a square in the center of the viewable area right? But instead the square appears in the bottom right corner. If I don't divide by 2, the square appears waaaaay off screen. What gives?

CS3 Get Y Coordinate Code
Hi everyone,

I am trying to create a menu in CS3 using Action Script CS3, and I would like to have a rectangle (menuHighlight_mc)beneath the text move to the button (about_btn) when you roll over the button with your mouse. Right now, the box always goes to the 0.00 y coordinate, and then goes to the button I am rolling over.

My question is, is there any way to tell flash to get the current y coordinate of "menuHighlight_mc" and using that number as the beginning tween coordinate, or do I have to have 4-5 if statements to cover them all?

Thanks in advance for the help! (See code below)
Rich

var toabout:Tween = new Tween(menuHighlight_mc, "y", Strong.easeInOut, 0, 184.9, 2, true);

about_btn.addEventListener(MouseEvent.MOUSE_OVER, goAbout);
function goAbout(e:MouseEvent):void{
toAbout.start();
}

Getting Coordinate Of A Sprite
Hi all,

sorry if this is a repost, but i couldn't find any related post.

I have written a class that extends flash.display.Sprite. The instances
of this class are added to a container sprite.

Now when accessing this.x or this.y in the instance, i keep getting 0 for both
calls, no matter where the object is positioned.

As far as i can tell from the documenation the x and y properties hold the X/Y coordinates of the object relative to the local coordinate system of the parent.

Why are these properties 0 all the time ?


thanks for your help !

Coordinate Confusion. Help?
I am working through the Flash To The Core book by Josh Davis. I am having difficulty understanding how to get coordinates to constrain a rectangle while working on the HitTest chapter. I know that there are 4 coordinates. Is it Left-Right-Top-Bottom? As far as I can see I don't get how he has come to the coordinates he has entered. The upper left corner is x-0 & y-0. I am just confused on how to generate the rest. The numbers he has don't make sense to me, but they work. Thanks to anyone who will try to understand my confusion. I want to know how to do figure this out for myself in the future.

X And Y Coordinate Inconsistency?
I have successfully created a drag and drop quiz interaction with Flash MX where the user drags movie clips to their respective targets. If they release the draggable clip within a certain number of pixels from its target, it snaps to the target, but if not, it snaps back to its original position. It works wonderfully, but I had to modify the x and y coordinates in the actionscript code to arrive at the correct result and I'm not sure why.

First I created four draggable objects and aligned and spaced them evenly using the x and y properties on the Properties Inspector. I then applied code to the object, for example:

on (release) {
stopDrag();
if (this._x >=357 and this._x <420 and this._y >=290 and this._y <330){
this._x = 395;
this._y = 309;
}else{
this,_x = 107;
this._y = 205;
}
}

But I had to shift all of my x and y coordinates in the code to make it work. I had to add about 77 pixels to each x coordinate and about 25 pixels to each y coordinate. Specifically, in the code above, the object snaps back to x107 and y205, but the original position of the object (placed by the Properties inspector) was x30 and y180.

Why is there this inconsistency between the coordinates created by the Properties inspector and the coordinates used in the actionscript code?

Thanks!!!
nymnyi

Maximum X/y Coordinate
Is there any limit for x/y coordinate of MovieClip (real question is what is maximum x/y coordinate that MovieClip can have) ?

Thanks,
Zaharije Pasalic

Coordinate Array
hi
i have these codes i want to play the movie by NetStream but it gives error when i debug it.
isnt coordinateArray[0] a number???how can i use this array?

var coordinateArray:Array;

var coordinate:Number =Math.floor((mouseX-201)*4000);

coordinateArray[0] = coordinate+1 ;

netStr.play(flvnmfull+coordinateArray[0]);

The Text Coordinate
i have a input text to let user key in text....
i want to mark a tick beside any "a" that the user key .
So i want my movie clip(tick) appear just beside the "a" the user key in...
how do i know the coordinate of "a"?

Random Y Coordinate
Does anyone know how to make a movie clip begin to play at a given x coordinate, but a random y coordinate? Thanks in advance.

Help Locating X N Y Coordinate
i have a flash movie that search the body of the person. i already tried locating the x and y axis thrue entering the exact x and y coordinate.

what i want to do now is create a text box that locate the ear, nose and etc.. what i understand is i have to instantiate the nose= x,y , ear=x,y and etc.. the provlem is i dont know how to star it. and i watn more dynamic.

thanks in advance.

sample code is very much apprediated!

Random Y Coordinate
Does anyone know how to make a movie clip begin to play at a given x coordinate, but a random y coordinate? Thanks in advance.

Help Locating X N Y Coordinate
i have a flash movie that search the body of the person. i already tried locating the x and y axis thrue entering the exact x and y coordinate.

what i want to do now is create a text box that locate the ear, nose and etc.. what i understand is i have to instantiate the nose= x,y , ear=x,y and etc.. the provlem is i dont know how to star it. and i watn more dynamic.

thanks in advance.

sample code is very much apprediated!

Coordinate System
is it possible to move coordinate system center point and to rotate whole coordinate system?

I would need something like:

newCoordinateSystem(100,100,60)

it would be new coordinate system with center 100, 100, rotated for 60 degrees? I am trying to illustrate what I mean.
Thanks.

Stopping Mc At Certain Coordinate
I've got a Flash movie that has a movie clip that scrolls from right to left. The clip contains 6 sample full page magazine covers and each one is a movie clip that contains a button.

When you rollover a particular ad a screen that contains info rolls down and it's the width of two of the ads. When you rollout the screen rolls back up.

What I'm TRYING to do is have the scrolling movie clip stop when the ad you've rolled over reaches the far left so what you'll end up with is the ad on the left and the screen to the right. THEN when you rollout the movie will continue scrolling and the screen will roll up.

I've tried different methods of setProperty but can't seem to get the 'x' coordinates right. Nothing happens.

Example:

setProperty
var guardianx = ("_root.adsmc.guardianbutton",xPos);

if (guardianx > 0) {
_root.adsmc.play();

} else if (guardianx = 0) {
_root,adsmc.stop();
}

If it would help you can download the fla at http://www.baymed.com/parexcellence/flash/pe_contentsads3.fla

This is driving me nuts and would appreciate some help. It seems like it should be a simple thing to do.

LoadMovie With Coordinate
hi, i want to load a movie in another .swf exactly where i want to, without the same size. The first is 550 x 400 pixels, and the 2 will be 130 x 40 pixels.

Something like this one: (but this is not working)

on (release) {
_root.my_movie.loadMovie("contact.swf",w = 130,h = 40,x = 329,y = 430);
}



PLS reply

Mouse Coordinate Display
Hey guys, do you know what code I would use to get a box to constantly display the coordinates of the mouse. I wanted it to constantly update as the mouse moved. Thanks so much guys
Im new to this actionscripting thing
Thanks
Don

LocalToGlobal( ) Help - Coordinate Problems
Can anyone help me? I have a mc within a mc and I want to get it's position in relation to the _root. I try this on the mc within the mc:


Code:
onClipEvent(enterFrame){
xx = this.localToGlobal(this._x);
trace(xx);
}


The problem is - I read that localToGlobal() does not actually return anything. I want to trace or print out the mc within an mc's coordinates in relation to the _root. Any ideas?

HitTest X Y Coordinate Question
Hey All,
I am not sure if this is possible.

I am trying to create a hit zone usually I will do this through an invible movie clip however I am trying a different approach. Is it possible to use x y coordinates or another method to zone out an area for hitTest other than hitting the mc.

Any thought would be appreciated- thanks

fleep

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