Flash
  Home arrow Flash arrow Page 5 - Flash 101 (part 5): Spiralling Out Of Control
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
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? 
Google.com  
FLASH

Flash 101 (part 5): Spiralling Out Of Control
By: Vikram Vaswani, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 4
    2001-01-25


    Table of Contents:
  • Flash 101 (part 5): Spiralling Out Of Control
  • Recycle Bin
  • Rebirth
  • Dynamic Buttons
  • Mousing Around
  • Remote Control
  • Projecting Your Image

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    Flash 101 (part 5): Spiralling Out Of Control - Mousing Around
    ( Page 5 of 7 )

    Next up, actions.

    Actions allow you to add interactivity to a Flash movie, by executing specific commands in response to user actions. Flash comes with a full-featured scripting language, ActionScript, which is very similar to Javascript; you can either manually create scripts, or use Flash's built-in Actions panel to insert actions through a point-and-click mode of operation.

    A number of pre-defined actions are available in Flash, which are more than sufficient for basic requirements; you've already seen one of them, the Get URL action, in last time's article. Typically, these actions are triggered in response to either a mouse or keyboard event, or when a specific frame is reached in the animation sequence.

    When you specify an action for a button, Flash automatically inserts an onMouseEvent handler to it - this specifies whether the action is to be triggered when the mouse button is pressed or released, when the mouse pointer rolls over the button or when it rolls outside it, or when the user drags the pointer over the button. Additionally, you can specify an action to be triggered when the user taps a specific key on the keyboard.



    For example, this code snippet specifies that the Flash player stop playing the animation sequence when the user releases the mouse button, or taps the X key on the keyboard.


    on (release, keyPress "X") { stop (); }
    In a similar manner, you can assign actions to a movie clip - Flash automatically inserts an onClipEvent handler, which can trigger actions based on mouse movement, keyboard entry, or at specific positions in the clip.



    Finally, you can also assign actions to a specific keyframe in the clip by right-clicking the frame and selecting the Actions command on the shortcut menu.

    Note that you should use the Control -> Test Movie command to test whether or not your actions are working correctly.

    This article copyright Melonfire 2001. All rights reserved.

     
     
    >>> More Flash Articles          >>> More By Vikram Vaswani, (c) Melonfire
     

       

    FLASH ARTICLES

    - An Overview of Flash and ActionScript
    - Building Web Forms In Flash
    - Building Data-Driven Flash Movies
    - Flash 101 (part 6): The Final Countdown
    - Flash 101 (part 5): Spiralling Out Of Control
    - Flash 101 (Part 4): Don't Touch Me!
    - Flash 101 (part 3): Bouncing Around





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek