A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Help with slider to control movie

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    2

    Help with slider to control movie

    I have created a flash slider that lets you control the flash movie. I am able to go to a particular frame when I move the slider using startDrag. But inspite of using Movie.gotoAndPlay, it just stops at the frame. It behaves as a gotoAndStop event. The code is

    this.onEnterFrame=function(){
    ratio.text=mySlider.ratio;


    if (ratio.text == 1 )
    { this.gotoAndPlay(1);
    }
    if (ratio.text == 2 )
    { this.gotoAndPlay(11);
    }
    if (ratio.text == 3 )
    { this.gotoAndPlay(21);
    }
    if (ratio.text == 4 )
    { this.gotoAndPlay(30);
    }
    if (ratio.text == 5 )
    { this.gotoAndPlay(40);
    }
    if (ratio.text == 6 )
    { this.gotoAndPlay(50);
    }

    }


    Where am I going wrong. Any help would be appreciated.

  2. #2
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    You better ask in the actionScript forum

  3. #3
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Moved to actionscript.
    - The right of the People to create Flash movies shall not be infringed. -

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    because of the loop (the enterFrame) the playhead is constantly sent to the frame and never plays past it, thus the impression of 'stopping'.

    You should make a function that would delete the enterFrame, THEN send the playhead to gotoAndPlay()

    gparis

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