Skip to main content
Participating Frequently
June 15, 2006
Answered

playing an .FLV

I'm playing an .FLV from a server using MediaController and MediaDisplay components with Flash 7 player. The MediaDisplay needs the URL as one of its parameters but I'd like to use a variable as a URL so I can play whatever .FLV file I want as defined in Actionscript. I tried out several theories on this unsuccessfully. Any easy answers out there? In case it matters, the MediaDisplay is contained within a movie clip and the controller is on the root level.
thank you
This topic is closed to new replies. Start a new post to keep the conversation going.
Newsgroup_UserCorrect answer
Inspiring
June 15, 2006
gmerrilllee,

This ...

var ns=NetStream = new NetStream (nc);

... should be this ...

var ns:NetStream = new NetStream (nc);


David
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."


8 replies

Participating Frequently
June 15, 2006
How about capitalizing the v in "attachVideo"?

Yes, that works!
Translate
Participating Frequently
June 15, 2006
CORRECTED VERSION

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

theVideo.attachvideo(ns);

ns.play(" http://www.portfolionewengland.com/try1.flv");
Translate
Newsgroup_UserCorrect answer
Inspiring
June 15, 2006
gmerrilllee,

This ...

var ns=NetStream = new NetStream (nc);

... should be this ...

var ns:NetStream = new NetStream (nc);


David
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."


Translate
Participating Frequently
June 15, 2006
Nope. Still doesn't display video.
Translate
Participating Frequently
June 15, 2006
whoops, I just caught the typo in line 3. I'll try it again.
Translate
Participating Frequently
June 15, 2006
I'm now trying to make my own controller. I followed a tutorial and have the actionscript word for word. When I play the movie I get the audio portion but no video.



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

theVideo.attachvideo(ns);

ns.play(" http://www.portfolionewengland.com/try1.flv");
Translate
Inspiring
June 15, 2006
gmerrilllee,

>> I'm playing an .FLV from a server using MediaController
>> and MediaDisplay components with Flash 7 player.

Okay. :)

>> I tried out several theories on this unsuccessfully. Any easy
>> answers out there?

Heh, what did you try? Can we see your code?


David
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."


Translate
Inspiring
June 15, 2006
Hi!

You can learn how to create your own .flv player at
http://www.gotoandlearn.com/
(check out video basics 1 to 8).
This might also give you answer to your current question.

I hope it can be of some help.

/Jensen/


"gmerrilllee" <webforumsuser@macromedia.com> wrote in message
news:e6ri1r$rqk$1@forums.macromedia.com...
> I'm playing an .FLV from a server using MediaController and MediaDisplay
> components with Flash 7 player. The MediaDisplay needs the URL as one of
> its
> parameters but I'd like to use a variable as a URL so I can play whatever
> .FLV
> file I want as defined in Actionscript. I tried out several theories on
> this
> unsuccessfully. Any easy answers out there? In case it matters, the
> MediaDisplay is contained within a movie clip and the controller is on the
> root
> level.
> thank you
>


Translate