26 Jun 2009
by eviltwinin code, flash
Well, I downloaded the Flash CS4 trial and have been experimenting with it for a day or so.
Overall I’m positive about what I’ll be able to do with the AS3, but a little disappointed in Flash CS4. I’ve never been that excited about the fancy new features in it, although I’m sure I will end up finding them useful. What my problem is, is that there was a few things about the interface and set up that I’d hope they would have improved.
The main one is the colour palette. You still can’t save swatches or custom colours. How annoying! It is also irritating that the ‘Free Transform’ and ‘Gradient Transform’ tools are together – it does get frustrating having to click between them when you are doing a lot of resizing and colour shading.
I have struggled a little today with AS3, but I think a good sit down reading ‘Learning ActionScript 3.0′ will probably let me understand better how it’s structured, then it will be a lot easier to make the transition from AS2 – I’m already am quite fond of the event listener.
04 Jun 2009
by eviltwinin code, flash
Well, in the midst of the Flash interactive feature I’ve been working on, I decided it really was about time I set myself a naming convention to follow when writing Actionscript code. I’ve always been a bit haphazard about how I name things, which in the long run will make it difficult for someone else to understand or to re-use. I also need to remember to use descriptive names for things. This will make it much easier for someone else reading the code to understand what each thing is or what it is doing.
Anyway, this is probably a work in progress, but at least I’ve gotten started!
Read more here: Abobe ActionScript 2.0 Best Practices – Naming Conventions
So, here it is:
Classes
- Start with Uppercase
- Concatenate words, using mixed cases
class MyClass
Functions & Objects
- Start with lowercase
- Concatenate words, using mixed cases
function myFunction
Movie Clips
- Prefix with ‘mc’
- After prefix start with Uppercase
- Concatenate words, using mixed cases
mcMyMovieClip
Constants
- All uppercase
- Separate words should contain underscores
MY_CONSTANT
Number variables
- Prefix with ‘num’
- After prefix start with Uppercase
- Concatenate words, using mixed cases
numMyNumber
String variables
- Prefix with ’str’
- After prefix start with Uppercase
- Concatenate words, using mixed cases
strMyString
Arrays
- Prefix with ‘arr’
- After prefix start with Uppercase
- Concatenate words, using mixed cases
arrMyArray
Boolean expressions
- Prefix with ‘is’
- After prefix start with Uppercase
- Concatenate words, using mixed cases
isThisOn