How can I draw forms in runtime using actionscript ?

  • flaviosemeao
  • Newbie
  • Newbie
  • flaviosemeao
  • Posts: 10

Post 3+ Months Ago

I am new in Flash, and I already read two Adobe Official Books regarding actionscript 2.0 and I have a big questions for you guys who know much more than me.
How can I draw basic forms like a square, a triangulo, or even a line using actionscript in runtime ? Make the forms draw by themselves while the swf runs instead pop-up in the screen.
Does anybody there who could me help with this issue ?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Hop on over to the LiveDocs here
  • flaviosemeao
  • Newbie
  • Newbie
  • flaviosemeao
  • Posts: 10

Post 3+ Months Ago

UPSGuy, this link that you gave me teachs how to draw shapes and lines, but I was wondering to know if is possible create a code which draws lines and shapes in runtime, like when you open a swf and watch it drawing a shape by itself, where we could set up a time fo this action, like create a square which takes five seconds to get done on the screen ? Got it ?
Do you know any code for this situation ?
  • flaviosemeao
  • Newbie
  • Newbie
  • flaviosemeao
  • Posts: 10

Post 3+ Months Ago

I was wondering if is possible create a code which draws lines and shapes in runtime, like when you open a swf and watch it drawing a shape by itself, where we could set up a time fo this action, like create a square which takes five seconds to get done on the screen ? Got it ?
Guys, do you know any code for this situation ?
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Aaahhh, gotcha. Well, in that case, you need to look into the tween class & its related functions. I suppose there are two possiblities here. You could use the mask tween described here for more complex shapes, or you could simply create a dot & tween it dynamically into lines to form shapes (tween class described here with a nice attribute reference here.)
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

Of course we know. So, if you don't want to go through the long process of learning actionscript, then i'll just point you to the instructions that you need, and which you can search in the flash help.
createEmptyMovieClip
lineStyle
moveTo
lineTo
setInterval
I think these instructions are enough to draw a rectangle in 5 seconds :D
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

you have a fix with the tween class :D

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 16 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.