A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: _xscale problem...

  1. #1
    Ok lets say you want to take a object, my example is a building. Now you want a string a buildings, one right after the other, each touching the next.

    They start at the center of the stage and move towards the bottom right corner but grow as they are going towards teh corner.

    I am trying to create this effect to be used in a game, so it appears like you are running/drivning through the city fast (the buildings are flying by you)

    I was told _xscale and _yscale are the way to go. I don't understand how to do it though. I mean yes I can write the expression instancename._xscale = 150; instancename._yscale = 150; and make an object get bigger. But how do you make something "grow" or zoom in with this? Combination of MC and the xscale scripting somehow?

    I could make a huge row of buildings and tween it to move and grow but it would seem that it should be simpler to do with scripting

    ANY help would be MUCH MUCH appreciated!

  2. #2
    Join Date
    Nov 2000

    This can be done with a great deal of coding coz u'v got to control - x,y cordinates and xscale and yscale all at the same time.

    U have to code the action script in three frames (minimum)
    1st :
    will initialise the starting postions, duplicate the MC (buildings as u say)

    2nd :
    set all the properties of the movie with minor incriments/changes to the MC so that it seems that you have step forwarded into the street/Road.

    3rd :
    will check the final position from where you can either remove the MC when it has reached the border or you can jump to 2nd frame where it will further proceed.

    hope this helps,

    This is a small example using a similar kind of action script Run Away Button from Mouse

    take care

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center