Solved

FLVplayback contentPath.

Posted on 2006-10-27
24
1,258 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SCCM 2012 - Deploy Flash 16 7,027
Array is not working ( AS2 ) 4 158
Removing Flash from Website 6 69
Windows 2008 Group Policy - An error occurred. Please try again later 2 96
This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

828 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