Array to call sequential clip numbers

Posted on 2004-11-23
Last Modified: 2008-02-26
I have clips that are numbered sequentially that i call in actionscript as:

this.showback.onRollOver = function(){

is there anyway create an array of other method that would enable me to call the function once, and fillin the numbers (1-8).  Something like

fadeout(clip[num])  ?
Question by:bjv211
    LVL 10

    Accepted Solution

    Best way I know of is to reference them from the parent movie scope, you can then reference them as:
    for(var i = 0;  i<5; i++){

    as I mentioned the holdingClip reference just has to be the next movie up your chain, which could very well be _root.
    LVL 16

    Expert Comment


    Better suggested code will be using an extra variable to store the value first before using
    You may say is only fancy stuff, but it worths, especially for debugging purpose

    temp_clip_name = ""
    for(var i = 0;  i<5; i++)
         temp_clip_name = "clip" add i;

    LVL 1

    Author Comment

    Savong, works great and the coding is basic enough not to have debugging issues...woo

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
    There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
    The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now