Positioning?
Is there a way to position Mcs on the stage in one go without having to set the x & y manually for each one?
gabs
FlashKit > Flash Help > Flash ActionScript
Posted on: 04-03-2006, 10:03 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Positioning Exe's
Is there any way to control the positioning of the .exe's that are being opened?
I have a project that requires 3 different exe's that opens one up after the previous one is finished and the previous one closes. But I want them to be in the same location on the desktop. Right now they cascade down.
any suggestions?
thanx
Bean
Positioning New .swf
People,
I am trying to load a .swf with dimensions of 320 x 240 into the base .swf of 770 x 500, I want to position the targeted swf inside the base and have control over the x and y co-ordinates. Please note these are not movie clips.
And to top it all off I cannot control the size of 320 x 240 It will not import and It is not a native FLASH file.
I am using v5. So....
Is it possible?
If so how do I do this?
Thankyou for any help....I'm desperate
Positioning SWF - X - Y
Hey Guys,
I was wondering what the best way was to position a swf??
I have a main SWF and wanting to load another on top.
example:
on (release) {
loadMovieNum ("example.swf", 1);
}
this loads the swf onto level 1 but is allways positioned
in the top left hand corner when i want it positioned in the center lets say.
Any help would be great.
Thanks
-Mdesign
Positioning An Swf
Hey everyone. I know this has been covered but I cannot find any of the old posts and I am having a brainfart.
I need to load an swf into an MC and position it. I need a frame to call the swf not an object or button. what's the script again? Here is the pseudo code.
//load movie test.swf into the MC called testMC and make sure it;s positioned at _x == 300 ans _y == 3.0
Thanks in advance to anyone who answers.
PS: I may also need to target specific frames in the loaded swf which I also forget how to do. Thanks again to anyone who answers.
X/y Positioning
i have two different actions on buttons calling different movies and am wonderting about positioning x and y....
button 1
on (release) {
_parent._parent.targetClip._x = 112;
_parent._parent.targetClip._y = 110;
_parent.targetClip.loadMovie("test1.swf");
}
button 2
on (release) {
_parent._parent.targetClip._x = 200;
_parent._parent.targetClip._y = 375;
_parent.targetClip.loadMovie("test2.swf");
}
the only way i can get it to work is if i change the instance name to something different (targetClip1) -- is that the only way it can be done? If the instance name is not changed it just loads it in the same x/y position as button1.
Positioning Of Swf In Mc
I have a mc on the root and I am trying to bring in an external swf.
It is bringing the file in but it is positioned to the right and below - how do I get it into the same position as the orginal clip?
Thanks!
My code is below.
on (release) {
tellTarget ("_root.headerModule_mc") {
gotoAndPlay("openSubMenu");
_root.pBOpener_mc.loadMovie("testload.swf");
}
}
Positioning?
Hi
I have been trying to learn by downloading movies and taking them apart. I wanted to learn how to click a button and have a photo slide in from one side and center where I want on the page. My understanding of positioning is useless so I was thinking that maybe somebody knows of a tutorial that explains positioning and how to use it to put things where you want them. I know how basic this is, but I don't understand it and any help would be wonderful.
Thanks
Positioning
I am trying to position the button, the dynamic text boxes, and the drop menu the same on both of my movie clips on different frames. I can't seem to get the positioning working even by typing in the cordinates. Can anyone help?
Pls Help ,swf Positioning
hi,
i am loading a swf file externally ,it is working properly.but what the problem is i want them to load at a particular point.so how do i specify X & Y co-ordinates dyanmically whenever swf file is called.pls help me
As Positioning
is there a way to move a movieclip's position via actionscripting....ie..on(press)///move clip1 to a defined area??
thanks in advance
X And Y Positioning: HELP
Can someone please tell me what I am doing wrong. I have made a mini game (in it's early stages) in which you move a guy around and when he touches the walls he goes back to the red dot in the center (where he starts) Here is the problem. I program to the guy (who is a movie clip):
onClipEvent(load){
moveSpeed=10;
function reset(){
this._x=261;
this._y=173;
moveSpeed=10;
}
}
onClipEvent(enterFrame){
//all the key press stuff
if (this._x>550){
reset();
}
if (this._x<-550){
reset();
}
if (this._y>400){
reset();
}
if (this._y<-400){
reset();
}
}
Now look at the collision bit (the end bit where the If conditions are). That should work right? But when I travel in the negative axis directions, my guy just keeps moving off the screen and then after 7 secs approx it reappears in the center. How come? How can I get rid of the seven sec waiting time. I lowered both negative axis to 15 and it works! Coincedentaly, when I turn on the grid, the width and the height are both 18, near 15. Can someone please help me!
Edit:
Can someone also tell me how to make dynamic text be displayed when the guy resets? (So for example, the guy runs into the side and a message at the top of the screen displays "You bumped into the side so you were reset!"
[F8] MC Positioning
hey everyone.... I need a hand here...
i've already searched for hours on the net and found nothing.....
well the thing is ....
i have on the library a few movieclips and i need that the moment i open the swf those movieclips position themselves in specific positions, each one in a specific depth as well.
the only way i found to do that was moving the movieclips (i mean, making them enter the scene), but that's no good for me, i need them to be there when i open the file.
that's what i got till now and it's not working...
Code:
var i=10
this.createEmptyMovieClip(floors_mc, i);
function buildStage() {
_root.floors_mc.attachMovie("f001", "f001_mc", i);
_root.floors_mc.f001_mc.onEnterFrame = function(){
this._x = 0;
this._y = 0;
};
_root.floors_mc.attachMovie("f002", "f002_mc", i+10);
_root.floors_mc.f002_mc.onEnterFrame = function(){
this._x = 0;
this._y = 20;
};
_root.floors_mc.attachMovie("f003", "f003_mc", i+20);
_root.floors_mc.f003_mc.onEnterFrame = function(){
this._x = 0;
this._y = 40;
};
};
the movieclips in the library are f001, f002 and f003.....
does anyone know how to solve this??
i thank in advance any intention to help...
Positioning A SWF Using AS3
Hello,
I am trying to bring in a swf file to the stage using ActionScript 3 but am having problems with positioning the file. As it stands the swf plays in the top left corner of the stage, but what if I wanted to change the X & Y position of it, how would I do that?
Here's my script,
stop();
var folioRequest:URLRequest = new URLRequest("scrollingPortfolio.swf");
var folioLoader:Loader = new Loader();
folioLoader.load(folioRequest);
addChild(folioLoader);
Any help would be great, thanks everyone
Positioning
I was wondering if anyone could tell me where to look. I am wanting to create a bar that(about 60 pixels high) that hugs the browser top or bottom and also takes 100% of the browser width. If the person browsing resizes the window the menu bar continues to hugs it programmed position.
Any ideas?
-meylo
MC Positioning
hey everyone.... I need a hand here...
i've already searched for hours on the net and found nothing.....
well the thing is ....
i have on the library a few movieclips and i need that the moment i open the swf those movieclips position themselves in specific positions, each one in a specific depth as well.
the only way i found to do that was moving the movieclips (i mean, making them enter the scene), but that's no good for me, i need them to be there when i open the file.
that's what i got till now and it's not working... 07/07/2006 14:49
var i=10
this.createEmptyMovieClip(floors_mc, i);
function buildStage() {
_root.floors_mc.attachMovie("f001", "f001_mc", i);
_root.floors_mc.f001_mc.onEnterFrame = function(){
this._x = 0;
this._y = 0;
};
_root.floors_mc.attachMovie("f002", "f002_mc", i+10);
_root.floors_mc.f002_mc.onEnterFrame = function(){
this._x = 0;
this._y = 20;
};
_root.floors_mc.attachMovie("f003", "f003_mc", i+20);
_root.floors_mc.f003_mc.onEnterFrame = function(){
this._x = 0;
this._y = 40;
};
};
the movieclips in the library are f001, f002 and f003.....
does anyone know how to solve this??
i thank in advance any intention to help...
Positioning
When an object is positioned, it takes it position based on a certain point on the object. Is there anyway to change that point? For example, if I put an object at 0,0 and the positioning point is the top left corner, can i change it to the top right corner(in this case putting it off the screen).
Y Positioning
I'm using this code within my LoadNav function to position my navigation items vertically - each is postioned based on the previous items _y pos...
onEnterFrame = function () {
for (i=0; i<=item.length; i++) {
this["but"+i]._y = (this["but"+(i-1)]._y+this["but"+(i-1)]._height)+5;
}
};
When a button is pressed an swf loads into that mc, hence the '_height' reference in the actionscript above. The first nav item is positioned at _y = 100, and the others at 120,140,160 etc...
Now whenever i click on a nav item i would like it to repositon at _y = 100, and the others reposition accordingly. e.g if nav10 is pressed it moves to _y = 120 and the others (1-9) repostion at -60,-40,-20,0,20,40,60,80,100
Can anyone think of a way to do this within the onEnterFrame statement above?
Thanks
Xy Positioning
This must be a simple fix, I cannot find it. !!
My objects according to the properties panel are stating negative xy positions, yet on the stage with the xy 00 at top left they should read positive.
Positioning A JPG
hello,
on level 0 :
a button executing : loadmovie("1.JPEG",1) ( loaded to level 1 )
I would like to give a position (x,y) to this picture.
how can I do this?
Thanks for your help
Positioning With AS
i'm trying to build a movie where there are a couple of long bars positioned on the stage on a vertically, like this:
////////////////////// bar 1
////////////////////// bar 2
////////////////////// bar 3
////////////////////// bar 4
////////////////////// bar 5
////////////////////// bar 6
let's say if the user click on any of the bars, say bar 3, how can i make it so that bar 4 will automatically replace it's position but going up 1 step using AS?
and bar 5 will replace bar 4 and so forth.
sorry for not listing out any AS because i don't even know where to start with. this list is killing me but there must be something in AS i didn't know, help need please!!!!
Positioning
Hi guys i need some help. i just finished a flash proyect the problemm is that i'm trying to positionate a movieclip in the far right down corner, the movie i made fills the entire window but i dont know the coordinates for the four corners, i know that 0,0 for x and y puts the movie clip on the up left corner, but what about the others?
thanks in advance guys
Positioning A JPG
hello,
on level 0 :
a button executing : loadmovie("1.JPEG",1) ( loaded to level 1 )
I would like to give a position (x,y) to this picture.
how can I do this?
Thanks for your help
_x, _y Positioning
hi there ..i need some help NOW
i'm trying to let a smartclip (button inside) to tekk a target (markerMC) to position itself ontop of the smartclip ..use the same _x and _y as the smartclip.
on (press) {
gotoAndStop (2);
setProperty ("/marker", _x, this);
setProperty ("/marker", _y, this);
LoadMovie Positioning
= PLEASE HELP = PLEASE HELP = PLEASE HELP = PLEASE HELP =
I am using LoadMovie to load a temporary movie on Level 1 (temporary meaning it will only last about 150 frames). The movie loads and unloads fine.
The Situation: I need the movie to load at a specific place in the main movie (approximately 20 pixels from the left and 35 pixels from the top).
The Problem: Using x Position 20, y position 35 in the LOADED movie- it moves the entire movie, parent and child.
I only need to position the LOADED movie.
= PLEASE HELP = PLEASE HELP = PLEASE HELP = PLEASE HELP =
Duplicating Then Positioning MCs
hi all,
I want to duplicate an MC, say 12 times, then position the clones in a list fashion, i.e. the first clone is 10px less _y than the original, the second clone is 10px less _y than the first.. and so on.
I know that arrays are needed, but i'm not too sure how to approach this in Flash.
Cheers for any and all input,
-Meph
Positioning Text
Ok, here is the deal. I'm using the text effect .fla files from flashkit to put in my site. Everything works but one thing. I can't figure out how to position my text. It trys to put it all on one line. What code will make it part of it on another line and positioned properly under the top line of text. Is there a way to do this? Thanks for your help guys.
Positioning A Movie?
I don't know if this was posted b4 but here goes...
I was wondering if it was possible to manipulate the position of a movie loaded by the LoadMovie action!!
Movie Positioning
Hi Folks
I'm a bit new to the whole ActionScript scene. At the moment I have two flash movies. The first is the main movie (800px*600px), and into this I want to load the second movie (100px*20px).
I have managed to successfully load the second movie in using a button in the main movie:
on (release) {
loadMovieNum ("smallmovie.swf", 1);
}
However, I want to position smallmovie.swf at an exact pixel position. I can't figure out how to do this. I presume I use the _x and _y properties?
Any help would be appreciated.
Cheers,
Kenny.
Comlex Positioning
I made a MC and positioned it like i wanted, but i would like to make some Advance things like use attachmovie because it would be smarter programing, the problem is, as i positioned this MC in another MC just the way i wanted it, when i make this MC with attach and put it on a stage iw wont be aligned like i want it to...so i can try and put some coordinates and after some 10,20 tries maybe i will make it like i wanted it to be, but the thing is that i would like to do following, to see the coordinates of that Mc when i first put it in the other Mc write it down and then use it when i use attach and then position it like it was before....how to do that??
Duplicate MC Positioning
Here's my problem.
onClipEvent (load) {
i = 0;
xpos = 0;
setProperty (_root.oi, _visible, 0);
}
onClipEvent (keyDown) {
i = i+1;
duplicateMovieClip (_root.oi, i, i+10);
xpos = xpos+20;
setProperty (i, _x, xpos);
}
All this code is placed on a movie clip with instance name control.
_root.control
I'm using the above action script to duplicate a movie clip whenever a key is pressed. I want each new movie clip to be positioned right next to (but not on top of) the previous clip. So if my movie clip is 20 pixels wide, I would need to move each succesive clip over 20 pixels. The problem that I'm having is that I can't get the duplicated movie clip to change to a new x position correctly. I think that it has something to do with not having the right path to the new movied clip. But I'm not totally sure.
Each new movie clip would have a the name of the number relative to i, which is incrimented each time a key is pressed. I guess what I want to know, is if there is a way to use the setProperty action with a variable as part of the path name. How would I specify a path to the new movie clip.
Hope that makes sense.
AttachMovie Positioning
Hi,
I have a for loop that attaches a variable number of instances(the same clip in the library) to the stage... I've used the same loop to space them evenly vertically.. My question is I'm trying space them evenly based on varying sizes in the clip...which I haven't been able to get to work... here's the code...
var comp=total;
for (var i = 1, j=50; i<=comp; i++){
attachMovie("drag1","dr"+i,i);
this["dr"+i]._y =j;
this["dr"+i].gotoAndStop(i); //---I'm going to sequential frames with
//---varying image sizes..
j=j+50;
}
I tried something with the height, but it was screwy, I'm thinking I have to find the position of the bottom of the previous clip???
Any help is much appreciated...
thanks,
-max
Positioning Problem
I have several objects in several layers(40) and would like to reposition them all (in the center). How can I select all these objects (throught the frames, so position tweening remains constant) and change their position.
My problem is a large portion of my movie is offcenter and I want to center those parts. I don't know how to move them to the to the dead center of the canvas, while keeping the position tweening consistent.
Flixx Positioning
Hey out there.
Problem is this. I make a .swf movie with Flixx. I then use "LoadMovie" level 1. The movie loads fine, but always in the upper-left hand side of the parent movie. I usually adjust the position within the .fla of the movie, but Flixx gives you no .fla. Is there a way I can center it using x and y coordinates when I call the movie in? This might be easy, but it has me stuck for some reason.
Thanks for your help!
Re-positioning A Loaded Swf
How can I re-position an SWF file that I load into another SWF. I am loading it like this:
loadMovie("MovieClip1.swf",500);
That loads the movie fine, but now I need to re-position this loaded clip, but I dont know how to reference it or even if I can.
I tried
_level500._x = #;
_level500._y = #;
but that didnt work.
I can't load the SWF into a holder mc, because it then messes up it's own coding because it assumes the timeline of the holder mc.
Any help?
thanks
.fe.
Positioning A Loaded Swf
Hello All. I know how to load an swf into an MC and position it but is there a way to load an swf into a level and assign it and x and y postion? I thank anyone in advance for a reply.
Positioning Mcs On A Stage
I want to set some movies on a stage, and I wanted to do it randomly; the only proble is that I want to avoid that those movies could intersecate each others. I should use a detection system, but I don't know how to do it, so if anyone knows where I can find some already done or give me any suggestion it'll be great.
TIA
Giano
Positioning Of Movie
I have a main movie and I have to load another short 20 second movie into it.
I have done load movie etc and it loads but the position of the inserted movie is not what i want ..
I tried reading the help files and i understood that I should use target .. ummmmmm but i'm new to this :'(
this is what i had with the level specified .. and it worked but in the wrong place .....
loadMovieNum("C:\Julie\FLASH\NOMusic\Reds Movie.swf", 5);
so i tried this .. (target ?? - I put the name of the file .. :S)
loadMovie("C:\CSI\FLASH\NOMusic\Reds Movie.swf", "Reds Movie");
setProperty("Reds Movie", _x, "650");
setProperty("Reds Movie", _y, "450");
ummm .. it did not think much of that at all
3 hours i've been trying to move this thing grrrrrrrr
Please can someone help me ??
thank youuuuuu
Julia
Positioning Swf When LoadMovieNum?
Does anyone knows if its possible to decide the position of a movie when you load it into another movie with the command loadMovieNum???
Positioning Swf When LoadMovieNum?
Does anyone knows if its possible to decide the position of a movie when you load it into another movie with the command loadMovieNum???
Positioning An Swf File In Mx
I've got the load movie command sorted out, but what is the specific language to position the mc on the stage? It defaults to upper left (x=0, y=0 ?) corner.
Positioning An Swf File In Mx
I've got the load movie command sorted out, but what is the specific language to position the mc on the stage? It defaults to upper left (x=0, y=0 ?) corner.
Random Positioning And--help
Ok i got a animated rain drop on the first frame of a layer, thats fine then i insertered a 2nd normal frame next to it, on another layer i have 1 keyframe with
duplicateMovieClip ("_root.drop", c, c);
setProperty (c, _x, random (400));
setProperty (c, _y, random (100)-100);
and a keyframe next to it with
c = c + 1;
gotoAndPlay(1);
Now everything goes fine, except when i go control > test movie its always to the right of the screen,why is this?
Absolute Positioning Of A Swf
I am trying to position an swf movie over the html/php pages.
It doesn't work in some IE version 6.0.xxx (on XP professional). It does work on other IE6 browsers.
This area is probably giving me problems:
<OBJECT ID="flash_obj" STYLE="z-index:1; position:absolute; left:123; top:18" classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
Here is an example of my code:
<SCRIPT LANGUAGE=JavaScript type="text/javascript">
<!--
var plugin = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
if (navigator.plugins && navigator.plugins["Shockwave Flash"])
plugin = 1;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
document.write('<SCRIPT LANGUAGE=VBScript>
');
document.write('on error resume next
');
document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFla sh.3")))
');
document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFla sh.4")))
');
document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFla sh.5")))
');
document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFla sh.6")))
');
document.write('</SCRIPT>
');
}
if ( plugin ) {
document.write('<OBJECT ID="flash_obj" STYLE="z-index:1; position:absolute; left:123; top:18" classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
document.write(' WIDTH="677" HEIGHT="439" id="attbi_showcase2" ALIGN="">');
document.write(' <PARAM NAME=movie VALUE="http://shop.pittsburghlive.com/banners/attbishowcase2/attbi_showcase2.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE=#FFFFFF>');
document.write('<EMBED src="http://shop.pittsburghlive.com/banners/attbishowcase2/attbi_showcase2.swf" quality=high bgcolor=#FFFFFF');
document.write(' WIDTH="677" HEIGHT="439"');
document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
document.write('</EMBED>');
document.write('</OBJECT>');
} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
document.write(' ');
}
//-->
</SCRIPT>
<NOEMBED> </NOEMBED>
<NOSCRIPT> </NOSCRIPT>
Positioning The Scroll Bar
Hello. For the past few weeks, I've been perusing around these board, the Macromedia tech notes, and the Flash help looking for this technique, but yet to no avail. I found on a Microsoft for an IE javascript method that allows you to detect the mouse wheel motion. I have a javascript written passing a scrolling value to a flash moive. However, what I want to do is to take this information and apply it to the flash scroll pane (component) I have on the stage. I have looked at the AS for the pane, and have found a few functions that look promising: the "setVScroll" and "setScrollPosition" as well as "setSmallScroll" functions. However I have absolutely no clue what any of these functions do. Basically the javascript returns a numerical value that is equivalent to the position of the scroll wheel on IE mice. Then I want it to move the scroll position accordingly; I just don't know which function to invoke.
Thanks in advance,
--Andrew
---Trmbne2000@hotmail.com
Positioning Problem
I am trying to change a "guestbook" i got. take a look at http://www15.brinkster.com/lsdezign/db/b.html to see it.
So now there are 2 problems, how can i make the oldest posts come to the front so i can read the post?
Second one:
I would like to make three rows of messages, now there is only 1 row and new posts are added with:
setProperty("box" add counter, _x, 10+Number((counter*50))-Xoffset);
so how do i manage that the first post is in the first row, second post in second row, third post in third row and then it starts all over again, the fourth post is in the first row.
do you know what i mean?
MX Duplicate Mc Positioning
on (release) {
for (i=1;i=5;i++){
ball="diff"+i
ball1="difff"+i
if([ball].hitTest(_root._xmouse,_root._ymouse),true){
dupCount++;
_root.correct.duplicateMovieClip("correct"+dupCoun t,dupCount);
_root["correct"+dupCount]._x = this.[ball]._x;
}
|