Link to home
Start Free TrialLog in
Avatar of jtlyonsden
jtlyonsden

asked on

Using external video files in MX 2004

I have a project that will need to incorporate several video files. From what I've read (and seen), MX 2004 handles video pretty well.

However, I'm having trouble designating local external files to play. I pulled some code from the Flash help files. Here's the sample code I'm using:

//*********************************************************************
// Create a NetConnection object:
var netConn:NetConnection = new NetConnection();
// Create a local streaming connection:
netConn.connect(null);
// Create a NetStream object and define an onStatus() function:
var netStream:NetStream = new NetStream(netConn);
netStream.onStatus = function(infoObject) {
      videoStatus.text += "Status (NetStream)"+newline;
      videoStatus.text += "Level: "+infoObject.level+newline;
      videoStatus.text += "Code: "+infoObject.code+newline;
};
// Attach the NetStream video feed to the Video object:
my_video.attachVideo(netStream);
// Set the buffer time:
netStream.setBufferTime(5);
// Being playing the FLV file:
netStream.play("002Interface.flv");
//*********************************************************************

If I upload the video file (002Interface.flv) to my website and change the last line to:

netStream.play("http://www.mywebsite.com/002Interface.flv")

...it works fine. I've also tried adding "file://" before the file name, but this doesn't work either. I get error messages in my "videoStatus" text box. I am publishing to version 7, so that's not the issue. According to the help files, this should work.

Any ideas? Help would be appreciated ASAP.
Avatar of negatyve
negatyve

(file://  works locally, and using: "file://002Interface.flv" or "002Interface.flv" alone it's actually the same thing)

If you use:

file://002Interface.flv

the 002Interface.flv clip should stay in the same folder where the swf lies.
If you use:

file://fodler/002Interface.flv

it means that the clip is in the "folder" folder, nested in the same folder where the swf file lies.
Avatar of jtlyonsden

ASKER

Yep. It still doesn't work.

I have one folder that contains the SWF, FLA, and FLV files. The FLA file contains nothing but the blank video object ("my_video"), the textarea ("videoStatus"), and the code I included above - all in a single frame. I created this exactly the way the Flash help file describes.

Does this work on your end?
AAAAAARRRRRGGGGGGGHHHHH!!!!!!

I know this is supposed to work, but I'm still not seeing any video. I have the right Player and the right version of Flash. And it works if the movie comes over the Net.

If I publish the movie as a projector, I can see the top video. The other still says "StreamNotFound".

Looks like it's time to call Macromedia support, unless you have any idea this would work on your system and not mine.
It does not work in the authoring ambient too (i mean in test mode)?
It doesn't work in test mode or in the Player.
I figured it out. I have a "/" in the name of one of my folders. As soon as I removed it, it worked.

As soon as I finish banging my head against the wall, I'll continue this project...
"/" ? You are not using windows, are you?
Nope. Mac OS X.
Hi,

>>I figured it out. I have a "/" in the name of one of my folders. As soon as I removed it, it
>>worked. As soon as I finish banging my head against the wall, I'll continue this project...

Is your problem solved?

Regards,
Abdul
I solved the problem myself. Close the question.
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial