3 Replies Latest reply on Aug 19, 2007 11:58 AM by thejokerman05

    Get the name/number from an Array?

    thejokerman05
      Ok, I believe this isn't coded according to AS 3.0 "rules" but I'm just starting to learn this stuff so please have patience...

      But, how can I in my moveForward function get the name/number of the current displaying image and let the user move forward without pulling down the thumbs? (Note that the Arrays are shortened in post for saving space)

      Check it out: www.gregory.se/peter

      Here's the code;

        • 1. Re: Get the name/number from an Array?
          kglad Adobe Community Professional & MVP
          ff_mc and moveForward() probably shouldn't be in startLoad() because they don't need to be repeatedly defined. likewise, none of the other functions in startLoad() need to be repeatedly defined.

          to solve your problem, you can create a parent movieclip for each thumb loader and assign it a property that references the itemNum. you can then retrieve that property in your onClick handler, so you can track the current itemNum, and assign it to a variable that's accessible in your moveForward() function.
          • 2. Re: Get the name/number from an Array?
            kglad Adobe Community Professional & MVP
            or you could use the url property of your loaderinfo object to retrieve the image name and use the flash string methods to extract the jpg number and therefore the array index number.
            • 3. Re: Get the name/number from an Array?
              thejokerman05 Level 1
              Thanks for reply, been on holiday therefore late reply. But I try to move my functions out of StartLoad but then Flash complains that it can't find itemNum. Thats why I have them in there. I've been messing around with the url property with no luck, any advise on how to achieve this?