Initial Position Of Movieclip
I've got a question that I think is pretty basic, but I just can't figure it out despite searching lots of forums.
I've got a movieclip on the stage and I'd like to set its initial X and Y position to some variables before I start moving it around. I don't want to hardcode its initial position. In as2, I'd do something like
Code: onClipEvent(load){ this.initX = this._x; this.initY = this._y; } Obviously this doesn't work. Instead I could put the following code in when I go to move the object:
Code: if(this.initX == undefined){ this.initX = this._x; this.initY = this._y; } but this seems like such a hack (maybe the old AS2 way was too!). Anyway, I'm hoping someone can enlighten me on the "right" was to go about this.
thanks.
ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 12-03-2008, 03:53 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Is It Possible To Set Initial Mouse Position?
I have a flash that responds to my mouse's position/movement. However, I also need the mouse to be at the center of the movie when it starts. Is it possible to set the initial mouse position in the flash movie?
Storing Initial Position Of MC
Okay maybe its because I've been working on this all day and can't think straight any longer but this seems like it should be really obvious and I'm getting frustrated that I can't think of how to do it.
I have a movie clip sitting just off stage. When the file is first launched I want to record the x position of this movie clip in a variables, say startX. When a button is pressed (and there are several of these) I am using Voetsoejba's easing code (brilliant) twice, once to move an MC just in the x direction (easeX):
(on the main timeline, whre movetxt and content are the two MCs)
ActionScript Code:
//record initial positionsmenux = movetxt._x;menuy = movetxt._y;_global.startX = getProperty(_root.content, _x);_global.startY = getProperty(_root.content, _y);MovieClip.prototype.easeX = function(to) { this.onEnterFrame = function() { this._x = to-(to-this._x)/1.3; if (this._x>to-1 && this._x<to+1) { delete this.onEnterFrame; } };};
and another to move another mc in both x and y directions (ease):
ActionScript Code:
//also on main timelineMovieClip.prototype.ease = function(x, y) { this.onEnterFrame = function() { this._x = x-(x-this._x)/1.3; this._y = y-(y-this._y)/1.3; if (this._x>x-1 && this._x<x+1 && this._y>y-1 && this._y<y+1) { delete this.onEnterFrame; this._x = x; this._y = y; } };};
on the button
ActionScript Code:
on (release) { //bunch of other stuff _root.content.easeX(135.6); _root.content.gotoAndPlay(2); _root.content.holder.loadMovie("calendar.swf"); movetxt.ease(menux, menuy);}
There is also, on the content box that eases in, a close button with this script to ease it back off the stage:
ActionScript Code:
on(release){ _root.content.easeX(_global.startX); _root.movetxt._visible = false; _root.movetxt._x = menux; _root.movetxt._y = menuy;}
So here is what is happenning: first time you hit the button to load it works like a charm but when you hit the close button it eases mostly, but not all the way, off the screen. Hit a button again to bring back the content mc and it disappears completely. Hit it a third time and the content mc just appears in place where it should, it doesn't ease.
So what is going on? What am I doing wrong? Is all this blather too complicated to sort out without an fla?
thanks for any help!
Storing Initial Position Of MC
Okay maybe its because I've been working on this all day and can't think straight any longer but this seems like it should be really obvious and I'm getting frustrated that I can't think of how to do it.
I have a movie clip sitting just off stage. When the file is first launched I want to record the x position of this movie clip in a variables, say startX. When a button is pressed (and there are several of these) I am using Voetsoejba's easing code (brilliant) twice, once to move an MC just in the x direction (easeX):
(on the main timeline, whre movetxt and content are the two MCs)
ActionScript Code:
//record initial positionsmenux = movetxt._x;menuy = movetxt._y;_global.startX = getProperty(_root.content, _x);_global.startY = getProperty(_root.content, _y);MovieClip.prototype.easeX = function(to) { this.onEnterFrame = function() { this._x = to-(to-this._x)/1.3; if (this._x>to-1 && this._x<to+1) { delete this.onEnterFrame; } };};
and another to move another mc in both x and y directions (ease):
ActionScript Code:
//also on main timelineMovieClip.prototype.ease = function(x, y) { this.onEnterFrame = function() { this._x = x-(x-this._x)/1.3; this._y = y-(y-this._y)/1.3; if (this._x>x-1 && this._x<x+1 && this._y>y-1 && this._y<y+1) { delete this.onEnterFrame; this._x = x; this._y = y; } };};
on the button
ActionScript Code:
on (release) { //bunch of other stuff _root.content.easeX(135.6); _root.content.gotoAndPlay(2); _root.content.holder.loadMovie("calendar.swf"); movetxt.ease(menux, menuy);}
There is also, on the content box that eases in, a close button with this script to ease it back off the stage:
ActionScript Code:
on(release){ _root.content.easeX(_global.startX); _root.movetxt._visible = false; _root.movetxt._x = menux; _root.movetxt._y = menuy;}
So here is what is happenning: first time you hit the button to load it works like a charm but when you hit the close button it eases mostly, but not all the way, off the screen. Hit a button again to bring back the content mc and it disappears completely. Hit it a third time and the content mc just appears in place where it should, it doesn't ease.
So what is going on? What am I doing wrong? Is all this blather too complicated to sort out without an fla?
thanks for any help!
Set Initial Mouse Position
i guess it must be possible with actionscript to set the initial position of the mouse when loading a new page...for example to the far left of the screen....but how???sorry to ask such noob questions all the time :roll:
Changing Orbiting Movieclips Initial Position.
So I need to have multiple objects rotating around a point in an elliptical orbit. I've got the code to do this just fine, but naturally I want them to start at different points along that orbit.
onClipEvent(load)
{
cx = Stage.width/2;
cy = Stage.height/2;
rad = 84; // radius of circle
speed = 30;
speedScale = (0.001*2*Math.PI)/speed;
}
onClipEvent(enterFrame)
{
var angle = getTimer()*-(speedScale);
this._x = cx - 1.5*(Math.sin(angle)*rad);
this._y = cy - Math.cos(angle)*rad;
}
That's the code I've got so far, attached to the objects in orbit.
Setting Initial Position After Loading Pngs Into Mc's
It's the last few lines of actionscript I'm having issues with. The movies stay were they are initially loaded and are not moved to x:20, y:20 using the array. Can anyone assist?
ActionScript Code:
_root.Total_Parts = 4;
var mcl:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
mcl.addListener(listener);
listener.onLoadInit = function(mc:MovieClip) {
mc.origSize = {w:mc._width, h:mc._height};
mc._x = Toolbox._x+((Toolbox._width/2)-(mc.scaledSize.w/2));
mc._y = Toolbox._y+((Toolbox._height/2)-(mc.scaledSize.h/2));
mc.centered = {horiz:mc._x, vert:mc._y};
};
var Part:Array = new Array();
for (var i:Number = 1; i<=_root.Total_Parts; i++) {
var Part_clip:MovieClip = createEmptyMovieClip("PNG_Loaded_"+i, i);
mcl.loadClip("PNG/Part_"+i+".png", Part_clip);
Part[i] = Part_clip;
Part[i]._x = 20;
Part[i]._y = 20;
}
Part[1]._x = Part[1].centered.horiz;
Part[1]._y = Part[1].centered.vert;
My Buttons Doesn't Come Back On Initial Position
hello,
i've a little problem with my buttons wich are movieclips
if you rol over and out to fast they stay "on" (they do not come back to initial position)
i've used actions: rolover >goto and play frame 2
there is a stop on frame 1 and 5
rolout > goto and play frame 6 (so it plays to frame 9 and come back and stop on frame 1 :initial position)
u can see them on my site : http://www.ontheground.be
thanks
My Buttons Doesn't Come Back On Initial Position
hello,
i've a little problem with my buttons wich are movieclips
if you rol over and out to fast they stay "on" (they do not come back to initial position)
i've used actions: rolover >goto and play frame 2
there is a stop on frame 1 and 5
rolout > goto and play frame 6 (so it plays to frame 9 and come back and stop on frame 1 :initial position)
u can see them on my site : http://www.ontheground.be
thanks
_xmouse - Difference In Current And Initial Mouse Position
Hi guys,
This problem is now driving me completely mad now and I just can't seem to solve this...
I'm trying to make a thumbnail slider that will move a movieclip to the right when you move the mouse left, and move the movieclip left when you move the mouse right. I DON'T want any inertia effects or anything like that; the clip just needs to move the same number of pixels that you have moved the mouse.
To get this to work I need to know the DIFFERENCE between where the mouse was to where it is now. To get the currentX mouse position I am simply using -
Code:
currentX = _xmouse;
The main trouble is calculating the initialX value of the mouse, which needs to be its X position that it was just before it became its _xmouse position. I don't know how to calculate this?
I have done this using setInterval to calculate the currentX value at a different rate to the initialX value but it gives choppy results..... any help out there?
How To Call A Movieclip In Function And Pause Initial Mc?
Hi,
How to call a movieclip in function and pause initial mc?
example :
for(var i = 0 ; i < demande[ranQuestion][5].length ; i++){
nextResponse();
duplicateMovieClip("box.answer","answer"+i,i)
box["answer"+i].y_fin = answer0._y + (20*i)
box["answer"+i].txt = demande[ranQuestion][5][ranAns]
if(ranAns == demande[ranQuestion][4]){
box["answer"+i].thisChoice = true
} else {
box["answer"+i].thisChoice = false
}
}
box.answer._visible = 0
}
I would like to call a movie named "wrong" and pause the initial mc named "box" mc. When you strike "space bar" key or hit a button named "space" during playing "wrong" mc the "box" mc continue .
Thanks for response .
Movieclip Buttons Returning To Initial State?
hi
I have a menu of movieclip buttons...that load up external swfs
I have everything fine.... except ....
how do I get them to return to their original state - If I click on another button?
I am testing it with the first 2 buttons....please keep in mind all buttons will be working.
Here is my code on the buttons
Code:
on (rollOver) {
if (_level0.current_selection == "games") {
stop();
} else {
this.gotoAndPlay('over');
}
}
on (rollOut) {
if (_level0.current_selection == "games") {
stop();
} else {
this.gotoAndPlay('wait');
}
}
on (release) {
if (_level0.current_selection == "games") {
stop();
} else {
_level0.containerMC.loadMovie("games.swf");
_level0.preloader.gotoAndStop(2);
_level0.current_selection = "games";
}
}
Also plaese see attached
Thanks alot
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
Movieclip's Position Controls Playhead In 2nd Movieclip...
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
Movieclip's Position Controls Playhead In 2nd Movieclip...
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
Is It Possible To Get The Absolute Position Of A Movieclip Within Another Movieclip?
Just as the title states...
I have a movieclip, which contains three other movie clips. I would like to get the absolute position of the child movieclips (relative to the stage) but when I get their _x and _y values, Flash obviously returns their positions relative to their parent movieclip.
So is it possible to get the position, relative to the stage, of a movieclip within another movieclip?
I had them all set up as independent movie clips, but the process of correctly modifying _rotation of the entire goup becomes overly complicated (if not impossible) when they don't all have the same center points.
Note: I can't simply add the position of the parent to the position of the child because the child position values do not change when the whole movieclip is rotated.
Tracking Position Of A Movieclip In Another Movieclip
I have attached a test movie. Basically, I have four movie clips ("c1" "c2" "c3" "c4") in a main movie clip ("groupcirc") "groupcirc" is being rotated. I have a text movie clip ("text1") external to this and I want it to follow the location of "c1". I have another movieclip with this code on:
onClipEvent(enterFrame){
trace(_root.groupcirc.c1._x);
}
In order to get the _x of "c1" for "text1" to follow. But it just registers 0. Is it possible to get the _x of "c1" from a movie clip external to it?
Any help would be very much appreciated,
Craig
_x Position Of A Movieclip
Hi there,
Why cant i position a simple movieclip when i click a button?
I feel like a total dork
The script of the button:
on (press) {
setProperty (_root.eventsout, _x, 77);
}
"eventsout" is a movieclip, placed in the 1 and only frame that is my flashfile, the button which contains the script to move the movieclip is placed in the same frame!
can anyone please help me out??
How To Position Movieclip
I have a movieclip that contains a logo. What I want the clip to do is shake a little, but when I add the code it screws up it' position.
I want the clip to be at x = 20.9 && y = 6.7. Then I want to shake up and down, left and right a couple of pixels. What is the AS?
[CS3] Getting Position Of A Movieclip
How do I get flash to find the position of a movieclip when I click on it? I want to click on a movieclip, add a child of another movieclip on top of that other movieclip (at the same x/y location) and then remove the child movieclip after it's done playing. I've searched forever on how to find the coordinates, and I thought maybe the get.(movieclip instancename).x would find it, but I can't figure it out.
Help!
X And Y Position Of Movieclip
I have a stage which is 500(w)x300(h)
I then change the stage so that, on a web page its set to 1000(w)x600(h).
I applied:
ActionScript Code:
stage.scaleMode = StageScaleMode.NO_SCALE;
and the following logic to stretch my background to fit the new stage size:
ActionScript Code:
newLayoutWidth = newStageWidth * startingLayoutWidth/startingStageWidth
I have a bar at the top of the screen which needs to be at the top of the screen when the size is doubled, but since scalemode is off (as I need it), it sits in the same position. How can I push it up to the top (ie. figure out the new (relative) y position?)
Get Position Of Movieclip
Hi,
I'm pretty new to AS3, and I need to get the position of a movieclip, specifically it's X position.
How can I get this and assign the resulting number to a variable?
Thanks for you time,
Connor
Movieclip Position
I am trying to use actionscript to draw lines from where a movieclip was to where it is going to be in the next frame of the animation. I don't know what commands, to use to find the position of the movieclip in the next frame, for the line to be drawn to.
Position Of A Movieclip
how can i get the position of a movieclip that inside another movieclip and compare that to the stage?
Position Of External .swf In Movieclip
I am using the set property actions to position an external .swf into the movie clip of another movie.
I have used the following:
on (release) {
loadMovieNum (popup.swf, dropdown);
setProperty ("dropdown", _x, "484");
setProperty ("dropdown", _y, "284");
stop ();
}
What this does is load the popup.swf but gets rid of everything else on the page??
Any ideas??
Thanks in advance
Move Position Of A Movieclip
I have a movieclip at main timeline named mc and I put some code at 1st frame like this
loadMovie("small_test1.jpg","mc");
mc._x = 20;
mc._width = 25;
but it not working correctly.
I want to load some picture in target movieclip then resize and move it to new position. can someone tell me how I do.
Thanks.
Storing Movieclip Position
Hi Guys
I'm trying to create a movie, using shared objects, that stores the position of a dragable movie clip but I'm not having much luck.
I need it so that the user drags then drops and the new position is retained when they revisit the site.
I'd be grateful for anyhelp anyone can give me.
Cheers
Phil
Global Position Of Movieclip
Hi, I'm using Flash MX.
I have a movie clip within another movie clip
let's say ' _root.BaseClip.ProblemClip '
My problem is i want to get the global _x and _y of 'ProblemClip' but i cant seem to figure out how.
I'm prety sure it has to do with the 'LocaltoGlobal()' thing, but i dont know how to use it. It's hard to understand and looks complicated in the example from the FlashMX documentation.
Help would help
Thanks!
Absoulte Movieclip Position
Does anyone know an easy way of getting the position of a movieclip in "stage choordinates".
The reason I need to do this is that i have a drag and drop feature where I would like the draggable objects to center on the targets when dropped on them.
The draggable objects and the targets may exist in different timelines, so I need to calculate their absolute screen positions (as opposed to their _x and _y properties that are relative to their respecitive timelines).
Thanks,
Makac
Controlling Movieclip Position
Hi,
I'm looking to create a navigation system that operates by 'scrolling' a movieclip.
For example, if I have a movieclip that is three times the width of my workspace and is broken into three section (pages 1, 2, and 3). On the click of a button I want the movieclip to be positioned with, say page 3 centred. And, if another button were clicked, page 1 to be centred - scrolling straight past page 2 as necessary.
This site achieves what I'm looking to do, but on a vertical plane: http://www.loungecom.com/
If someone could just give me a shove in the right direction I'd appreciate it.
Cheers
Setting Position Of MovieClip _x
Hi all,
I have a movieclip called shadowing.
The movie clips movement is determined by some code:
Code:
onClipEvent (enterFrame) {
//Set level of movieclip
_root.depth = 150;
_root.depth++;
this.swapDepths(_root.depth);
//Set the speed of _MC
var speed = 2;
var viscosity = 1.5;
//._x position
difference = _root._xmouse -45 - this._x;
xvelocity = (xvelocity+(difference)/speed)/viscosity;
this._x += xvelocity;
}
However the Movieclip is visible across the ._x position across the whole movie.
The problem is that I only want the movieclip to be able to be seen m from a ._x position of 95 and onwards, not the whole movie.
I've tried a few IF statements but nothing seems to be getting it to work.
Any ideas?
Geting X,y Position Of A Movieclip
hi,
1st i'll introduce myself, my name is sajith, a graphic designer in Newdelhi, India.
i have a small problem in flash actionsripting,
i have to identify the 'X,Y position' of a movieclip (movieclip is movable with the help of keyboard ) i have done the moving part. rest is to identify the position, x & y of the movieclip
if u can help me thro' script that would be great, if u r not aware of script, pl. guide me where to get r whom.
SAJI
Checking The Position Of A Movieclip?
Hey Guys,
I have a pretty simple question.
I have a scrolling content in a MovieClip with an instance name of "box". When my scrolling content "box" reaches a particular position, lets say _x postion = 350, I want an action to happen.
Example:
if(box._x == 350){
_root.gotoAndStop(41);
}else{
_root.gotoAndStop(40);
}
--------------------------------------------------------
I tried GetProperty but it didn’t work for me... besides I thought it would work as is above. It doesn’t.
Any help would be appreciated.
Thanks,
MovieClip Align Position
Hi,
I have a simple problem .
Where can I set the absolute position from my “stage”?
What I mean is:
I take a movie clip on the stage, and with the “align panel”, I set the position of this clip to the left – top corner. Sometimes the movie clip is now displayed in the middle of the stage, and sometimes the movie clip is displayed on the left/ top corner ! How can I fix the absolute zero position (x/y) of the stage?
Thanks
David
How Do I Get My Movieclip To Move To A New Position?
I've got a series of buttons, each of which (onRelease) need to tell a movieclip to move to a new xy position. I can get the movieclip to jump to its new position, but is there a way of getting it to make a smooth transition to its new position over 2/3 seconds?
I'm not very advanced so go easy! Thanks.
(using FlashMX)
Setting Movieclip Position
Actionscript is not my friend >.<
I'm working on a small flash animation and I'm having trouble figuring out how to get the effect I want. Basically I have three movie clips set out on my timeline (all on the same layer):
Character_stands >> Character_walks >> Character_sits
The idea is to have the character wander back and forth across the screen, then stop and sit back down. But the actionscript I'm using to move the second MC across the stage stops randomly. So what I want to do is tell flash to move the 3rd MC to the _x where the 2nd MC stops
After trying many many things over the last couple of days I'm stumped :/ Anyone have any ideas/suggestions?
Movieclip Jumps Position
I have several problems with the attached movie.
I'm trying to get the user to return to the "choose scene" after they successfully complete the jigsaw.
I have a movieclip which changes after all pieces have been successfully placed to reveal a button saying "next". It is this button that I'm having problems with. The script I have attached is:
on (release) {
gotoAndPlay("choose",1);
}
but this does not seem to work to target the "choose" scene.
I'm hoping to get round this by using the Load Movie command instead and copying all the jigsaws into separate movies. However if I've done something stupid with my script, please let me know.
However I also have a more worrying problem...
If you go to the "hard" jigsaw and drag a few of the movieclips into the wrong position and let go, sometimes the movieclip with the instance name 2-2 jumps to another position even though I am not dragging it. I can't see anything wrong with the coding.
Any ideas?
Thanks.
Saving Movieclip Position Using Php?
Hi there,
I have a movie where you can drag and drop various movieclips around the screen. When the page is reloaded i want the movie to remember where the clips were on the screen. I assume this would use loadvars and an external php file, but i don't know how to do it.
Any thoughts?
I only know a little php so be gentle with me.
bob
www.bobcooper.org.uk
info@bobcooper.org.uk
[F8] Changing The Position Of My Movieclip HELP
Hi guys,
This is very basic and for some reason it's not working. I am doing a very basic zoom in/out map thing and I have a button where i just want to reset the map to it's original position. So on the reset button I have:
on (release) {
lowestScale = 100;// lowest desired scale of map2 in %
highestScale = 300;// highest desired scale of map2 in %
_root.position=_root.map2._x=456.3, _root.map2._y=109.8;
function reset() {
// calculates scale and sets it
_root.scale = _root.map2._xscale=_root.map2._yscale=lowestScale;
_root.slider.scrollMin = _root.range._y-_root.range._height;// minimum _y value possiible for scrollbar
_root.slider.scrollMax = _root.range._y;// maximum _y value possiible for scrollbar
_root.slider._y = _root.slider.scrollMin+(_root.slider.scrollMax-_root.slider.scrollMin)/1;// sets starting position of scrollbar (currently half-way)
scaleFactor = Math.pow(highestScale/lowestScale, 1/(_root.slider.scrollMax-_root.slider.scrollMin));// variable for SetScale
}
reset();
}
For testing I did the following but it's still didn't work:
on (release) {
_root.map2._x=456.3
_root.map2._y=109.8;
}
Any ideas as to what I am doing wrong, this is so basic it's embarrassing.
Cheers
Duplicating Movieclip Into A Certain Position
Hey folks
Am working on a little flash game and have got stuck with a piece of code. When "clix" is in collision with "bomb" I need an instance of "explosion" to be created where clix was when the collision took place. I'm currently attempting to just make it duplicate and move to a set position but I can't even grasp that...
n= random(10000)
if (_global.timemanzeelives == true) {
if ( this, hitTest(_root.bomb)) {
duplicateMovieClip(explosion, "explosion"+n, 0)
newmovieclip="explosion"+n
newmovieclip._x = 300;
newmovieclip._y = 300;
}
}
I know that the hit test is working as if I put it to delete the mc "this" it deletes it successfully.
If anyone could give me a hand it would be very much appriciated!
Note that there are a significant number of "clix" and there there needs to be more than one "explosion" on screen at a time
-Jordan
_x Position In Nested MovieClip
Hello all. So I have a scrolling movieClip. Inside that movieClip I have 3 instances off the a movieClip to make a continuous loop. In the instances I have "cards" that when the user clicks a card, I want it to scale up to center stage from it's current position in the scrolling movieClip. And when the user closes that "card", I want it to return to it's new position, as the movieClip will continue to scroll as the user is looking at the larger card. Does anyone have a solution handy? I'm tracing the _x position but it stays constant at lets say "10.9". It's not updating. When I trace the _x for my "cardScroll_mc" it gives me updated _x positions. But I need to get the positions for "cardScroll_mc.cards1_mc.card1_mc"; "cardScroll_mc.cards2_mc.card1_mc"; "cardScroll_mc.cards3_mc.card1_mc"; etc.
Setting Movieclip Position
I have a movieclip controlled by a button.... So far everything has gone to plan...
My problem is this... Currently all the Movieclip instances are on the same layer and when the movie is run I find the inactive instances are above the movieclip I wish to be top... Is there a way to set the movieclip to be top when my action is run.
If any more info is need please don't hesitate to ask
Any help would be appreciated.
Regards
Tim
MovieClip Position According Stage
i have a MovieClip and i want to adjust the position on movieClip According to stage size.means i resize the stage than it will adjust position according stage size.either i run this swf in browser it should be same
plz help me.
thanks
Define MovieClip Position With XML
I am building a news scrolling (actually personal quotes from people) with an adjoining map. I have also created a small clip that looks like a spot with concentric circles radiating out from the center. As a new quote appears, I want to place the spot on the map corresponding to that person's location... until the next quote appears, and the spot moves to the next location. How do I write the XML and AS to move my clip as the quote changes... an X,Y attribute or something?
Controlling Movieclip Position
Hey, I'm building a gallery for my new site and scroll the thumbnails inside a movieclip controlled by up/down buttons. I've got the scrolligg to work fine but now I need it to stop when it reaches a certain point.
Here's an example of what I'm working on. As you'll see, if you keep hovering on the up or down buttons the thumbnails keep moving and disappear.
I'm using the following code:
Code:
gallery_up_btn.onRollOver = function() {
gallery.onEnterFrame = function() {
this._y -= 4;
};
};
gallery_up_btn.onRollOut = function() {
delete gallery.onEnterFrame;
};
gallery_down_btn.onRollOver = function() {
gallery.onEnterFrame = function() {
this._y += 4;
};
};
gallery_down_btn.onRollOut = function() {
delete gallery.onEnterFrame;
};
Any ideas?
Al
Flash :: Position MovieClip
Hi,
I am currently implementing a Dating site at college, and need to create an Identikit for the site.
The url to the Identikit is:
http://snet.wit.ie/~ezmatch/identiki...php?user=paddy
In my movie, users choose their features, and the size, and position of the features. The code that records the position of the features is:
on (press) {
startDrag("");
}
on (release) {
stopDrag();
_root.hairx_pos = _root._xmouse;
_root.hairy_pos = _root._ymouse;
}
The names, the size of each feature, and the mouse position of the features are sent to a php file, and the database.
I then have a new movie placed in the php file that opens up with the features placed off the stage. When a button is pressed, the following code executes:
on (release) {
if (feature1 == "hair1") {
setProperty("_root.hair1", _x, x_pos);
setProperty("_root.hair1", _y, y_pos);
}
....and so on...
and the features move into the mouse position set in the first movie and are resized to the dimensions set in the first movie.
What i want to do!
I want to make the features move into the exact position they were in in the first movie.
Is there actionscript i can use to record the movieclip's position (not the mouse position) in the first movie, and call it in the second? Do i have to make the movies the exact same size?
Thank You,
Pat.
Moving MovieClip Position(setproperty)?
I need to move a movie clips position using the setproperty action. I have the addressing done but don't know what numbers to put in the action.
Example:
on (release) {
_root.mc1.mcblue.setProperty ("", _y, "");
}
Mcblue is the movie clip that I want to move, but I dont know what numbers need to go in the "" marks. I want the button to make the clip move down.
Also I need to use set property to rezize a movie clip larger and smaller. Would I use y and x scale or width and height? and how would these be set?
|