Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: Double Click Problems |
From: | Helen Triolo |
Date: | Sun, 2 Apr 2000 00:57:22 +0100 |
Barranger Ridler wrote:
>
> Hello there,
>
> I am having some serious troubles with creating a double click event. What
> I have is a Button item inside of a Movie Clip item and when you double
> click on the Button I want the Movie Clip to go to and stop at frame 2.
> Here is the code for the first frame in the movie clip:
>
> Set Variable: "OldTime" = 0
>
> Then the code for the instance of the button is:
>
> On (Release)
> If ((GetTimer - "OldTime") < 500)
> Go to and Stop (2)
> Else
> Set Variable: "OldTime" = GetTimer
> End If
> End On
>
That looks like it would just count the time from arriving at frame 1
til the user clicked the button. I think you want something like this
(haven't tried it):
Set Variable: click=1
Set Variable: time1=1000
Set Variable: time2=2000 (some big number so the diff is >500)
Then the code for the instance of the button is:
On (Release)
if click=1 (first click)
Set Variable: "time1"=GetTimer
Set Variable: "click"=2 (shows already clicked once)
else (must be second click)
Set Variable: "time2"=GetTimer
Set Variable: "click"=1 (reset--maybe not necessary)
end if
If (("time2" - "time1") < 500)
Go to and Stop (2)
else
click=1 (too much time in between, so reset everything)
Set Variable: time1=1000
Set Variable: time2=2000
end if
End On
That's a start--you might have to modify it a bit.
Regards,
Helen
__________________________________________________________________
i-Technica: Innovative Internet Solutions (http://i-Technica.com)
designeri-technica [dot] com
301-424-6037
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California
-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: Double Click Problems, Barranger Ridler
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]