-
some general question
So this is for ANYONE to answer. I've noticed that a lot of people program their actionscript differently while reading tutorials. What is this about? Are what I am seeing the differences of actionscript 1.0 and 2.0 or are they different techniques? I also saw one person put the code for ball gravity inside the ball and I saw someone else put it in the main movie and said they were trying to make it more "object oriented"? If anyone and everyone could help clarify these things for me it would be great.
-
[Horse Thief]
I've heard that "Best Practices" says to keep all your code in one place. I would say that having code sprinkled all throughout an .fla is not the best way to do things. For example, I've gone back through some of my early work & thought "where the hell is this function being called?!" & "Where are these variables being set?!?"
Now I (mostly) keep all my code in the first frame. If you've ever tried to buy a Flash template, you know what I'm talking about...
1 Infinite Loop, Cupertino is a portal of Hell.
-
Developing For Dunkets
Some of what you see is the difference between older versions of flash and newer ones. There are a ton of tutorials out there written for flash 5. And, most of those tutorials will still work with versions up to flash 8; cs3 not so much. The difference between putting code on an object and putting code on a layer is user preference. Some things are easier to put on an object, others on a layer. But, like gotoAndCrash said, it's considered bad practice to put code on an object. Code on layers is more versatile because they can handle a larger scope than code on or even in an object. Plus, its much easier to find everything.
-
[Horse Thief]
speaking of CS3, & ActionScript 3, you're no longer even able to put code on an object. Of course you can still put it in an object (on a frame), but it won't allow code on objects.
What that says to me is "break the habit"
1 Infinite Loop, Cupertino is a portal of Hell.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|