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








Problem With Moving Objects After Adding To Stage


Hi,
I am a student using an educational licence version of Flash MX, obtained through my university, as a prototyping tool. All has been well until last night, when I found I could not reposition anything on the stage. I am something of a novice with Flash Mx and have been unable to find out what is causing the problem. I suspect I have inadvertantly used a control key combination to change a particular setting. The problem first manifested itself when I added a combo box from the components panel to the stage and it located itself in the top left hand corner and then refused to be moved!
Any ideas gratefully accepted.




Adobe > Flash General Discussion
Posted on: 03/28/2007 05:32:13 AM


View Complete Forum Thread with Replies

Sponsored Links:

Moving The Stage After Resizing - Or Moving All Objects On The Stage? Heeeelp
Hello! I'm in dire need of help!

I've been forced to resize the stage of my movie but as the stage is expanded to the right and down everything ends up in the wrong place. So I wonder:

Is there any way to move the stage rather than the contents thereon?

or

is there a way to move all the content on all layers and even all scenes simultaneously?

or

is there a way to expand the stage equeally on all sides rather than just right and down?

THANKS ALOT TO WHOEVER COULD HELP ME!


Freddy D, Stockholm, Sweden

View Replies !    View Related
Moving Objects On The Stage Help
Hello,

What I am trying to do is;

Assume there are 5 playing cards on the stage spread out evenly across the stage, and what I want to do is, when you move the mouse of each card (should I make them a button or movie instance?), the card will move to center of stage and go from about 20% of its size to 100% by the time it is in center screen. But this will have text on it, so at 20% you can't read it until it gets to center and is at 100%. Is this actionscript? I am not familiar with that other than gotoAndStop and so forth.

Ok, yes I am new to Flash MX, but I am learning more everyday from all of you, so can anyone please help me?

Thank you

Thorrax

View Replies !    View Related
Moving Objects On Stage
I recently was asked to make sort of a slideshow, not a problem.
My question is, since there were 100 objects at once to be moved at the same time in the same direction, is there a simpiler way to make everything move at once instead of making them all move one at a time?

View Replies !    View Related
Dynamically Moving Objects Across The Stage
I need help in moving an object across the stage. I have got it to move each time I click on a button, but I want it to move from point a to point b (_x Axis). Not in an instantaneous fasion but in a gradual fasion..

here is the code I wrote:
button1.onPress = function() {
var a = 6; //the plus value or the speed
var sP = 311.1; //Stop Point
var stP = 215.1;//Starting Point
var gX = (getProperty("button2", _x) + a);
//var mX =
if(gX < sP){
setProperty("button2",_x,gX++);
}
};

View Replies !    View Related
Moving Objects Past Stage
The answer seems like it's staring me in the face, but i just can't figure this out for my life. I'm trying to load an object off the stage giving it a negative x value, but it's not letting me move its x coordinate past 0. I am going nuts.

so i'm doing:

mc.x = -500;

And it loads it at x = 0. ARGH.

View Replies !    View Related
Adding Stage Objects To Arrays With While
Hello.

Im making a simple game. I want AS3 to check for collision on 48 boxes at the same time. The boxes are placed on stage and all have the instance name "blockx" where x = 1-48.

I have created a While loop in order to run the script on all blocks, but it wont work. Any help?

I could create an Array and use .push(blockx) 48 times but i figured there must be an easier way.

stage.addEventListener(Event.ENTER_FRAME, flytta);


ActionScript Code:
function flytta(e:Event):void
{
    var i:uint = 48;
    while(i--)
    {
        var b:MovieClip = block+i;
        if(topident.hitTestObject(b))
        {
            canup = false;
            trace("hitup");
        }
        else
        {
            canup = true;
        }
       
        if(botident.hitTestObject(b))
        {
            candown = false;
            trace("hitdown");
        }
        else
        {
            candown = true;
        }
        if(leftident.hitTestObject(b))
        {
            canleft = false;
            trace("hitleft");
        }
        else
        {
            canleft = true;
        }
        if(rightident.hitTestObject(b))
        {
            canright = false;
            trace("hitright");
        }
        else
        {
            canright = true;
        }
    }

View Replies !    View Related
Adding Random Objects To Stage
i need help with putting random movie clips onto the stage. i'm trying to add 20 objects of 3 random movie clips, but the code i wrote only adds 3 movie clips onto the stage.
please help.
here's what i have:
Code:

var circle:MovieClip = new Circle();
var square:MovieClip = new Square();
var triangle:MovieClip = new Triangle();

var typeArr:Array = new Array(circle, square, triangle);

var nObject:Number = 20;

for (var i:int = 0; i < nObject; i++)
{
    var randomNumber:Number = Math.round(Math.random() * (typeArr.length - 1));
    typeArr[randomNumber].x = Math.random() * stage.stageWidth;
    typeArr[randomNumber].y = Math.random() * stage.stageHeight;
    addChild(typeArr[randomNumber]);
}

View Replies !    View Related
Moving Running Forward But Elements Moving Off Stage
I'm positive I've done it by the book. All symbols on the stage - one by one dragged them off the stage creating timelines - about 6 layers. Play the movie and all the elements start on the stage and move off. Just the way I wanted it but in reverse. Simple vertical and horizontal motions. My mistake must have been in the beginning somewhere - but where ?

View Replies !    View Related
Create Array On Stage, Mathematically Referring To Objects On The Stage
Ok what I want to do is create a set of small images on the stage and name them sequentially like you would an array, then refer to them mathematically in actionscript. I tried naming them as an array but it says that the name is reserved for the system or something. Does anyone know how to get an array of objects onto the stage, or have an idea of something else I could do to get the same effect?

View Replies !    View Related
Create Array On Stage, Mathematically Referring To Objects On The Stage
Ok what I want to do is create a set of small images on the stage and name them sequentially like you would an array, then refer to them mathematically in actionscript. I tried naming them as an array but it says that the name is reserved for the system or something. Does anyone know how to get an array of objects onto the stage, or have an idea of something else I could do to get the same effect?

View Replies !    View Related
Best Way To Hide On Stage Objects When Other Objects Need To Be Shown?
A typical nubee question..What is the best way to hide objects on sage when a button from navigation is clicked and in response other information or objects need to be shown instead of the one previously on stage?

View Replies !    View Related
Help: Stage Objects Get In Front Of Script Objects?
This is getting me mad...

addChild(my_script_object);

I can't see it...

If I try trace(numChildren) I get 10, so then I try addChildAt(my_script_object,9) and still cant' see it.

If I delete all the objects in stage then I finally see it.... If I delete one by one I find my_script_objects gets beneath a bitmap placed by hand by the designer.

Any ideas?

TIA

View Replies !    View Related
Best Way To Hide On Stage Objects When Other Objects Need To Be Shown?
A typical nubee question..What is the best way to hide objects on sage when a button from navigation is clicked and in response other information or objects need to be shown instead of the one previously on stage?

View Replies !    View Related
Moving Objects: Moving Keyframes?
Can I move multiple layers on a timeline, so that they will all move. Basically I just want to move the location of the multiple layers.

Whenever I do this, it seems to move only some of them and thus the whole animation is messed, different starting points and ending points...a big mess.. It makes me want to cry.



Seems like there is an easy answer or I might just be the biggest chump on the planet.

Case

View Replies !    View Related
Moving Objects: Moving Keyframes?
Can I move multiple layers on a timeline, so that they will all move. Basically I just want to move the location of the multiple layers.

Whenever I do this, it seems to move only some of them and thus the whole animation is messed, different starting points and ending points...a big mess.. It makes me want to cry.



Seems like there is an easy answer or I might just be the biggest chump on the planet.

Case

View Replies !    View Related
Moving An Object Thats Off The Stage Onto The Stage
For a Flash class thats coming up we need to do a little game. Now my idea is to make a GTA 1 style game. We have the car movements down but what i'm having trouble with is making the car stay centered and moving objects that arnt currently onto the screen onto the screen. EG Car is in the center (Always stays in the center) Car moves forward, the background (Road, buildings etc...)Move down the screen and new objects apear on top the screen and move downwards or right, left upwards depending on the direction the car is moving. Any help would be greatly appericated.

View Replies !    View Related
I Am Adding A Child To The Stage, Adding An Event Listener To The Child. I Then Want
I'm trying to do something that seems like it should be really simple to do.

I am adding a child to the stage, adding an event listener to the child. I then want to remove the child from within the event listener.


ActionScript Code:
var newClip:NewClip = new NewClip();

addChild(newClip);

newClip.addEventListener(Event.ENTER_FRAME, newClipListener);

public function newClipListener(event:Event) {
    trace("test");
}


I've tried quite a few things and nothing seems to work. The only method I know that works looks like this, but it's stupid and cumbersome and i'm sure there is a better way


ActionScript Code:
var newClip:NewClip = new NewClip();

addChild(newClip);

newClipArray.push(newClip);

newClip.myID = newClipArray.length-1;


newClip.addEventListener(Event.ENTER_FRAME, newClipListener);


public function newClipListener(event:Event) {

    removeChild(newClipArray[event.target.myID]);
   
}

View Replies !    View Related
Moving Objects
Hi, i'm making an anamtion that scrolls pictures by left and right when you put your mouse over the "<" and ">" buttons. I have that part working fine but my problem lies here... i have this code in a separate movie so that the movie will loop and run the code over and over again will the mouse is still over the button.

//this is for the left button and it moves the picture to
//the left 10 (there's also one for pic2-pic5. this code
//works fine

tellTarget ("/pic1") {
setProperty ("/pic1", _x, _x -= 10);
}

//if the picture got beyond a certain _x val i wanted to
//move it to the other side so i used this code.

if (pic1_x <= -1240) {
tellTarget ("/pic1") {
setProperty ("/pic1", _x, "1240");
}
}

now this code, well, kinda works. it sees that the picture is beyond -1240 and it moves it self to 1240. But for some reason it doesn't start moving to the left again. In fat i tried a += 50 where the "1240" is and it kept moving to the right 50 so it's running that if statement even though it's no longer <= -1240. is there something wrong with my if statement?

View Replies !    View Related
Moving Several Objects As One
I'm creating a list of items using the duplicateClip function.

Each item is placed clip._height below the previous one.

It just so happens that the list may be too long to fit on the screen, so I have to give the effect of moving the group.

Can I create this list of items as if they were one? Then, all I would have to do is move this one item.

Better yet, because I'm sure that this question or one like it has been asked several hundred times, what should I search for when looking for tutorials or previous posts on the subject? Does this concept have a name?

Thank you

View Replies !    View Related
Whe Are Objects Moving?
heeelp....my objects are moving
e.g. i want my objects to be on whole pixels, so x=15 and y=15 however as soon as i press enter it moves back to 15.3 and 15.7 or something like that. i unchecked 'snap to grid' 'snap to guide' however that doesnt seem to be the problem.

any ideas?

thx!

View Replies !    View Related
Moving Objects
I know this might be silly, but.. I cant quite figure out the way to make objects moveable on a flash screen. You know, the eggplant way?...

View Replies !    View Related
Moving Objects?
How do I get a object to move along the x axis when the user presses the left and right cursors.

And how do I stop the object from goin off of the side of the scene?

thanx alot

cya
Andrew

View Replies !    View Related
Containing Moving Objects
hey
i've got a bit of a problem i've created a function that tells eight objects to randomly choose between eight possible directions and move in that direction. this works perfectly. the problem is i want to contain this motion within a set square for example if it hits the border of the square diagonaly iwant it to bounce off in the opposite direction. does anyone know of any tutorials showing how i can create these parameters.

View Replies !    View Related
Moving Objects
Hi, I'm trying to make an animation in which a square (line, or any other shape) moves from one point to another (like moving from top to bottom). I was wondering if there's a way to do it different than making many frames and just change the possition of the object in each frame 'til it gets to the final possition. If there's an easier way to do it or if there's some sort of software that may help to do this, PLEEEEASE let me know.
Thanks a lot.
G.

View Replies !    View Related
Moving Objects....
Is it possible to move objects in micro movements? I know I can move objects in larger spaces holding shift down. But can I move in smaller increments by holding something else down..

View Replies !    View Related
Moving Objects
I created a map movie, and decided late in the game that I was going to load the map movie into my interface with a load movie function. Originally, the movie was created with the map in it.

Anyways, how can you move all of your animated parts, frames, ect. While keeping everthing intact. Basically I need to move all my files and resize my movie.

Is there an easy way to do this? Like a select everthing? I tried selecting all the layers but it always seems to miss some parts.

-eric

View Replies !    View Related
Moving Objects
Ultra newb question here, but how do you move an object around on a layer similar to the way you do with the move object tool in PS?

View Replies !    View Related
Moving Two Objects At Once
I have to images one of a sun and the other is a flower.I have it so that i can drag the sun from one spot to another but what im trying to do is have it so that the flower image will flip or move so that it is following the sun as it moves.
Any help would be great.Thanks.

View Replies !    View Related
Moving Objects?
I'm simulating a plane moving and when you hold down an arrow key it will move faster. I'm looking for a little better way to do it because it seems to get exponentially faster the way I'm doing it but I can't think of a better way of doing it.

Frame 1:

Code:
var speed = 1;
var count = 0;


Frame 2:

Code:
var myListener:Button = new Button();
var mySoundWave:MovieClip = new MovieClip();

if(plane._x>800)//Keep plane on screen
plane._x=0;
if(speed>40)
trace("SPEED OF SOUND");

plane._x+=speed;
plane._y+=plane._rotation/5;

count+=1;
if(count%4==0)//Don't display a soundwave everytime
{
showMovie("soundWave",plane._x,plane._y);
}

function showMovie(linkageId, xpos, ypos)
{
var linkageId :String;
var xpos:Number;
var ypos:Number;
mySoundWave = this.createEmptyMovieClip("mySoundWave", this.getNextHighestDepth());
mySoundWave._x = xpos;
mySoundWave._y = ypos;
mySoundWave.attachMovie(linkageId,e,this.getNextHighestDepth());
}

myListener.onKeyDown = function() //This is the relevant code for moving
{
if (Key.getCode() == Key.LEFT) {
speed -= .001;
} else if (Key.getCode() == Key.RIGHT) {
speed += .001;
} if (Key.getCode() == Key.UP) {
plane._rotation -= .001;
} else if (Key.getCode() == Key.DOWN) {
plane._rotation += .001;
}

};

Key.addListener(myListener);


Frame 3:

Code:
gotoAndPlay(2);


I made everything really small because I didn't want it to get out of control.

View Replies !    View Related
Moving Objects
Me & some friends are making a game. You are in a sliegh & have to dodge objects. But i can't make the objects move. This is the code i am using:


ActionScript Code:
// Random Tree Postion
var xpos = 0;
var numObjects = 15; // Edit to Change how many trees - number of snowballs
for (i=0; i<numObjects; i++) {
    var randomObject = attachMovie('tree', 'tree'+i, i);
    if (i<=numObjects) { // DEV: No Overlapping
        randomObject._x = xpos-240;
        xpos += 44;
    }
    randomObject._y = random(500);
}
// Random Snowball Postion
var numObjects1 = 6; // Edit for how many snowballs.
for (s=0; s<numObjects1; s++) {
    var randomObject = attachMovie('snowball', 'snowball'+s, s);
    if (s<=numObjects) { // No Overlapping
        randomObject._x = xpos-640;
        xpos += 66;
    }
    randomObject._y = random(500) + 700; // create snowball behind.
    // DEV: Move snowballs
    randomObject._y -= 3;
}

View Replies !    View Related
Moving Objects
Hello guys, my first post here

Here i am helping out a friend with a website. I'm Designing a website completely made of flash (customer request :/ ). There is a part at the bottom of the screen thats like a tab. I want to move the whole tab (and a wider box attached to it too) a little up everytime the mouse rolls over it.


Looking at various tutorials I've found one that seems to suit me. It basicly moves the movie clip (the whole thing at the bottom the tab + the bottom box is converted to a movie clip for this) in incriments. It needs a yTarget{instancedname} variable. For example if i give the movie clip an instance name of MC the variable would be yTargetMC and the number i associte it with is where the movie clip moves to.


So i can make a button that has :


on (rollOver) {
yTargetMC = 50;
}
on (rollOut) {
yTargetMC = 100;
}


It works as long as the movie clip and button are on the same "stage". I want the movie clip to move up on mouse over so i palce the button inside the movie clip but when i do this the yTargetMC is useless coz it wont change the variable in the main stage (i'm assuming this)thus wont work. Is there a way that i can make the button inside the movie clip assign the variable change to the main scene? Maybe a script code that makes the button work like it was NOT inside the movie?


I'm kinda lost here and i hope i managed to explain this properly. Any help would be welcome - i'm ok with rebuilding this too if there is a more easier and logical way too. As i said i'm learning and helping at the same time so hence i'm a newbie yet again


Thanks in advance,


Osman

Edit : here's the code for the movie itself (that is moved)

onClipEvent (enterFrame) {
yMC = getProperty(_root.MC, _y);
moveMC = _root.yTargetMC - yMC;
setProperty(_root.MC, _y, yMC + (moveMC/10));
}

View Replies !    View Related
Moving All Objects
This is a stupid question, I know but I neet help urgently. How can I move all elements in a time line? I have 50 key frames If I select all and move them with the mouse only the frame with the marker on it is moved.

What am I doing wrong

Tanks in advance

View Replies !    View Related
Moving Objects
i want to move a movie clip's x and y in my movie in the same way that the movie in the fla download's section called 'SlideMenu' does. but it only does x positions. ne ideas?

View Replies !    View Related
Moving Objects
I AM NEW TO FLASH AND I WANT TO LEARN HOW TO CREATE THE MOVING CLOUDS EFFECT THAT I SEE ON SOME SITES. Thanks for the help

View Replies !    View Related
Moving Objects
Does anyone know a tutorial that explain how to script the "button system" on this site: link ? Seen it many places, quite handy and stylish

View Replies !    View Related
Moving Objects In More That 1 Frame
How do i move objects in more than one frame at the same time? they are on the same layer.

View Replies !    View Related
Moving Objects With Actionscript
On the main stage, I have 2 identical objects (1 symbol X 2), both moving along the X-axis. One is moving from the left toward the center; one is moving from the right towards the center. I would like actionscript that will allow me to have these objects move each from a specified point to a specified point (not user-specified, but predetermined) in the same specified number of frames.

Can anyone help? I am totally new to actionscript, so please explain thoroughly.

Thankyou,
S. Reebar

View Replies !    View Related
MOVING OBJECTS With Actionscript
On the main stage, I have 2 identical objects (1 symbol X 2), both moving along the X-axis. One is moving from the left toward the center; one is moving from the right towards the center. I would like actionscript that will allow me to have these objects move each from a specified point to a specified point (not user-specified, but predetermined) in the same specified number of frames.

Can anyone help? I am totally new to actionscript, so please explain thoroughly.

Thankyou,
S. Reebar

View Replies !    View Related
Moving Objects By Using Actionscript
hi ppl,
i m having this problem of not being able to move an object created in flash according to coordinates. i m basically working on a projectile path displayer using flash 5. when i give co - ordinates to individual keyframes they are jumping to each position in the flash player & no tweening is visible. I NEED HELP FAST!!! as my project guide is v. angry with me.
help me out guys...
Sidz-the zapperbug
my e-mail is zapperbug@rediffmail.com

View Replies !    View Related
Problem Moving Objects
hi,

ok, I'm new to this, so it's a simple question....

I made a small text animation (10 letters) each letter is blending in after an other:

(alpha 0% ---> 100%)
(alpha 0% ---> 100%)
(alpha 0% ---> 100%)


fine !

but now I have to move the hole word a bit to the top (it's not part of an animation, just a simple alignment!!).
If I try to do this, (I select all letters) and move it up a bit, this move is now a part of the animation :-((
What am I doing wrong ????

thanks for your needfull help !!!!!!

greets otix

View Replies !    View Related
Moving Objects Within A Projector
hello all. I'm newish to this game. I can create projects happily in flash 5....but I am stuck on one thing at the moment. I want the user to be able to grab an object from a position within the projector and relocate it wherever he wants within the projector. I know this is going to be some simple comand or creation of a certain type of graphic but i am a spanner...please help me.........

thanks

Andy

View Replies !    View Related
Moving Objects With Actionscript
hi everyone

i have a movie on the main timeline that contains an object1 with a long motion tween.

i have a 2nd movie on the main timeline that contains a movie with the controll pannell for this object1.

i would like that when you push the ff button, the object1 skips two frames so it looks like it's going in fast forward on it's motion tween. same, i would like to push the rw button and have it go back two frames in the motion tween to look like it's going backwards in rewind.

here's my code on the ff button contained within an on press:


_root.PIXI.gotoAndPlay(_currentframe + 2);


but its not working. it brings object1 back to it's first position always.

what am i doing wrong?

best wishes,
slimpixi

View Replies !    View Related
Moving Objects Along A Line?
i've been using motion tweens to animate my movies and i'd like to reduce the size by using actionscripting to achieve the same effects. can anyone suggest any tutorials that will take me through the basics of using actionscripting to move objects along a line?

here's my current website and the first 20 frames are nothing but motion tweens. any suggestions on how to reduce the load up time??

http://web.mit.edu/jbradd/www

View Replies !    View Related
Moving Objects With ActionScript
Hey,

I think this should be possible, but I have no clue how to do it. I am using regular Flash MX by the way. Here's what I'm trying to accomplish:

When you click a menu button, it will tell a movie clip to shink and then move off of the screen with an alpha transition. Once the clip is off the screen, I want to execute a simple gotoAndPlay .... but I don't want the gotoAndPlay to execute UNTIL the movie clip is off the screen. Is this even possible? Hope this makes sense. Thanks for your time.

View Replies !    View Related
Randomly Moving Objects
I need assistance with this, since I can't find it in the forums. I want to have at most 10 circular-objects moving randomly around the page. Also if it's possible to have some of them appear and disappear after time. Can this be done?

thanks!

View Replies !    View Related
Dynamically Moving Objects
I have two movie clips that I want to control with a button. They need to change: size, position and move on a semi-circular path. I would love to do this with actionscript, instead of using a motion path, but I want the movement to be fluid. Any ideas? (see attached diagram)

View Replies !    View Related
Moving Objects To Certain X,y Points
I have a main menu box that contains navigation buttons.
This box can be dragged anywhere on the screen. If i want
a button to move that box to a certain x and y point, no matter
where it is at anytime, how can i script this?

View Replies !    View Related
Randomly Moving Objects
Does anyone know a script that can randomly move objects on a rollover then revert back after rolled out? I plan to use this as a menu, so when someone rolls over text, the letters will move seperately, but different every single time. I will post my FLA if needed to show what I want.

Thanks in advance,
James

View Replies !    View Related
Moving Objects In ActionScript...
I was wondering if there is syntax in Actionscript where you can smoothly move an object from point "A" to point "B", just like a tween... Here is some fictitious code to help explain my question:

code: tweenTo (Initial X, Initial Y, Destination X, Destination Y)

That code obviously won't work, so I am looking for the correct syntax. If you can help me that would be great. Thanks alot!

-Layz

View Replies !    View Related
Moving Other Objects When The Mouse Is Over One
i'm using flash MX

basically what i want is i have 7 objects in a row. when you put the mouse over one object, i want the other 6 to move downward. when you remove the mouse from that object, i want the other 6 to move back up into place.

any help would be much appreciated.

View Replies !    View Related
Function For Moving Objects
I have an array of objects whic have start and end positions defined like this.

PHP Code:




for(var i=0; i<arrusr.length; i++){
    
    
_root["cccc" + arrusr[i]] = game.clip["char" + arrusr[i]]
_root["cccc" + arrusr[i]].xtile = _root["cccc" + arrusr[i]].trgtx
_root["cccc" + arrusr[i]].ytile = _root["cccc" + arrusr[i]].trgty
_root["cccc" + arrusr[i]].x = _root["cccc" + arrusr[i]].xtile*game.tileW;
_root["cccc" + arrusr[i]].y = _root["cccc" + arrusr[i]].ytile*game.tileW;
_root["cccc" + arrusr[i]].xiso = _root["cccc" + arrusr[i]].x - _root["cccc" + arrusr[i]].y;
_root["cccc" + arrusr[i]].yiso = (_root["cccc" + arrusr[i]].x + _root["cccc" + arrusr[i]].y)/2;
_root["cccc" + arrusr[i]].speed = 5;
_root["cccc" + arrusr[i]].trgtx = p.data["x"+arrusr[i]]
_root["cccc" + arrusr[i]].trgty =  p.data["y"+arrusr[i]]
_root["cccc" + arrusr[i]].moving=true
llll =  _root["cccc" + arrusr[i]]
llll.speed = 5
...






I have a move function from Tonyas tuturials


PHP Code:




function moveChar1(llll) {
.
.
.
        llll.y += llll.speed*llll.diry;
    llll.x += llll.speed*llll.dirx;
    llll.xtile = Math.floor(llll.x/game.tileW);
    llll.ytile = Math.floor(llll.y/game.tileH);
    // calculate position in isometric view
    llll.xiso = llll.x-llll.y;
    llll.yiso = (llll.x+llll.y)/2;
    // update char position
    llll._x = llll.xiso;
    llll._y = llll.yiso;
    // calculate depth
    llll.depthshift = (game.tileW-16)/2;
    llll.depth = (llll.yiso-llll.depthshift)*300+(llll.xiso)+1;
    llll.swapDepths(llll.depth);
    // face the direction
    llll.gotoAndStop(llll.dirx+llll.diry*2+3);







i call the function with this:

PHP Code:




for(var i=0; i<arrusr.length; i++){
moveChar1(_root["cccc" + arrusr[i]]);
}







if i dont heve this two it doesn work.

PHP Code:




llll =  _root["cccc" + arrusr[i]]
llll.speed = 5







And whent the objects move one object from the array interferes with movement of others. So if I move two objects, the first is halted by the second.

Please help!

Thank you!

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved