FLVplayback contentPath.

I need to be able to set the contentPath from my FLVplayback, but I cann't get it to work.

if I do this on my swf file it works.

myFLVPlayer.contentPath = "myvideo.flv";

but when I send the movie name from the HTML page it doesn't work.
I created a falshVar so I can send it to my swf file. Here is my code... also I have a debug textbox to see if the name is correct.

*****
I can get the name to display on my textbox.
debug.text = trace(_root.flvFileName);

but when I set the contentPath to my trace(_root.flvFileName); it doesn't work.

How can I do that? I just need to set the contentPath on my FLVPlayback.
LVL 1
EnnioAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
FLAASHERConnect With a Mentor Commented:
:)

nice

FLAASHER
0
 
FLAASHERCommented:
u mean that this line dosnt work :

myFLVPlayer.contentPath = _root.flvFileName;

if yes plz let me se ur files without the FLV file


FLAASHER
0
 
EnnioAuthor Commented:
no this doesn't work.

do you want to see my html file?
here is the html file.


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="550" height="400" id="player" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="player.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" VALUE="flvFileName=HITN_promo.flv" />
<embed src="player.swf" FlashVars="flvFileName=HITN_promo.flv" quality="high" bgcolor="#ffffff" width="550" height="400" name="player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
0
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
FLAASHERCommented:
also need ur FLA file plz

FLAASHER
0
 
EnnioAuthor Commented:
on my fla file I have a FLVPlayback that I called myFLVPlayer in one layer,
and I have another layer with this action script; myFLVPlayer.contentPath = _root.flvFileName;

that's it.

0
 
EnnioAuthor Commented:
i got it to work
I forgot to import import mx.video.*;
0
 
FLAASHERCommented:
Thanks for points :)

FLAASHER
0
 
EnnioAuthor Commented:
thanks for the help.
0
 
EnnioAuthor Commented:
one question.
Why it always play the first movie that I load?
If I send another movie to play it will not play the new movie, always play the old one.
0
 
FLAASHERCommented:
mmmmmmmmm
really dont know .... i think its better to use video class
its better than FLVplayback

when u use video class u make only  one netconnection class to it
then u can make multi net stream class instance .... every instance will display difent flv file

video class is the beat way to display FLV ... it gives you alot of option to controll ur FLV files easly


FLAASHER
0
 
EnnioAuthor Commented:
But can I send the name of the video using the html lik what I'm doing now?
0
 
EnnioAuthor Commented:
I need this because I have 3 movies to display in different pages, and I don't want to make one SWF for each page, I would like to create on player and just send the flash video file to the player.
0
 
FLAASHERCommented:
yes u can
its take the name of the flv file using action scrip ..... and u have the name as a vriable on the _root ..... so u can use it  :)


FLAASHER
0
 
EnnioAuthor Commented:
I'm going to try it here
0
 
FLAASHERCommented:
open new file
open library
from the lable of the library panel click the right of the lable of the panel
chose new video and chose it as action script cotrolled then press ok
it will apper on ur library    ...... drag it from library into the stage
give it instance name " theVideo " 

go to frist frame and put this action :


var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns:NetStream = new NetStream(nc);

theVideo.attachVideo(ns);
ns.play("ur flv file here.flv");

FLAASHER

0
 
EnnioAuthor Commented:
great that works much better..

:)
0
 
FLAASHERCommented:
:)


U welcome
0
 
EnnioAuthor Commented:
one more question, can I use the skins that they have on the FLVplayback?
Or I need to create my?
0
 
FLAASHERCommented:
u can modify it as u like and use any clors u want but it need alot of action to do it ... :)

FLAASHER

0
 
EnnioAuthor Commented:
FLAASHER,
     I have the movie working, and when I load the movie I don't see the play,pause, etc from the control. Do I need to add all of it? Or is there a easy way that I can add everything like using the FLVPlayback?
0
 
FLAASHERCommented:
no ... u need to make it ur self and it need alot of action to make it ... realy its not easy to explain it here


FLAASHER
0
 
EnnioAuthor Commented:
do you know any good tutorial?
I did play, and pause. I would like to add a few others.
0
 
EnnioAuthor Commented:
Flaasher do you know where can I find any flash video player controls to download? like the play button, pause, etc...
0
 
FLAASHERCommented:
u can draw it your self and convert it into buttons


FLAASHER
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.