Solved

FLVplayback contentPath.

Posted on 2006-10-27
24
1,257 Views
Last Modified: 2012-06-21
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.
0
Comment
Question by:Ennio
  • 13
  • 11
24 Comments
 
LVL 13

Expert Comment

by:FLAASHER
ID: 17824287
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
 
LVL 1

Author Comment

by:Ennio
ID: 17824295
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
 
LVL 13

Expert Comment

by:FLAASHER
ID: 17824304
also need ur FLA file plz

FLAASHER
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 1

Author Comment

by:Ennio
ID: 17824314
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
 
LVL 1

Author Comment

by:Ennio
ID: 17824321
i got it to work
I forgot to import import mx.video.*;
0
 
LVL 13

Accepted Solution

by:
FLAASHER earned 500 total points
ID: 17824323
:)

nice

FLAASHER
0
 
LVL 13

Expert Comment

by:FLAASHER
ID: 17824327
Thanks for points :)

FLAASHER
0
 
LVL 1

Author Comment

by:Ennio
ID: 17824329
thanks for the help.
0
 
LVL 1

Author Comment

by:Ennio
ID: 17824362
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
 
LVL 13

Expert Comment

by:FLAASHER
ID: 17824374
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
 
LVL 1

Author Comment

by:Ennio
ID: 17824381
But can I send the name of the video using the html lik what I'm doing now?
0
 
LVL 1

Author Comment

by:Ennio
ID: 17824387
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
 
LVL 13

Expert Comment

by:FLAASHER
ID: 17824389
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
 
LVL 1

Author Comment

by:Ennio
ID: 17824393
I'm going to try it here
0
 
LVL 13

Expert Comment

by:FLAASHER
ID: 17824397
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
 
LVL 1

Author Comment

by:Ennio
ID: 17824402
great that works much better..

:)
0
 
LVL 13

Expert Comment

by:FLAASHER
ID: 17824404
:)


U welcome
0
 
LVL 1

Author Comment

by:Ennio
ID: 17824405
one more question, can I use the skins that they have on the FLVplayback?
Or I need to create my?
0
 
LVL 13

Expert Comment

by:FLAASHER
ID: 17824409
u can modify it as u like and use any clors u want but it need alot of action to do it ... :)

FLAASHER

0
 
LVL 1

Author Comment

by:Ennio
ID: 17824466
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
 
LVL 13

Expert Comment

by:FLAASHER
ID: 17824471
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
 
LVL 1

Author Comment

by:Ennio
ID: 17824475
do you know any good tutorial?
I did play, and pause. I would like to add a few others.
0
 
LVL 1

Author Comment

by:Ennio
ID: 17826983
Flaasher do you know where can I find any flash video player controls to download? like the play button, pause, etc...
0
 
LVL 13

Expert Comment

by:FLAASHER
ID: 17827130
u can draw it your self and convert it into buttons


FLAASHER
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

813 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

16 Experts available now in Live!

Get 1:1 Help Now