Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

FLVplayback contentPath.

Posted on 2006-10-27
24
Medium Priority
?
1,274 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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.
Suggested Courses

650 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