Welcome, Guest. Please login or register.
Did you miss your activation email?
31 Jul 2010, 11:48:26 UTC
Forum home
+  flexdeveloper.eu Forum
|-+  Flex and ActionScript 3.0
| |-+  ActionScript 3.0 (Moderators: JMWhittaker, Jan K, thewarpedcoder, James)
| | |-+  Animate User Input
« previous next »
Pages: [1] Print
Author Topic: Animate User Input (Read 398 times)
curio
Newbie FD
*
Posts: 8


« on: 26 Feb 2010, 12:07:59 UTC »

Hello there,

I would like to develop a web application where a user could draw anything they like (a plane, a boat...) and then use the mouse to drag their drawings anywhere they want on the page, or scale them, or make them rotate etc. What would be the best way to implement this?

Thanks!
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #1 on: 26 Feb 2010, 12:19:12 UTC »

A Flash application would be the best way to go.
Logged

curio
Newbie FD
*
Posts: 8


« Reply #2 on: 26 Feb 2010, 14:05:08 UTC »

Hey I thought so too, which is kinda why I'm here! Smiley

Perhaps my question wasn't clear enough: So far, I've learned that using the startDrag method, users could drag a pre-defined object on a webpage, and using the graphics.lineTo method, users could draw anything they want with a mouse. My question is, what if users want to draw a boat, and drag it across the page, or have it enlarged? Is there a method/function in ActionsScript 3.0 for animating non-pre-defined object? Or how can I make whatever drawings (ball, rocket, dog...) users make into an entity (instead of individual lines) for manipulation?

Thanks for your help!
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #3 on: 26 Feb 2010, 15:38:55 UTC »

Draw it all inside a Sprite instead of directly on the stage, then manipulate the Sprite.
Logged

curio
Newbie FD
*
Posts: 8


« Reply #4 on: 01 Mar 2010, 11:28:46 UTC »

What built-in methods can I use for the manipulation? Say if I want users to draw anything they want with a mouse (graphics.lineTo) and then drag their drawings anywhere they want to (mysterious method). What would that mysterious method be? I know there's a startDrag method, but how do I implement an ad hoc eventListener on whatever users draw on stage so they can drag their own drawings?
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #5 on: 02 Mar 2010, 11:29:15 UTC »

Draw inside the Sprite, then apply a mouse down listener to the Sprite, which will allow the user to drag it.
Logged

Pages: [1] Print
« previous next »
Share this on: Twitter Twitter Del.icio.us del.icio.us Digg Digg
Jump to:

©2006-2010 Flexdeveloper.eu/Jodie O'Rourke. All rights reserved.
Adobe®, Adobe® Flash™, Adobe® AIR™ and Adobe® Flex™ are registered trademarks of Adobe Systems Incorporated in the United States and other countries. All rights reserved.

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC