7 Replies Latest reply on Apr 26, 2010 3:33 PM by Sean_Wilson

    Controlling Flash sprite with MovieScript & Counting Flash sprites on stage

    miche_r

      I have two questions about flash sprites.

       

      1.How can I count how many Flash sprites there are currently on stage and what are their sprite numbers?

       

      2.Basically the action I'd like to do is to go to a specific frame, wait there until Flash has finished, then print the stage and then go to another frame. If I put this currentframe/totalframe comparison to exitFrame, it works correctly (this script is only for testing):

       

      on exitFrame me

           CF = sprite(17).getFlashProperty("", #currentFrame)
           TF = sprite(17).getFlashProperty("", #totalFrames)

           alert string(CF)

           alert string(TF)


           if CF < TF then
                go to the frame     
           else
                alert "finished" 
           end if
      end

       

      However, if I try to do the same using MovieScript, it only alerts once when the playhead arrives to that frame, and it doesn't do anything when the Flash is finished. There is probably some trick I'm missing here...