Forum Topic: Tiling objects and then moving them

(159 views • 10 replies)

This topic is 1 page long.

<< < > >>
None

Jomann

Reply To Post Reply & Quote

Posted at: 11/8/09 02:56 PM

Jomann NEUTRAL LEVEL 02

Sign-Up: 07/19/06

Posts: 6

Hello, I would simply like to know how to tile an object then have it move a certain direction at a certain speed (without key input)

However I would like to find a book or something that teaches me action scripting in general by giving me examples and such, so if anyone knows any good books, I'd love to know. thanks.


Sad

Archon68

Reply To Post Reply & Quote

Posted at: 11/8/09 04:17 PM

Archon68 LIGHT LEVEL 22

Sign-Up: 09/09/07

Posts: 3,416

What? "Tile" objects then move them? You mean, tilt them and move them?

I code in AS2, in case I forgot to mention it.

BBS Signature

None

Jomann

Reply To Post Reply & Quote

Posted at: 11/8/09 04:53 PM

Jomann NEUTRAL LEVEL 02

Sign-Up: 07/19/06

Posts: 6

At 11/8/09 04:17 PM, Archon68 wrote: What? "Tile" objects then move them? You mean, tilt them and move them?

like take a picture that repeats on the x and y then have it move across the screen, while endlessly moving.


Elated

Archon68

Reply To Post Reply & Quote

Posted at: 11/8/09 05:27 PM

Archon68 LIGHT LEVEL 22

Sign-Up: 09/09/07

Posts: 3,416

At 11/8/09 04:53 PM, Jomann wrote:
At 11/8/09 04:17 PM, Archon68 wrote: What? "Tile" objects then move them? You mean, tilt them and move them?
like take a picture that repeats on the x and y then have it move across the screen, while endlessly moving.

Oh! I get it.

Just make it so that when the movieclip gets to a certain point on the screen (x=0, for example), it attaches another on the outside of the stage, moving in the same direction.

Here's an example:

http://spamtheweb.com/ul/upload/081109/6 2797_Moving_Tiles.php

If you need more help than just an explanation, tell me and I'll give you a bit of the code. Please try it yourself, first.

I code in AS2, in case I forgot to mention it.

BBS Signature

None

grafik2d

Reply To Post Reply & Quote

Posted at: 11/8/09 09:59 PM

grafik2d NEUTRAL LEVEL 10

Sign-Up: 06/29/04

Posts: 175

At 11/8/09 05:27 PM, Archon68 wrote:
At 11/8/09 04:53 PM, Jomann wrote:
At 11/8/09 04:17 PM, Archon68 wrote: What? "Tile" objects then move them? You mean, tilt them and move them?
like take a picture that repeats on the x and y then have it move across the screen, while endlessly moving.
Oh! I get it.

Just make it so that when the movieclip gets to a certain point on the screen (x=0, for example), it attaches another on the outside of the stage, moving in the same direction.

Here's an example:

http://spamtheweb.com/ul/upload/081109/6 2797_Moving_Tiles.php

If you need more help than just an explanation, tell me and I'll give you a bit of the code. Please try it yourself, first.

If this is what he meant you my firend are a brain ninja. As for the OP re-read yourself before posting and try to figure out if what you wrote make sense for anybody else than you... and brain ninjas.


None

Jomann

Reply To Post Reply & Quote

Posted at: 11/8/09 10:30 PM

Jomann NEUTRAL LEVEL 02

Sign-Up: 07/19/06

Posts: 6

At 11/8/09 05:27 PM, Archon68 wrote:
At 11/8/09 04:53 PM, Jomann wrote:
At 11/8/09 04:17 PM, Archon68 wrote: What? "Tile" objects then move them? You mean, tilt them and move them?
like take a picture that repeats on the x and y then have it move across the screen, while endlessly moving.
Oh! I get it.

Just make it so that when the movieclip gets to a certain point on the screen (x=0, for example), it attaches another on the outside of the stage, moving in the same direction.

Here's an example:

http://spamtheweb.com/ul/upload/081109/6 2797_Moving_Tiles.php

If you need more help than just an explanation, tell me and I'll give you a bit of the code. Please try it yourself, first.

I was able to create what I wanted with tweening. I have a picture that is 2 times bigger than the stage, and is fixed at the top left of the stage, then have it tweened to stop at the bottom right edge of the stage, so when looped it appears to be an endless moving picture.

with that said I was able to do part of what I wanted to do. however if i want another picture to do the same thing (only with a faster speed) then it gets all messed up. here is my working background here: <a>http://spamtheweb.com/ul/upload/08110 9/70136_working.php<a>

and here is where i have my problem with two backgrounds:
<a>http://spamtheweb.com/ul/upload/08110 9/70195_notworking.php<a>
as you can see doing tween animation will not cut it, I need some way of using action script to do the animation. basicly take a 32x32 image and have it tile on the x, and y while moving at a certian speed.
then have a transparent image do the same thing at a faster or slower speed.

the problem is, I do not know how to use action script like this. all i know about is creating menus and if statements some variables and functions, only basic things.
i hope this makes it clearer


None

Jomann

Reply To Post Reply & Quote

Posted at: 11/8/09 10:34 PM

Jomann NEUTRAL LEVEL 02

Sign-Up: 07/19/06

Posts: 6

sorry for double-post

here is a screenshot of where i have the problem, if i wanted both to go smoothly i would have to keep creating frames until they matched, which would be difficult

<a>http://i148.photobucket.com/albums/s3 7/Jomanns_album/showing.jpg<a>


None

Jomann

Reply To Post Reply & Quote

Posted at: 11/9/09 10:32 PM

Jomann NEUTRAL LEVEL 02

Sign-Up: 07/19/06

Posts: 6

BAMPU


None

grafik2d

Reply To Post Reply & Quote

Posted at: 11/10/09 12:00 PM

grafik2d NEUTRAL LEVEL 10

Sign-Up: 06/29/04

Posts: 175

The problem I see with your way of doing this is that you put the tween in the same place, make a mc for each loop and unless you want to control the speed at runtime to slow down or speed up one animation dynamicly you don't need to use actionscript.


None

Jomann

Reply To Post Reply & Quote

Posted at: 11/11/09 03:31 AM

Jomann NEUTRAL LEVEL 02

Sign-Up: 07/19/06

Posts: 6

At 11/10/09 12:00 PM, grafik2d wrote: The problem I see with your way of doing this is that you put the tween in the same place, make a mc for each loop and unless you want to control the speed at runtime to slow down or speed up one animation dynamicly you don't need to use actionscript.

I believe I do, because I can not make the two layers move at different speeds without it causing a problem with looping the animation continually, once one loop finish's the other only goes half way because its going faster than the other, and if i make the slower layer finish first, then when the fast layer finishes it will just stay paused until it starts it loop again.

tl;dr

all i really need to know is the code that makes objects move (without keyboard)
and how to assign a speed to that.


None

grafik2d

Reply To Post Reply & Quote

Posted at: 11/13/09 07:35 AM

grafik2d NEUTRAL LEVEL 10

Sign-Up: 06/29/04

Posts: 175

At 11/11/09 03:31 AM, Jomann wrote:
I believe I do, because I can not make the two layers move at different speeds without it causing a problem with looping the animation continually, once one loop finish's the other only goes half way because its going faster than the other, and if i make the slower layer finish first, then when the fast layer finishes it will just stay paused until it starts it loop again.

This is why you want to put your animation in two separated mc, not on the two layers on the same timeline. Trust me you don't need code.


All times are Eastern Standard Time (GMT -5) | Current Time: 08:50 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!