Flasher Archive

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


Subject: Re: FLASH: collision victim, detection challanged
From: Branden Hall
Date: Sun, 23 Jan 2000 01:30:48 GMT

Is that code in the actual keypress code?
If not you might want to put it there... otherwise, if things are still
acting funny, just send the files my way... ;-) I'll take a gander at them
for you..

-= Branden J. Hall
-= Multimedia Developer/Instructor
-= Fig Leaf Software

----- Original Message -----
From: Larry Eisenstein (E-mail) <eisensteinathome [dot] com>
To: Flasher@Shocker. Com (E-mail) <flasheratshocker [dot] com>
Sent: Saturday, January 22, 2000 7:48 PM
Subject: FLASH: collision victim, detection challanged


> Hi all,
> First I salute all those brave enough to view my retched
> attempt to write a little game. I realize I have violated
> irrepairably the virginal actionscript pop-up window of my
> goddess Flash 4. I realized she was underage...I have no
> excuse. May the programming gods strike me down
> quickly and mercifully.
>
> I want to know how to tell 2 MC's (which I am moving
> right and left with key presses) to go to specific x position
> when they exceeds the left and right x position maximums I have set
> with my variables.
>
> When I initiate movement with keypresses, the MC blows right by
> the limits I've set using the If statements.
> Is it something about keypresses? I get better results without
> the keypresses but I need em for the game.
>
> Set Variable: "Guy1xpos" = GetProperty ("/Guy1", _x )
> Set Variable: "Guy2xpos" = GetProperty ("/Guy2", _x )
> Set Variable: "leftmax" = 0
> Set Variable: "rightmax" = 700
> Set Variable: "Guy2xpos_Leftmax" = leftmax - 140
> Set Variable: "Guy2xpos_Rightmax" = rightmax - 280
> Set Variable: "Guy1xpos_Lefttmax" = leftmax + 140
> Set Variable: "Guy1xpos_Rightmax" = righttmax - 140
> If (Guy2xpos <= Guy2xpos_Leftmax)
> Set Property ("/Guy2", X Position) = Guy2xpos_Leftmax
> End If
> If (Guy2xpos >= Guy2xpos_Rightmax)
> Set Property ("/Guy2", X Position) = Guy1xpos_Rightmax
> End If
> If (Guy1xpos <= Guy2xpos_Leftmax)
> Set Property ("/Guy1", X Position) = Guy2xpos_Leftmax
> End If
> If (Guy1xpos >= Guy2xpos_Rightmax)
> Set Property ("/Guy1", X Position) = Guy2xpos_Rightmax
> End If
>
> Any takers?
> Thanks,
> Larry
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email helpatchinwag [dot] com
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  RE: FLASH: collision victim, detection , Larry Eisenstein (E-mail)

Replies
  FLASH: collision victim, detection chal, Larry Eisenstein (E-mail)

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