Flash
  Home arrow Flash arrow Page 3 - Using Function: The Beginner's Nightmare
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
FLASH

Using Function: The Beginner's Nightmare
By: Aleksandar Horvat
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 20
    2004-10-27

    Table of Contents:
  • Using Function: The Beginner's Nightmare
  • Function statement
  • Do you like functions?
  • More on reusability: practical example
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using Function: The Beginner's Nightmare - Do you like functions?


    (Page 3 of 5 )

    During the course of my work, I meet many Flash developers that were skeptic about functions earlier in their careers with Actionscript. They prefer to be sure that code will work and the simplest solution seems to be copying code all over the place. Functions look difficult to beginners, but in fact, they are not. I encouraged many of my work mates to start to use advanced scripting, and to include functions. Once they discover the practical aspect of using functions, they could not write even the smallest piece of code without them. Many times, you’re aware that function you just wrote is practical piece of work and you may wish to store it in some kind of library for future usage.

    Where is the line between basic and advanced ActionScripting?

    As you probably guessed, beginners without previous object oriented programming experience usually stop to develop their knowledge when it comes to functions. Functions just seem to be too complicated to them. Once they get through, the door to advanced programming opens, and very soon they will grab for more and more features. Using functions is where users start to think of themselves as advanced users and get on with serious work. How this fact reflects to your professional ambitions?

    If you allow yourself to get scared by the function declaration, you are probably not professional Flash Web developer material. There is a moment when your experience pushes you for more complex solutions and when you become aware that your current knowledge is not enough to accomplish it. You may achieve great things with just basic Flash statements, but when you want to upgrade or maintain your code you will eventually find out that you are not familiar with that mess any more and that you are creating more and more bugs. This is the breaking point. If you decide to rewrite the code in a more professional manner -- considering good coding practice -- you are probably on the right path to become advanced Actionscript programmer. Yes, the first option to consider is using functions to simplify, centralize and modularize your code. After that, your learning curve will increase rapidly.

    More Flash Articles
    More By Aleksandar Horvat


       · This is the most basic of introductions. S/he could have been more instructive if...
     

    FLASH ARTICLES

    - Using XML and ActionScript with Flex Applica...
    - Interfaces and Events with ActionScript and ...
    - Manipulating Data with ActionScript in Flex ...
    - ActionScript Syntax for Flex Applications
    - ActionScript in Flex Applications
    - A Closer Look at Apollo`s File System API
    - Using the File System API
    - ActionScript 101
    - Flash Buttons
    - Advanced Flash Animation
    - Creating Your First Animated Movie with Flas...
    - Flash: Building Blocks
    - Building Preloaders
    - Fun Things to Do with Movie Clips in Flash MX
    - Referencing Movie Clips in Flash MX







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway