Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: Re: Help: dynamically using xscale
From: Swain Troy
Date: Mon, 18 Sep 2000 23:43:50 +0100

Thanks Sergio, but I'm still lost.

I have no problem getting a mc to _change_ positions, but I can't get it to
smoothly and dynamically change scale... I can change it's scale, but I
don't know how to set up a loop that let's it grow quick, and then slows
down when it approaches it's final size.

I'm getting lost on how to set up percentages instead of pixels. It will
start to enlarge the mc and then, all of the sudden, it's snaps to it's
final position.


>From: "Sergio Santos" <ssantosatnetlandia [dot] pt>

>I don't know if anyone will post some tested code, but i'll shoot >this
>ideia anyway. :-)
>You can use a while statement, like:
>---
>xpos=256;
>ypos=256;
>act_y=GetProperty("/mc",_y) + 1;
>act_x=GetProperty("/mc",_x) + 1;
>while (act_x != xpos) { // Just an example
>SetProperty("/mc",_x)=act_x;
>SetProperty("/mc",_y)=act_y;
>act_x++;
>act_y++;
>}
>
>---
>For this to work flawlessly you'd need first another routine to check >if
>final x and y are greater than the inicial, so that you increase >the value
>or decrease it.
>An if statement could be used to check if either act_y and act_x
>have reached their final value, so that they stop being incremented.
>You can increment them one at a time, but then you wouldn't have
>diagonal movement.
>
>Another thing... This could be so fast that it wouldn't be noticed...
> >Maybe a time delay function is needed.
>
>The theory is the same for x_scale, y_scale, etc...
>If you use this a lot, the best is to create a function (Flash5).
>
>I wrote this from memory in a few seconds, I have not previously done code
>to do this. Anyway I think that I managed to pass the "idea". :-)
>
>If you need, contact me that i'll do a more "foul proof" code.
>
>Sergio
>----- Original Message -----
>From: "Swain Troy" <redmiasmaathotmail [dot] com>
>To: <flasheratchinwag [dot] com>
>Sent: Saturday, September 16, 2000 3:11 AM
>Subject: FLASH: Help: dynamically using xscale
>
>
> > I have several boxes saved as movie clips.
> >
> > Each has a seperate instance name.
> >
> > When the user clicks certain buttons, all of the MCs are supposed to
> > reorganize themselves (dynamically setting the x and y position) and
>change
> > scale (using xscale and yscale).
> >
> > What I can't figure out is how to have it grow from, say, 100 x 100 to
>256
>x
> > 34 in a smooth manner.
> >
> > The MC could start out from any of five different sizes. I want it to
>grow
> > from whatever it's current size is until it is, for example, 256 x 34
> > pixels.
> >
> > I want smooth movement - similar to Praystation/Kioken's Barney's site
> > (which moves the MC "section" to a new x position; it starts out moving
>fast
> > and then slows down until it reaches the x position of "marker" and
>stops).
> > Here's their code (it's public domain):
> >
> > Set Variable: "marker" = GetProperty ( "/marker", _x )
> > Set Variable: "sections" = GetProperty("/sections",_x)
> > Set Variable: "difference" = marker - sections
> > Set Variable: "move" = difference / 5
> > Set Property ("/sections", X Position) = sections + move
> >
> > Argh... I wish I paid attention in my math classes.
> >
> > troyswainatfunkyafro [dot] com
> > www.funkyafro.com
>
>
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>NudeGuru.com is proud to sponsor the Flasher list
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> IT'S THE ART OF MONEY, HONEY!
> Tips and Advice from some of the most popular Flash
> artists + industry power-brokers on how to hold onto
> your rights, negotiate contracts and get full value
> for your work.http://www.nudeguru.com from Franke James
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>To unsubscribe or change your list settings go to
>http://www.chinwag.com/flasher or email helpatchinwag [dot] com
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: Re: Help: dynamically using x, Randy Kato

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]