2 Replies Latest reply on Jan 30, 2008 9:29 AM by HeavyPops

    SeekBarHandle

    HeavyPops
      Anyone know how to attach a command to the handle in the SeekBar component?
      I've got the seekbar itself:

      _level0.seekbar.progress_mc.onPress = function()
      {
      trace ("bar");
      }

      ...but can't find the handle.
      Everything I've read indicates the it has a default name of "handle_mc" -or- "seekBarHandle_mc" & that it gets generated on the root level so I tried this (I used this name from the FL debugger instance ID):

      _level0.seekBarHandle.mc.onPress = function()
      {
      trace ("handle");
      }

      ...no luck.
      I also tried placing the component in a movie clip named "seekThis", in which I can effect the component as a whole:

      _level0.seekThis._alpha = 0;

      ...but not the handle:

      _level0.seekThis.seekBarHandle_mc.onPress = function()
      {
      trace ("handle");
      }

      ...no luck.
      Anyone have any ideas, I'm completely out.
      thanx!

      p.s. I've named the SeekBar component "seekbar"
        • 1. Re: SeekBarHandle
          rlc5611 Level 1
          _level0.seekbar.progress_mc.onPress = function()
          {
          trace ("bar");
          }

          The above script works perfectly well for a SeekBar with the instance name "seekbar" residing in the main timeline of a _level0 movie.

          So either your SeekBar isn't really named "seekbar" or it is residing in another path (i.e. in another level or inside a movieclip timeline that you are not correctly referencing.

          Also remember that Flash is case sensitive so "seekbar" and "seekBar" are different instance names.

          And this would not work:

          _level0.seekThis.seekBarHandle_mc.onPress = function()
          {
          trace ("handle");
          }

          because a) you got the instance name wrong, b) you left out a period (should be seekbar.Handle_mc) and c) the thing you seek is not named "Handle_mc". You had it right the first time. The instance name is "progress_mc".

          The first script works. What you need to do is figure out why it is not working for you rather than taking the shotgun approach and using any name that comes to mind hoping to get lucky.
          • 2. SeekBarHandle
            HeavyPops Level 1
            "seekThis" is the movie clip I placed the whole SeekBar in.
            If this isn't done, the handle appears to be generated on the root level from the debugger:

            _level0.seekBarHandle_mc

            ...everything I tried won't attach a function to it. This is what should work ( w/out the "seekThis" container movie ):

            _level0.seekBarHandle.onPress = function()
            {
            trace ("handle");
            }

            ...I think the function that's buried in the class buried in flash somewhere overrides everything else, not very efficient.
            I've found about 20 different posts/people on the web with the same problem.
            All I can say is try it for yourself, it's very frustrating. If you can accomplish it mad kudos to you.
            Thanx for the reply!