SWF Controller In Main Timeline
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: SWF Controller In Main Timeline

  1. #1
    Registered User
    Join Date
    Jul 2013
    Posts
    1

    SWF Controller In Main Timeline

    Hi Ya`
    I found the Play Media object to play video and images in KM 8, I can use that for .flvs. I want to create a controller (Play Bar) in the main timeline of the swf to control itself.

    The buttons have been ez enough... stop/play/mute, but I need a slider that the user can scrub and click to jump around in the swf. I can't figure out how to hook the slider component to the timeline so the slider accurately reflects the frame position of the swf while playing.
    I did search the KM forum, read the chm help file, the v5.6 pdf help file and checked applicable xamples.
    I might be missing something real obvious.

    Thanks in advance... Jack

  2. #2
    Super Moderator
    Join Date
    Jun 2000
    Posts
    3,236
    I am not expert enough at AS3 to provide the final answer. One of the problems is that action script doesn't tie well into the frame-based timeline. You can probably get a rough correlation using the relationship between tweens and time which is 1/fps (movie speed).

  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    example

    JackieBoy.fun

    Sorry it took me a minute to whip this up as I'm a little out of practice, But here is a simple example of what you want

    basically just created a simple 10 frame movie and added a scrollbar then did the code as

    code:

    slider1.addEventListener("scroll",update);
    slider1.setScrollProperties(1, 1, 10, 1);

    //setScrollProperties(pageSize:Number, minScrollPosition:Number, maxScrollPosition:Number, pageScrollSize:Number = 0):void
    function update(e:Event){
    trace(e.currentTarget.scrollPosition);
    root.gotoAndStop(int(e.currentTarget.scrollPositio n));
    }

    stop();


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

Poll by Flashkit.com