Copy link to clipboard
Copied
Please see my SO question here for details: http://stackoverflow.com/questions/17776642/flvplayback-videoplayer-how-to-access-videoplayer-load-m...
Basically, in CS4 (or CS6), I want to call the five-argument version of VideoPlayer.load() that is documented here:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/video/VideoPlayer.html#load()
But I keep getting errors along the lines of "incorrect number of arguments."
Steps to reproduce:
import fl.video.*;
var innerPlayer = vPlayer.getVideoPlayer(vPlayer.activeVideoPlayerIndex);
trace(innerPlayer); // "[object VideoPlayer]" appears in Output window
innerPlayer.load( "RTMP://..." ,
0 // totalTime ,
false // isLive ,
60 // startTime ,
10 // duration );
This should give me a ten-second clip starting from the one-minute mark, but I keep getting errors like
ArgumentError: Error #1063: Argument count mismatch on fl.video::VideoPlayer/load(). Expected 1, got 5.
Copy link to clipboard
Copied
that looks like a documentation error unless there was a player 9 version for which that was valid. otherwise, it looks like it will accept the first 3 parameters.
use other videoplayer methods/properties/events to do what you want.
Copy link to clipboard
Copied
kglad - Thanks for the reply. I would be pretty disappointed if the documentation has been wrong since CS4. Even in CS6 + Flash Player 11, the code doesn't work.
I looked at the documentation, and there don't seem to be any properties I can use to simulate startTime and duration. Any suggestions?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Ah. One thing I should have mentioned is that I don't want the end user to know that there is more video beyond the start time and end time, and the ideal way is to make sure scrub tool doesn't show this.
Copy link to clipboard
Copied
don't use a skin or, at least, don't use one with a playprogress bar.
Copy link to clipboard
Copied
Consider using the OSMF player too: http://osmf.org/
Find more inspiration, events, and resources on the new Adobe Community
Explore Now