We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › actionscript conversion.
Page Index Toggle Pages: 1
actionscript conversion. (Read 628 times)
actionscript conversion.
Dec 9th, 2005, 12:08am
 
Hi, I'm very new to processing, been at it for 30 minutes now ; ) I was making some line drawings having alot of fun but now I've faced some problems.
In flash if I want to clear the stage(drawing area) i call clear() an everything drawn with code goes away. In processing I called background(), it gave the same result but is it the right way to do this? also it poses a new problem can I change the background without clearing the stage? In flash I would create an emptyMovieClip and draw inside of that but I have'nt figured out how to do this in processing.

Thanks in advance, Tobias.
Re: actionscript conversion.
Reply #1 - Dec 9th, 2005, 8:40am
 
I also had some problems coming from actionscript when I first started. The idea of having persistent visual movieclips doesnt exist in Processing. Basically you clear the stage every frame and redraw everything that you need on the stage every frame as well.
Sounds strange, but thats how flash does it as well - without you noticing Smiley

Here is a good table that compares different languages: http://processing.org/reference/compare/index.html

A good way to get to start is to code everything in classes, and every class has its draw function. From the central draw function you call the instances draw functions. This was you can turn on/off what you want to see on the stage easily.
Re: actionscript conversion.
Reply #2 - Dec 9th, 2005, 3:25pm
 
Thanks alot. I guess i'll have to really learn how to code. Better by that book on processing when it's ready.
//Tobbe
Page Index Toggle Pages: 1