Flash Script - Finding Cursor Co-ordinates


Download the sample files here.

1. Create a movieclip from any object.

2. Give the movieclip instance a name – I used "drag".

3. Create two text fields give them variable names xtxt and ytxt.

4. Go to the drag movieclip timeline.

5. Create 2 keyframes as shown below:

Flash Script - Finding Cursor Co-ordinates

6.In the first key frame use the action:

startDrag ("/drag", true);   /:xtxt = getProperty("/drag",_x);   /:ytxt = getProperty("/drag",_y);

7. In the second key frame use the action:

gotoAndPlay (1); 

8. Bravo! You have made your own cool mouse position detector.

Replay

Category: software Time: 2003-04-28 Views: 0
Tags:

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.208 (s). 12 q(s)