dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: FLVPlayback

  1. #1
    Junior Member
    Join Date
    Dec 2005
    Posts
    3

    FLVPlayback

    I have a problem. When i use this component to display a video on my webpage, it starts downloading the file in "contentPath" immediately.. even if autoplay is false. I don't want this.. I want it to download only when a user clicks on the play button.
    Is there a way to do this?
    I tried something like this:
    var listenerObject:Object = new Object();
    listenerObject.stateChange = function(eventObject:Object):Void {
    myFLV.contentPath="movie.flv";
    };
    myFLV.addEventListener("stateChange", listenerObject);

    ...but it doesn't work.

  2. #2
    Junior Member
    Join Date
    Nov 2005
    Posts
    28
    Uhm ? how about ,,, just add an extra first frame "in which you will just have your navigation with the play button, add an stop(); action on it
    and on the play button have the
    on(release)
    {gotoAndPlay(2);
    }

    of course you have to move your whole move up one frame...
    one idea, the other one ,,

    you could have a two movies, and the first one would be qui9te simple ,, again whatever you want on it and the play button, and just have an action to open load the main movie

  3. #3
    Junior Member
    Join Date
    Dec 2005
    Posts
    3
    thx.. i'll try that

  4. #4
    Junior Member
    Join Date
    Dec 2005
    Posts
    3
    ok i found the solution!
    - make one extra very small .flv movie as you said.
    - make 2 key frames
    - put the dummy movie on the first frame and the real movie on the second frame.
    - give the dummy movie an instance name, like "myFLV"
    - set the dummy movie parameters: autorewind = false, autoplay = false.
    - set the real movie parameters: autoplay = true
    - now add this actionscript on the first frame:
    PHP Code:
    stop();
    var 
    listenerObject:Object = new Object();
    listenerObject.playing = function(eventObject:Object):Void {
        
    gotoAndStop(2);
    };
    myFLV.addEventListener("playing"listenerObject); 
    that's it!.. now the real movie won't start auto-downloading and eat bandwidth. But it will start playing immediately when a user clicks "play".. in other words it's a streaming movie.
    A little strange that Macromedia didn't make a parameter "auto-downloading" for FLVPlayback that you can set.

    ps: your simple approach doesn't work, cause you can't control the buttons individually. The skin is integrated with the FLVPlayback component.
    Last edited by BuckyBoy; 12-30-2005 at 07:26 AM.

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