A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Functions + Components +syntax

  1. #1
    Member
    Join Date
    Aug 2000
    Posts
    87

    Functions + Components +syntax

    So i have several functions setup called:
    Get1();
    Get2();
    Get3();
    etc.

    I have a Component setup that has a parameter called:
    imageNum

    (this parameter is used to attach an exported symbol from the library)

    For a certain action i'm trying to create, i need the imageNum value to become the number for one of the 'Get' functions.

    ie, Get[imageNum]();

    Here is exactly what i'm doing so far:

    on (release){
    i = (Number(Imagenum));
    _root.Get[i]();

    }

    the component's 'Imagenum' value is '1'

    I think my prob is in the 'Get[i]' part, but really not sure.
    Can anyone help? have i been clear?
    thanx
    <<...23...>>

  2. #2
    Senior Member
    Join Date
    Mar 2001
    Posts
    285
    on (release){
    i = (Number(Imagenum));
    _root["Get"+i]();

    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center