Solved

Using external video files in MX 2004

Posted on 2003-11-03
13
229 Views
Last Modified: 2010-04-03
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.
0
Comment
Question by:jtlyonsden
13 Comments
 
LVL 27

Expert Comment

by:negatyve
ID: 9680649
(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.
0
 

Author Comment

by:jtlyonsden
ID: 9680828
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?
0
 
LVL 27

Expert Comment

by:negatyve
ID: 9681212
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Author Comment

by:jtlyonsden
ID: 9682761
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.
0
 
LVL 27

Expert Comment

by:negatyve
ID: 9683049
It does not work in the authoring ambient too (i mean in test mode)?
0
 

Author Comment

by:jtlyonsden
ID: 9683065
It doesn't work in test mode or in the Player.
0
 

Author Comment

by:jtlyonsden
ID: 9690831
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...
0
 
LVL 27

Expert Comment

by:negatyve
ID: 9691270
"/" ? You are not using windows, are you?
0
 

Author Comment

by:jtlyonsden
ID: 9692365
Nope. Mac OS X.
0
 
LVL 5

Expert Comment

by:abdulqabiz
ID: 11024097
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
0
 

Author Comment

by:jtlyonsden
ID: 12160646
I solved the problem myself. Close the question.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12186220
PAQed, with points refunded (500)

Computer101
E-E Admin
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

774 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