copy and paste your relevant code and highlight the problematic line of code.
Here is my file structure:
- Created movieclip at first frame of main timeline in this movieclip:
- Added FLVPlayback on bottom layer as vPlayer instance name
- Added actions on top frame-
- First frame action is: vPlayer.stop ();
- Second frame actions are: vPlayer.playheadTime = 0; vPlayer.play ();
If I remove all above action then it works well but whenever I include any of the action I get above mentioned error.
If you require any more information, please do let me know.
that code must be on your movieclip's timeline. is it?
and, what works well with no code? does you flv play?
Yes, it is.
I have added code inside movieclip and mp4 plays when I comments the code that mentioned.
just above your code, what does the following show:
I added trace that you have mentioned in first frame and here is output:
Player Name :: vPlayer
Player Source :: courseContent/LN_1324634806568/sampleVideo_01.mp4
VideoError: 1000: Unable to make connection to server or to find FLV on server
that can't be.
did you change the trace() statements in any way?
what is your url and what needs to be done to (try and) play sampleVideo_01.mp4?
This is what I added trace as at first frame:
trace ("Player Name :: " + vPlayer.name);
trace ("Player Source :: " + vPlayer.source);
I have placed sample mp4 file at same location where this SWF resides. In this example - "courseContent/LN_1324634806568". For simplicity we can give mp4's file name directly instade of complete path to test this SWF file as standalone.
To play that video I'm playing that movieclip from second frame. I have loader SWF which loads this SWF containing FLVPlayback, and this loader file request to play from file second frame. Whenever loader file loads another SWF, this flvplayback containing SWF file is made invisible and stop at it's first frame.
in your first frame, replace:
By adding above mention code at first frame resolves the issue, however I another code on second frame which plays the video. Is there similar way that I need to follow?
you don't need anything different in your 2nd frame but you don't need to execute the play() method if your video is already playing so you could use:
p.s. please mark helpful/correct responses.
I did that but it is throwing same error.
There is another code on second frame that I mentioned as playheadTime=0. As I mentioned earlier, that is required since the video page can be viewed another time and it should start from begining.
( Second frame actions are: vPlayer.playheadTime = 0; vPlayer.play (); )
and, if message 9 resolved your problem, mark it as the correct answer.
If I remove that statement then how I can start that from begining. What I have observed, it starts from the position where we left if we don't use that statement.
it doesn't appear you're getting any help from me so let's see if someone else can help you.