Want a simple demo of mouse drag event

Questions on using the Translate actionscript compiler.

Want a simple demo of mouse drag event

Postby vishalvyas » Wed Jun 02, 2010 8:05 am

Hi every one,
I want a simple demo code for mouse drag event using translate and transform.
When i drag mouse to left an image should be changed and when i drag mouse to right again an image should be changed.
I want to make a 3d type view using different images but using mouse events...
Please if any one can help..
thanks in advance...... 8)
vishalvyas
 
Posts: 1
Joined: Mon May 31, 2010 3:02 pm

Re: Want a simple demo of mouse drag event

Postby smackay » Mon Jun 07, 2010 1:49 pm

Attached is the BasicScript example taken from the cookbook along with two sample scripts: startdrag.as contains event handlers for dragging around the shape created by the java code when the mouse is down, visible.as shows how to change the visibility of the shape when the mouse is down.

These should give you a reasonable start by showing you how to create movie clips and how to control the clip using actionscript. From there it should be simple to extend the code to implement what you want. Take a look at the BasicImage example to see how to display shapes. From there it should be simple to extend BasicScript to display the image in the movie clip.

Let me know if you need any help.

Regards,

Stuart
--
Flagstone Software Ltd.
Attachments
visible.as
Sample actionscript to change the visbility of a movieclip
(99 Bytes) Downloaded 13 times
startdrag.as
Sample actionscript to drag a movie clip around the screen
(83 Bytes) Downloaded 12 times
BasicScript.java
Java code showing how to control a movie clip using Actionscript.
(6.3 KiB) Downloaded 14 times
smackay
Site Admin
 
Posts: 499
Joined: Sat Sep 03, 2005 9:04 am


Return to Using Translate

Who is online

Users browsing this forum: No registered users and 1 guest

cron