Flasher Archive

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


Subject: FLASH: actionscript syntax
From: Pete Blanks
Date: Mon, 8 Nov 1999 15:48:13 GMT

Hello Flashers,

I'm wondering if anybody has the time to help me with this one.
I'm trying to use some actionscripts with some buttons, I'm pretty sure
I've got the logic worked out ok, but I'm having a bit of a problem with the syntax,
here's the problem:

I've got say, 4 buttons: 'A', 'B', 'C', and 'D'.

when you click on each button, it moves to a certain position ie, X=10, Y=10 (this position is the same for each button). I have an animation for each button moving from it's original position to the new position and back again.
What I want to do is this:
If 'A' has been clicked (and moved to X=10, Y=10), when you click on 'B', 'C' or 'D', the actionscript attached to each button will detect which one is at X-10, Y-10 (if any), and play the animation for the button at X-10, y=10 returning to it's original position,
THEN play the animation to move the button that has been clicked up to X=10, Y=10
I hope that's clear enough.
(Oh, I'm keeping track of the buttons by tracking them as movie clips and giving them instance names)

Here's how I think it should go for button 'A' (please ignore the fact that the syntax is all wrong):

On (Press)
If instancename "B" = 10X 10Y
Go to and Play (15) **returns 'B' to it's original position**
Else If instancename "C" = 10X 10Y
Go to and Play (20) **returns 'C' to it's original position**
Else If instancename "D" = 10X 10Y
Go to and Play (25) **returns 'D' to it's original position**
End If
Go To and Play (10) **moves button 'A' to 10X 10Y**
End On

I hope this is clear enough and any help would be greatly appreciated

Many thanks in advance

Pete Blanks


Public Domain Ltd
---------------------------------------------------------------
Making the Net-Work
---------------------------------------------------------------
Web http://www.publicdomain.com
---------------------------------------------------------------
Miva extensions for Dreamweaver

http://www.dreammiva.com




flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

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


Replies
  Re: FLASH: actionscript syntax, John Croteau

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