Solved

FLVplayback contentPath.

Posted on 2006-10-27
24
1,252 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
 
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

758 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

19 Experts available now in Live!

Get 1:1 Help Now