Flasher Archive

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


Subject: Re: FLASH: Calling a function from an instance to change itsposition
From: Not In My Backyard!
Date: Sat, 23 Sep 2000 00:10:11 +0100

Have you tried:

_root[passed_Object_Name]._x += passed_Speed




>Hi there
>
>I have created a generic function taht when called should move an object
>
>///////////////////////////////////////////////////////////////////////
>// Function to move an object in a certain direction at a certain speed
>///////////////////////////////////////////////////////////////////////
>
> function Move_Object (passed_Object_Name, passed_Direction,
>passed_Speed) {
>
> if (passed_Direction=="Right") {
>
> passed_Object_Name._x=passed_Object_Name._x+passed_Speed;
>
> }
>
> } // End of function
>
>I have used trace to check the values of the parameters being passed and
>they are all as expected.
>Now I have a baddie whose instance is called "Baddie1" that calls this
>function passing the values of the three parameters. However it is not
>changing the x position of the Baddie.
>
>If I replace the line
>
>passed_Object_Name._x=passed_Object_Name._x+passed_Speed;
>
>with
>
>Baddie1._x=Baddie1._x+passed_Speed;
>
>it works.
>
>However this is unacceptable because I want to use this function to move
>several different characters.
>
>Can anyone see why it is not working - I have checked the value of
>passed_Object_Name and it is correct
>i.e Baddie1
>
>Thanks
>
>Paul
>
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>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


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: Calling a function from an in, Paul Steven

Replies
  FLASH: Calling a function from an instan, Paul Steven

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