Flash
  Home arrow Flash arrow Page 3 - Basic Flash ActionScript for Designers
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  
Mobile Linux 
App Generation ROI 
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

Basic Flash ActionScript for Designers
By: Adi Reddy Mora
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 117
    2005-06-01

    Table of Contents:
  • Basic Flash ActionScript for Designers
  • Buttons, Movie Clips, and Making them Draggable
  • Navigating, URLs, and Loading Images
  • Loading External MP3 Files

  • 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


    Basic Flash ActionScript for Designers - Navigating, URLs, and Loading Images


    (Page 3 of 4 )

    Navigate between scenes

    Scenes in Flash can be used to organize your document into discrete sections. You can control the navigation between scenes through AcrionScript using the scene name and usinggotoAndStop() or gotoAndPlay() methods. Here are a couple examples:

    // Sends the playhead to the first frame of “Scene 2”
    // and stops
    gotoAndStop("Scene 2", 1);

    // Sends the playhead to the first frame of “Scene 1”
    // and plays
    gotoAndPlay ("Scene 1", 1);

    Opening a URL from Flash

    You can open a URL from a button or on a movie clip using getURL() method. It accepts three parameters: URL, window, and variables sending type.

    URL is a valid path to a specific page or web site.

    Window is an optional parameter specifying the window or HTML frame into which the document should load. You can enter the name of a specific window or select from the following reserved target names:

    _self
    specifies the current frame in the current window

    _blank
    specifies a new window

    _parent
    specifies the parent of the current frame

    _top
    specifies the top-level frame in the current window

    Variables sending type is the GET or POST method for sending variables. Omit this parameter if there are none. The GET method appends the small numbers or variables to the end of the URL. The POST method sends long strings of variables in a separate HTTP header.

    // Opens the site devarticles.com in a new window and sends the variables
    // from flash using POST method.

    getURL(“http://www.devarticles.com”, “_blank”, “POST”);

    Loading an external JPEG/SWF into a movie

    You can load JPEG and SWF files into your flash movie at runtime instead of importing them into flash while authoring. There are a couple of ways to do this but the easiest is using the loadMovie() method of the movie clip class. That allows you to control the movie clip to perform actions on the loaded file.

    // Loads ani.swf file into anim_mc Movieclip.
    anim_mc.loadMovie(“ani.swf”);

    // Loads a JPG file.
    anim_mc.loadMovie(“ani.jpg”);

    More Flash Articles
    More By Adi Reddy Mora


       · Sir my name is "GagandeepCheema", Since few days I am trying to get forward with...
     

    FLASH ARTICLES

    - Decorator Pattern
    - Organizing Frames and Layers for Flash Anima...
    - Organizing Frames and Layers
    - 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






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT