/ Published in: ActionScript 3
Expand |
Embed | Plain Text
// Calculating the mouse position within an object to percentages in relation to its height // var scale = 100 ( result range from 0 - 100 ) // var scale = 10 ( result range from 0 - 10 ) // var scale = 1 ( result range from 0 - 1 ) trace( ( mySprite.mouseY / mySprite.height) * scale );
You need to login to post a comment.
