FLV seek component.

Posted on 2008-11-03
Last Modified: 2013-11-11

I'm wanting to add the functionality to the flv seekbar UI component so that when you click on it, the flv seeks to that point.
I've found a couple if AS3 examples but I need to do this in AS2.

Would anyone have any examples of the AS2 needed to achieve this or provide links to any reference/tutorials?

Thanks in advance.


Question by:crooksy88
    LVL 34

    Accepted Solution

    following code will do the magic:

    // replace 'this' with the reference of base movieClip where seekBar and FLVPlayback instance resides
    // replace "seekBar_mc" with the instance name of "SeekBar"
    // replace "FLVPlybk" with the instance name of "FLVPlayBack instance.
    var myListener = new Object();
    var _this = this; 
    myListener.onMouseDown = function() {
    	if (_this.seekBar_mc.hitTest(_root._xmouse, _root._ymouse, true)) {
    		_this.FLVPlybk.playheadPercentage = _this.seekBar_mc._xmouse;

    Open in new window

    LVL 13

    Author Closing Comment

    Thanks Aneesh ;)
    LVL 13

    Author Comment

    Hi Aneesh,

    Following on from your solution above. Would you know how (or if possible) to get the hand cursor to appear when rolling over the seekbar?

    Using something like :

    _this.seekBar_mc.useHandCursor = true;

    doesn't seem to work.



    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
    I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
    The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
    The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now