swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] Catch a mouse click.


From: Chris Flowers
Subject: Re: [Swftools-common] Catch a mouse click.
Date: Wed, 30 Nov 2005 07:50:22 -0500

----- Original Message -----
From: "michelts" <address@hidden>
To: "Chris Flowers" <address@hidden>; <address@hidden>
Sent: Wednesday, November 30, 2005 6:57 AM
Subject: Re: [Swftools-common] Catch a mouse click.


> Ok, thanks :)
>
> I changed my project a bit, reather than using swfcombine and the
> simple_viewer I add a action to "onMouseDown" that change frames...
>
> The code looks like this:
>
> .flash filename="mural.swf"
>
>     .jpeg s1 "mural01.jpg"
>     .jpeg s2 "mural02.jpg"
>     .jpeg s3 "mural03.jpg"
>
>     .action:
>         Stop(); // stop the loop
>         onMouseDown = function() {
>             NextFrame(); // change frame on a mouse click
>         };
>     .end
>
>     .frame 1
>     .put s1
>     .frame 2
>     .put s2
>     .frame 3
>     .put s3
>     .action:
>         onMouseDown = function() {
>             // go back to the first frame
>             gotoAndPlay(1);
>         };
>     .end
>
> .end
>
> This works well, I want to add more functionalities like a backspace
> restart the presentation or a right mouse button click go back a
> frame. The backspace I think the doc of action script could help me
> but I don't think I can trigger a right mouse button click, can't I?
>
> Thanks for help again...
> regards,
>
> --
> Michel Thadeu Sabchuk
> Curitiba - Brasil


gotoAndStop(_currentframe-1);
gotoAndStop(_currentframe+1);

one of these might help or nextFrame() prevFrame()

But be aware the onMouseDown is firing off on ANY mouse down event
when used like this. You may have to manually do a hitTest to check the
mouse xy
if you have buttons on stage too. OnMouseDown may also fire on those button
clicks.

Chris








reply via email to

[Prev in Thread] Current Thread [Next in Thread]