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




Moving A Movieclip In Constant Increments



Hello. I was wondering if there is a way to adapt this code I am using on a button.


Code:
on (press) {
bigscan1._y -= 4;
}
This code works fine on the button and moves the movieclip each time the button is pressed by the viewer. My problem is, I would like the viewer to be able to just hold the button down and the movieclip would constantly apply the _y -=4

Is it possible to adapt this script to make it constantly move while the viewer holds down the button? As it stands now, it only moves once when the viewer clicks the button. So in order to move the movieclip 8 pixels, the viewer would have to click the button twice. Thank you for any help you can give me on this!

Sincerely,
Greg



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 01-04-2007, 10:01 AM


View Complete Forum Thread with Replies

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

Moving A Movieclip Set Increments With Buttons
Hi all

I'm using Adobe Flash CS3 / ActionScript 2 to develop a site, the relevant part of which can be seen at http://www.pcmt.org/hidden/testsite/test.html

The black boxes underneath the 2x4 grid of icons are placeholder graphics for left and right arrows which move the icons above to the left and right.

The left and right buttons work, after a fashion, but I'm having difficulty controlling the motion.

As each button is pressed, I want to reveal one more layer of icons, and have the scrolling stop when the end of the list is reached. At the moment, one can use the buttons to scroll the icons off the screen.

Secondly, if the left / right buttons are clicked in very quick succession, the icons above do not display correctly - they're no longer centred in the mask above. Is it possible to have the buttons 'ignore' any clicks whilst the icons above are moving, thus ensuring that the icons always display correctly?

Finally, is it possible to have the left/right button disappear as appropriate when the left/right hand end of the menu is reached?

Here's the code I've been using to control the motion:

shirt_graphics._x=247;
shirt_graphics.onEnterFrame=function(){
cX=this._x;
difX=cX-XPos;
setProperty(this, _x, cX-(difX/2));
}
left_arrow.onRelease=function(){
XPos=cX+86;
}
right_arrow.onRelease=function(){
XPos=cX-86;
}

Any help would be greatly appreciated.

Thanks

Standard

Moviing A Movieclip In Specified Pixel Increments
Hello,

I would like to move a movieclip in specified increments. IE - when you click a button the specified movieclip will move 5 pixels down. So if the center value of the movieclip is 0 it will then be set to 5 once the button is clicked. If you were to click this same button with the same code again then the center value would move to 10, etc...

The code I am using is as follows:

on (press) {
_root.services._y = _y + 5;
}

Is this the correct code to use for this action? I can't get it to work properly. Thanks in advance!

Moving On A Constant Speed
I'm trying to make an arkanoid-like game in Flash 5. I have a ball and a paddle MC. I want the ball to go more diagonal when it falls on the edges of the paddle.
the code looks like this:

Xvar = 8/(_root.paddle._width/2);
diffX = _root.paddle._x - _x;
changeX = (Xvar * diffX) * -1;
changeY = (8 - changeX) * -1;

The problem with this is that the ball goes faster when it goes diagonal. How can I make it go on a constant speed?

Help With Moving At A Constant Speed Along A Line
Hey guys, it was suggested that I post this in here since it has to do with AS3.0. Would you guys mind checking out this thread in the Math and Physics Forum. It's had a few posts in it and some updates, so please check it out and see if you can help me with my issue.

THANKS!

Moving Toward Mouse At Constant Speed
i know you can make something move toward the mouse with

Code:
this._x+=(_root._xmouse-this._x)/speed
but when you get closer to the mouse it slows down, is there anyway to make it do this, but not slow down when it gets closer?

Moving Images From Right To Left With Constant Speed Without Any Gap
Hi everyone.
I am totally new to flash and got one project which realy need to be done. It will be realy appreciate if someone can help me. thanks in advance.

I want to make a file in flash in which different images are moving from right to left


I got limited time to do this.

I have done some basic tutorial to learn flash.

Any help advice will be appreciated. thanks

Moving An Embedded Movieclip To Another Parrent Movieclip.
First the heirachy.

Code:
|----(MC1)
|
(_root)-----|
|
|----(MC2)----(MC3)
When I click on MC3 I need it to create a duplicate of itself inside MC1 so that it looks like this:

Code:
|----(MC1)----(Copy of MC3)
|
(_root)-----|
|
|----(MC2)----(MC3)
I can't use .attachMovie() since I need the script to be duplicated also. So I need to use .duplicateMovieClip() and somehow move the duplicate to the

Name That Increments
I want to assign a value to a dynamic text box every time I press a button. I have 15 text boxes. I've named them box1, box2, box3, etc.

I have a button with code like this:


Code:
on(press) {
n++
_root.box[n]=somethingElseHere
}


What I'm wanting to happen is that every time the button is pressed the next box gets updated. This is not working. What am I doing wrong? Thanks.

How Do I Get A Moving Movieclip Stop At Another Movieclip
I got two questions, im using the movement code from the "RPG inventory and movement" tutorial. This is the code:

onClipEvent (load) {
moveSpeed = 19;
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown (Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown (Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown (Key.LEFT)) {
this._x -= moveSpeed;
}
}

Is there anyway i can put something so the movieclip wont move through another movieclip with the tag "wall" for example. And one oter: How do i make it so that if the movieclip moves into another movieclip with the tag "exit" for example, it will switch frame?

How Do I Get A Moving Movieclip Stop At Another Movieclip
I got two questions, im using the movement code from the "RPG inventory and movement" tutorial. This is the code:

onClipEvent (load) {
moveSpeed = 19;
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown (Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown (Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown (Key.LEFT)) {
this._x -= moveSpeed;
}
}

Is there anyway i can put something so the movieclip wont move through another movieclip with the tag "wall" for example. And one oter: How do i make it so that if the movieclip moves into another movieclip with the tag "exit" for example, it will switch frame?

Counting Increments
There seems to be alot of us working on pan/scroll of large images. Here is my approach and problem. My image pans left and right according to mouseclick on left or right arrow. My panning works fine but the problem is processing the increments as to when to stop. Here is the code:

on (press) {
currPos = getProperty(_root.mainground, _x);
currPos -= 50;
setProperty (_root.mainground, _x, currPos);

????
../:currPos = currPos;
if (currPos=-4600) {
gotoAndStop(2);
}
}

This action pans left (the right pan uses +) in increments of 50 per mouse click and that works fine. The problem starts where the ??? is. This part does not work but gives the general idea of the action to be performed.

When the increments of 50 reach a total of 4600 I want to advance to the next frame which has a black arrow that will not allow anymore panning in that direction. I have tried several approaches and none work. Any suggestions on the best way and code to perform the counting action.

Thanks in advance
pkw

Preloader With 10% Increments
Trying to create a preloader that has a mc which is of a rectangle divided into 9 parts. Each part represents 10% of the download. When all 9 blocks are on screen then 90% has loaded and when 100% has loaded the clip then moves on to the next part of the animation.
Already had some scripting worked out but doesn't seem to work as well as I'd hoped.

if (_root._framesloaded/_root._totalframes*100>=10) {
gotoAndPlay ("box_01");
} else {
gotoAndPlay ("box1pause");
}

So you can see that when frames loaded is 10% then the clip plays box_01. So when its 20% it plays box_02 or just pauses on it until its ready to move on.The code is the same for all of the steps except the final one that moves on to the main part of the movie.
Anyone got any ideas on how to help? I'd be bloody grateful if you can figure it out.

Variable Increments Anyone Know How This Is Done?
i have declared lots of variables like this -
=====================
code
=====================
onClipEvent (load) {
speed=3
speed1=5;
speed2=6;
speed3=-2;
speed4=0:
etc
======================

when my loop happens how do i increment the speed variable to the next one down??
i guess it's something olong the lines of -
=====================
code
=====================
speed=speed+1
=====================

pretty basic stuff but my actionscripting isn't up to scratch yet. I'd be most gratefull if someone can tell me
Thanks

Number Increments
Code:
on(press){
if(_root.MFD.num>3000){
_root.MFD.num==0;
}
_root.MFD.num +=100;
_root.MFD.bngo= (int(_root.MFD.num*.01))*100;
}
I have this on a button.
MFD is the name of a movie clip with num in it.
bngo is a text box with num in it.
num is always _00.

I have used similar code to this before. The only values that are acceptable are those between 0-3000 (rounded to whatever hundred).

I have everything working okay, when the user presses the button, the number increments by 100... but why won't it change to 0 when it gets to 3000?

and I have another button with the same but it should turn from 0 to 3000.

Am I missing something obvious?
Thanks for any help.

Zoom In And Out In Increments? Please Help
I have developed a map, and having much difficulty. I have created the overall windows like platform for viewing the map etc. But In terms of the map interactivity I am having problems.

My aim is to have a zoom function, what I was after was in increments of say : 50% view to start off, then 100%, 150%, 200%, 250% and so on, on click of a plus button. The minus would simple revert in the same increment form.

Also the ability to drag the map, obvoiusly using the startdrag and stop drag functionality.

Can anyone help me achieve this, any direction help would be ideal at this point as I am all out of answers.

T

[F8] Rotate In Increments - Help
Hey, first post and I'm stuck on something...

I'm trying to produce a disc that rotates 120 degrees everytime you hit a button. I'm using the tween class for the motion but once it's done its first movement of 120 I don't know how to go about getting it to do the next 120 degrees as it's defaulting back to zero.

Attached is the fla:

rotator.fla

And here's the actionscript:


Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
stop();

prod01_btn.onRelease = function(){
new Tween(rotator_mc, "_rotation", Elastic.easeOut, 0, -120, 5, true);
};


This is probably easy and I am missing it big time so go easy on me!!

Thanks.

Scrolling In Increments
Does anybody know how to create an easing scroll that will move in even increments?

For example:

http://www.atelier.ie/
http://www.johnnyslack.com/

AS3 - Problems With Increments?
Last edited by John B. : 2008-03-20 at 08:05.
























I have developed a calendar which will allow you to navigate to the last month and to the next month. The days of the month fall into place fine for the next month, but they don't fall into place correctly for the previous month. I think it could be the way that I am incrementing the previous month. I have included the complete as3 file along with the swf file in the zip file, so you can see the problem.


ActionScript Code:
public function getPreviousMonth(event:MouseEvent) {
            minMonth = currentDate.month -=1;
            month_txt.text = monthsOfYear[minMonth] + " " + currentDate.getDate() + ", " + currentDate.fullYear;
            publishMonth();
            for (i = 1; i < daysNo+1; i++) {
                days_mc.removeChildAt(0);
            }
            publishDays();
        }

Percentage Loader Going Up In Increments Of Ten....
Hi

I'm just making a percentage loader and when I publish it it works fine. However when I upload it, the percentage increase goes up in tens?

This is the code I've got....

bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(3);
}

Any ideas?

Thanks

[F8] Sound Panning Increments
I cannot get my panning to change in increments (via a button). It just goes "suddenly left/right" and then won't return to "center".

I'm pretty sure my increments are set right but can't track the problem. Any help is greatly appreciated.

Here is the code for the "left pan":


Code:
onClipEvent (load) {
right = _x+50;
left = _x-50;
center = _x;
if (!_parent.balstatus) {
_parent.balstatus = _parent.MySound.getPan();
}
_parent.balstatus = "";
}

onClipEvent(mouseDown) {
if (this.hitTest(_root._xmouse,_root._ymouse)){
var balleftisPressed = true
updateAfterEvent();
}
}

onClipEvent(enterFrame){
if (balleftisPressed) {
if (_parent.balance != -50){
_parent.balancefill._yscale -= 1;
_parent.MySound.setPan((_x - left)* 2);
_parent.balance -= 1;
_parent.balstatus = _parent.balance;
}
}
updateAfterEvent();
}

onClipEvent(mouseUp) {
balleftisPressed = false;
updateAfterEvent();
}


Thanks for taking a second to look.
Kumba

Controlling MyMC_mc._x With 0.01 Increments
(I've read the Macromedia docs on errors with small numbers, but they don't explain this...I don't think)

Hello,

Still finding my legs ActionScript-wise...

Using an onFrame function I'm incrementing the values of ._x & ._y for a movie clip using myGrow() also scaling it up at the same time.

The increments are my

myMC_mc._x += 0.6;
myMC_mc._x += 0.06;

When I get to my end point (myCounter == 10 for example) I reverse the function by calling myShrink(), and check to see when myCounter = 0. Tracing the ._x & ._y values shows that the ._x & ._y vlaues have slipped out by a small margin??

When I replace these values with 0.5 & 0.05 or 0.005 & 0.00005 respectively the values stay constant without any slipping.

Any ideas why this is???

I can use 0.5 increments, it's fine, but I'd love to know the reason. The maths part of my brain is asleep, I'm sure it's something obvious

_xscale & _yscale Increments
Folks, I have a movie clip that I want the user to be able to scale up or down in increments of 10% by pressing the up and down buttons. I think I'm close, any help would be appreciated.

on (keyPress "<Up>") {
_root.myclip._xscale (110);
_root.myclip._yscale (110);
}
on (keyPress "<Down>") {
_root.myclip._xscale, (90);
_root.myclip._yscale, (90);
}

Drag In Increments - Best Method
How do I use startDrag() to drag only in certain increments? For instance, drag 25 pix as the mouse moves up or down during onPress.

Any nudges in the right direction is MUCH appreciated

_xscale & _yscale Increments
Folks, I have a movie clip that I want the user to be able to scale up or down in increments of 10% by pressing the up and down buttons. I think I'm close, any help would be appreciated.

on (keyPress "<Up>") {
_root.myclip._xscale (110);
_root.myclip._yscale (110);
}
on (keyPress "<Down>") {
_root.myclip._xscale, (90);
_root.myclip._yscale, (90);
}

How Do I Make A Movie Play In 2 Min Increments
I want to make my flash movie restart every 2 min. So after it plays through once, it waits 2 min and then it starts again. How do I do this??

Thanx

Questions About Storage On Variables And Increments...
Hi. I'm starting to use Flash MX, and I need to create a display window for a production line of a factory. The guys asked me to show 3 textboxes: 1 for the model number, 1 for the production goal of the day (15000 assembled units, for example), and 1 box for keeping track of how many units we have assembled.

I created the display grid, no problem. But I'm not so good with Actionscript yet. I created the 3 boxes, and validated the tab index for moving among the boxes, no biggie. The problem is:

a) I tried to store the inserted values on variables, but I'm not sure if they get stored properly. Maybe with the functions I used, the values get erased or something. Here's some code:

tbmodel.onChanged = function() {
_global.model = tbmodel.text;
trace(_global.modelo)//I put a trace to see if it works, but the letters are stored one by one?
}

b)Other issue. Another guy from production asked me to use the last textbox (or maybe a dynamic text) as a 0 number that adds 1 each time you press the <<ENTER>> key.

Any ideas??? Thanks 4 your time, guys!

Text Slideshow - Help With Creating Increments
Hello,

I am creating a random text slideshow from an XML document. The XML document includes a list of Band and Artist names. I need to randomize/shuffle the band/artist names and display them one by one like a slideshow. However, after three band/artist names have been listed, I need to display a static tag line. This process needs to repeat indefinetly. So for example, my slide show would display like so:

AC/DC, OutKast, Bruce Springsteen, We Play Everything, Ozzy Osbourne, Phil Collins, U2, We Play Everything,........

I have been able to do the following:
- Load the XML document
- Loop through the XML document
- Create an array of Band/Artist names
- Shuffle the array

I am now stuck on the following:
- Creating the loop to cycle through three names
- How to add the static tag line
- Repeating the loop, but starting on the next three band/artist names in the array

The last thing I have to do which I have a slight idea on how to achieve is the following:
- use setInterval to display the band/artist names in a dynamic text field.

Without further delay, here is my current AS:


Code:
artist_xml = new XML();
artist_xml.ignoreWhite = true;
artist_xml.onLoad = function(sucess) {
if (sucess) {
processArtist(artist_xml);
}
};
artist_xml.load('artist.xml');

function processArtist(xmlDoc_xml) {
var len = xmlDoc_xml.firstChild.childNodes.length;
var artistArray = new Array;
for (var n = 0; n<len; n++) {
artistArray.push(xmlDoc_xml.firstChild.childNodes[n].firstChild.firstChild.nodeValue);
}
Array.prototype.shuffle = function() {
for (var n=0; n < len; n++) {
var rand = Math.floor(Math.random()*len);
var temp = this[n];
this[n] = this[rand];
this[rand] = temp;
}
}
artistArray.shuffle();

//From here, I'm not sure on what to do. While the code below does work,
//it ultimately is not the desired result (this only works for the first three
//names, and does not cycle through the entire array

i = 0;
while(i++ < 3) {
trace("Bob Plays " + artistArray[i]);
}
}
With that, does anyone have ideas on how I can achieve the rest of my project?

Alternate Button Pressing Increments A Bar
Hey, long time no post.

I have recently started a new project, again and hit a stump. Im trying to make a mini game where you have to press two alternating buttons (x and z) to increment the bar. Now i started it, but it failed as pressing any button really fast incremented the bar. i used a _root.onEnterFrame = function() {

code, but im having troubles. So what i want to do is have the user press the x button, and then have to press the y button and the bar increases and they have to do this rapidly. If anybody could help i would be very thankful.

--binime--

OnKeyDown Increments Currentframe At Root Of Script
I'm having a bit of a problem. I've made something that increments the _root._currentframe, but it keeps adding 1 to the _currentframe when the playhead hits the frame that the script is on. I'm not sure why, but maybe someone can enlighten me. Just open a new fla and add a bunch of empty frames, then paste this script in one of them. Any suggestions?


Code:
stop();

_root.createTextField("textBox",_root.getNextHighestDepth(),6,60,134,20);

_root.onEnterFrame = function () {
textBox.text = _root._currentframe;
}


var keyListener_obj:Object = new Object();
keyListener_obj.onKeyUp = function(){
switch(Key.getCode()){
case Key.SPACE:
trace(Key.getCode);
//_root.gotoAndStop(+1);
_root._currentframe++;
break;
case Key.LEFT:
if(_root._currentframe<=2){
_root._currentframe=2;
}

//_root._currentframe--;
_root.prevFrame();
break;
case Key.RIGHT:
//_root._currentframe++;
_root.nextFrame();
break;
}
};
Key.addListener(keyListener_obj);

Moving A Movieclip
i just want the movie clip to move when u press a button,

press LEFT key=movie clip slides left
etc.

Moving A Movieclip
i have 4 buttons, they are located next to each other, although not at equal intervals, their _x locations are:
A=30
B=80
C=110
D=190

i have another movieclip with an instance name of "dash". the original _x location of dash is 0.

here is what i need to do:
1. on rollover, of any of the buttons, "dash" needs to move to that button (example: i rollover C, "dash" should move to _x=110.)
2. on release, "dash" should stay above the selection.
3. on rolloff, if the button is not hit, "dash" should return to its previous location.

this needs to work between any of the buttons, A to D, C to A, etc.

thanks in advance for any help.

Moving Movieclip
How would I be able to hold down the left mouse button and move the movieclip until the button is released. I can get it to move, however, when I hold it down it carries out the operation once but doesn't continue to move when held down.
Sorry, im new to actionscript.

Moving A Movieclip
i want to know how to move a movie clip on the stage using buttons.

e.g. a button for left, button for right when the user presses these a movieclip in the background moves (movieclip moves right when left is pressed and left when right is pressed) if ya get what i mean!
so the user controls where they are looking on screen!



Ive got an idea for a project but need to know this before moving on!

Any help?

[F8] Moving A Movieclip
Hey there, I'm using Flash 8. Anyways, I'm having some issues with the code below. Right now the movie clip moves then plays halfway down. I don't want that. I want it to play, then move when I hit b1. So for example, when I hit b1, I want MC_Main to have already appeared, and played, then drop, and have MC_Photo move in, then when it's done moving, it can play, when MC_Main has dropped all the way. Am I on the right track or do I need to add some more code?
Let me know if that is confusing or not.
Again thanks for the help


PHP Code:



stop();

MC_Photo._visible = false;
MC_Resume._visible = false;
MC_Print._visible = false;
MC_Video._visible = false;
MC_GraphicD._visible = false;
MC_WebD._visible = false;
MC_Contact._visible = false;
MC_Main._visible = true;

b1.onRelease = function() {
    MC_Photo._visible = true;
    MC_Photo.play();
    MC_Resume._visible = false;
    MC_Resume.gotoAndStop(1);
    MC_Main._visible = true;
    MC_Main.gotoAndStop(1);
    MC_WebD._visible = false;
    MC_WebD.gotoAndStop(1);
    MC_Video._visible = false;
    MC_Video.gotoAndStop(1);
    MC_Print._visible = false;
    MC_Print.gotoAndStop(1);
    MC_GraphicD._visible = false;
    MC_GraphicD.gotoAndStop(1);
    MC_Contact._visible = false;
    MC_Contact.gotoAndStop(1);
    //Movieclip GotoAndPlay Behavior
    this.MC_Photo.gotoAndPlay("1");
    //End Behavior
};
    MC_Main.onEnterFrame = function() {
    if (MC_Main._y < 550) {
        this._y +=8;
    }
    };


b1.onRollOver = over;
b1.onRollOut = out;
b1.buttText.buttonText.text = "Photography";
function over() {
    this.gotoAndPlay(2);
}

function out() {
    this.gotoAndPlay(7);
}

Movieclip Moving
1st time post here...hehe...
can any1 give me a tutorial juz like this website?http://www.4thavenuejones.com/
i want like it moving the image...

Moving Movieclip With AS
Hi!
I'm quitre new with Flash and especially with AS. Allthought I have programmed another languages before. Well, I'm making simple animation, and I would like to move one symbol with action script. In my animation, ant runs to the left. Because this background must move to the right. Well, I have two problems. Firstly, how I can move backround symbol to the right? I tried something like:
earth.x+=4; and earth._x+=4;
after looking one example. However it won't work. Another problem is that earth's right side should appear from left when it is outside of stage's border so there don't appear white areas.
Example picture:
http://i10.tinypic.com/43gpbpg.png
As you can see, background appears from opposite side and follows itself. how I can do that?

Thank you very much! Help is appreciated

Moving Movieclip
What I'd like to do is have a movieclip slide into position when the user rolls over it and slide back when the user rolls off of it. This movieclip would house buttons that I could then click to navigate to different parts of my site.

When using the onRollOut action and onRollOut action for this movieclip I then lose the ability to target the buttons inside of this movieclip using an onPress function. From what I've read, it has something to do with button event capturing. Does anyone have code that will allow for a work around?

Thank you...

Moving Movieclip
What I'd like to do is have a movieclip slide into position when the user rolls over it and slide back when the user rolls off of it. This movieclip would house buttons that I could then click to navigate to different parts of my site.

When using the onRollOut action and onRollOut action for this movieclip I then lose the ability to target the buttons inside of this movieclip using an onPress function. From what I've read, it has something to do with button event capturing. Does anyone have code that will allow for a work around?

Thank you...

Moving A Movieclip In AS?
I noe this is very possible, I am just sooo dumb is AS

I want to rotate an object in AS because i think moving it manually is a waste of time

Thanks a lot!



-Dean

Movieclip X And Y While Moving.
Yellow again, I got a quick question , if I want to make a movieclip (for the sake of clarity we will call it mc1) match another movieclip's (mc2) x and y coordinates while mc2 is moving how would i do that?

Anyhelp is much appreciated, thanks in advance legion

Is Movieclip Moving?
im trying to make a function that tells me if my movieclip is moving


Code:
var thisPosition:Vector = new Vector(this.px,this.py);
if(thisPosition.x == lastPosition.x && thisPosition.y == lastPosition.y){
//movieclip isnt moving!
}else{
//inMotion = true;
}
lastPosition = new Vector(this.px,this.py);
but it doesnt work! how come? im using as3 btw

Moving A MovieClip
Question, I have a Movie Clip say McA and I insert another Mc called B into McA. McA has the registration point dead center. Therefore McB I believe has its registration point at the top left right. Therefore, how do I move the McB to be exactly over McA.
Assumption both Movie Clips are the same size, height=39, width=74. Also McB has a image in it. I tried using the _x & _y properties to align McB with McA but McB won't move at all.

I'm I missing something?

Moving A Movieclip In AS?
I noe this is very possible, I am just sooo dumb is AS

I want to rotate an object in AS because i think moving it manually is a waste of time

Thanks a lot!



-Dean

Movieclip X And Y While Moving.
Yellow again, I got a quick question , if I want to make a movieclip (for the sake of clarity we will call it mc1) match another movieclip's (mc2) x and y coordinates while mc2 is moving how would i do that?

Anyhelp is much appreciated, thanks in advance legion

Moving A Movieclip?
Lets say I have a circle mc on the root level, and on the same level, another mc thats a box..is it possible to duplicate the circle mc, and have it be a child of the box mc? im having a real hard time with this, can anyone help?

Moving Movieclip Levels
Can anyone help me out there?

I have six drag and drop buttons (button within a movieclip)all on the same frame. I need to know if there is a way to instantly upon pressing the button, to bring that button to the front so it will overlap the other buttons. (and vice versa if I were to click on any of the other drag and drops)

Right now the movieclips are layered (the ctrl, "down arrow" key, kind of layered)

any help would be really really appreciated.

Thanks

Moving Movieclip With Actionscript
I have a movieclip that sort of follows the cursor around. I want to have a button that you can click to stop it from following the cursor. When you click on this button I want to be able to take the movie clip from wherever it's at and ease it to a certain point (coordinate) in the movie. What would the actionscript be on the release of that button?

Thank you for any help,

Kyle

Moving A Movieclip Across The Stage
The script below moves a movie clip from the bottom to the top of the screen:

onClipEvent(load) {
// these values are initialised when this movieclip first loads
//maxY is the position at which we want to reset the _y position of the movieclip
maxY = 0;
//startY is set to the initial position of the movieclip
startY = this._y;
}

//the following script runs all the time (Ie: every frame even if the movie is stopped)
onClipEvent(enterframe) {


if (this._y >= maxY) {
// if the Y position of the movieclip is greater than the maximum required position
// then we move the movieclip by adding the value of 'speed' divided by our constant
// (we need to divide by a constant otherwise it will be too fast!
this._y -= _root.speed/_root.constant;
} else {
// when the movieclip reaches the max desired position we reset the Y pos to the initial value
this._y = startY;
}
}

I would like to move this movie clip from the bottom right corner to the left, then from the bottom to the top, and finally from the top left to the right corner all in one continous movement.
Can anybody help me please?

Help Moving The X Axis Of A Movieclip
I was wondering if anybody could help me or knows of a tutorial that shows how to move the x axis of a movieclip.

I am almost finished with a site and I have five main buttons at the top- Home - About - Services - Portfolio - Contact. Then I have placed a movieclip in the center of the stage with an image inside that has a width of 3740. This leaves 747 for each section. I need it to move over 747 for each section plus or minus and I know that from Home to Contact it will have to move 2992 but I think I can figure all that out as soon as I just figure out how to get it to move and set a speed.

Thanks in advance.

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