-
[F9] Tutorials and Help for Flash 9 AS3
The documentation for Flash 9 and AS3 is currently not very helpful, so I have written 7 tutorials.
Here are the 2 help documents for F9 AS3 on adobe's site(they get lost, jumbled, mixed with flex docs, so I thought I post them here as solid links):
F9 Language Reference
F9 Programming Overview
And here are my tutorials:
Quick Start Guide to F9 and AS3(Not really a tutorial more tips for getting started)
Event Handling: Mouse, Keyboard, Enter Frame...
Simple Movie Clip Duplication
Advanced Movie Clip Duplication with classes(Creating a health/damage class)
About the Document Class
Clearing References for the Garbage Collector
Connecting to a Socket Server
Hopefully these will help you guys out. More tutorials are comming.
Last edited by tonypa; 07-14-2007 at 04:10 AM.
-
Thanks, this will surely help some people out a lot (would have helped me if you had posted it two days earlier ).
-
M.D.
yeah, great stuff, makes it easier to understand
-
Looks like I forgot to upload the document class in the document class tutorial. I've fixed the source files.
-
Just added a new tutorial(Advanced Movie Clip duplication) and I also cleaned up the other tutorials, adding tabs, making it easier to read.
-
You should definately add a tutorial about resource management/garbage collection, which is a lot more involved than it used to be because you can't remove a movieclip from memory anymore like you used to. A very useful link about this subject : http://www.gskinner.com/blog/archive...urce_ma_1.html
-
Feeling adventurous?
I LOVE them!
Before I read them, I found AS3 very hard to understand, and I was planning on using AS2 instead when F9 came, but your tutorial makes it pretty easy to understand
Make more please
I don't have a photograph, but you can have my footprints. They're upstairs in my socks.
-
Style Through Simplicity
Thanks a lot really helps. This will make learning AS3 a lot less tedious. Keep them coming if you can .
Ali
-
I checked the link out Fall_X, however I am pretty sure there is no way to know when an object has be deleted. Objects with event listeners attached will not be deleted by the GC. I could be wrong, but tests I have done have shown that they wont get deleted.
I've just added a small article about the GC about removing your references.
I'm glad you like them, I will definitely make more. I plan to get a couple more up by Saturday.
-
Senior Member
Can some one explain to me what event handleing is?
92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!
-
Do you think you can do a tutorial on the networking capabilities it has?
-
Events are things like mouse clicks, key presses, etc. You can tell flash to listen for when an event occurs. When an event such as a mouse click is triggered, your "event handler" or your function will be called.
You can use addEventListener to tell flash what function or event handler to call when the event is triggered:
Code:
mybutton.addEventListener(MouseEvent.CLICK, MouseClickHandler);
Here we are telling flash to listen to the Mouse click event on mybutton.
When mybutton is clicked it will call our event handler function MouseClickHandler:
Code:
function MouseClickHandler(event:MouseEvent):void {
trace("button is clicked");
}
Events are not limited to mouse clicks and keyboard presses. You can listen for an EnterFrame event, which is triggered every frame, or you could listen for a timer event, so you could call a function every second.
swak:
I was just about to make one . I'll post it later today.
-
Originally Posted by jason merchant
I checked the link out Fall_X, however I am pretty sure there is no way to know when an object has be deleted. Objects with event listeners attached will not be deleted by the GC. I could be wrong, but tests I have done have shown that they wont get deleted.
I've just added a small article about the GC about removing your references.
I'm glad you like them, I will definitely make more. I plan to get a couple more up by Saturday.
Yeah, that's right, I know, but it's something people should be aware of - if you want to remove a movieclip (or sprite), you need to check that you :
- remove it from it's parent (removeChild)
- remove all event listeners
- stop all sounds it has playing, and delete the references to them
- either unparent all it's children or delete/null all references to it's children (and remove events on the children as well), or both - keeping references to it's children while they are still parented to it, means you still have a reference in the parent property of the children, which means no GC
- delete/null all references to it
That should do the trick in most cases. It's a bit tedious, but important.
If I'm not mistaking, unparenting all it's children will make the GC delete it a bit faster, ie on the normal pass. If, on the other hand, you decide to keep the children parented but delete all references to it's children, there's a circular reference thing going on, and it will only get deleted on the next mark and sweep pass - but I'm not sure about this.
-
I just put up the socket tutorial, I hope you like it. I'll write another for binary sockets soon.
-
Hi,
I have a question about Flash 9. I have stopped scripting after Flash 7. So I guess I have missed a lot. I have seen the AS 3 reference and I have to say that it looks like JAVA to me. So my question is what is all the fuss about this Flex environment. Do I need it to use AS 3 or is it just like eclipse (i know it is based on eclipse) an editor that make things a lot easier?
Thanks
-
No you no longer need to use flex to use AS3. You can now download the Flash 9 alpha, which has AS3.
I haven't used Flex, so I can't tell you much about it, but it does not make it easier. Flex serves a different purpose than Flash and does not replace it.
-
What is the purpose of Flex? Is it the next step up from Flash Remoting? Is it better then Flash Remoting?
thanks
-
These were a big help. The best beginner tutorials for AS3 that I've found. Thanks.
-
I would repeat everyone's words:
Great tutorial!
Very simple and clear (even liked the color scheme of the forum display ).
I understood them on the first go even though Iam an AS3 newbie.
I would really love to see more tuts. coming from you
-
thx for the bump,- very good timing right now for me
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
|