We help IT Professionals succeed at work.
Get Started

SwishMax movie timeline

1,109 Views
Last Modified: 2010-08-05
Experts,

I am using SwishMax swish to create a product demonstration.  I have created 9 scenes in total, and I am currently trying to add a movie timeline bar, across the bottom of the demo.

I have used SwishMax's movie control tutorial however this is designed to work with one scene only.  I have added the timeline to each scene, in the same position however, when the next scene starts, the timeline flickers,  but it does continue from the current position, and it does not revert back. Also, the timeline is longer than my movie.  Here is the code part for the timeline control;

onLoad () {
  isDragging = false;
  // **** Get the initial width of the progress bar ****
  progressWidth = _parent.progressBar._width;
  // **** Set the width of the progress bar for the start ****
  _parent.progressBar._xscale = .1;
  // **** Place the slider bar to the far left for the start of the movie ****
  this._x = 0;
}
onEnterFrame() {
  if (isDragging) {
    // **** Control the animation based on the position of the slider bar ****
    _root.gotoAndStop(Math.floor((_root._totalframes / _parent.sliderTrack._width) * this._x));
    // **** Resize the progress bar to match the animation and slider bar ****
    _parent.progressBar._xscale = (this._x / _parent.sliderTrack._width) * 100;
  } else {
    // **** Reposition the slider bar to match the animation ****
    this._x = (_parent.sliderTrack._width / _root._totalframes) * _root._currentframe;
    // **** Resize the progress bar to match the movie's progress ****
    _parent.progressBar._xscale = ((this._x / _parent.sliderTrack._width) * 100) - .1;
  }
}

Please help.
Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE