-
Problem with FLV running in IE 6
Hi,
For some reason, I'm having a problem loading an FLV using the NetConnection stream. It works fine while doing a "test movie" in Flash, but in IE, no video loads. I've tried relative and absolute paths to the video while making sure the content path URL in Flash matches the URL loaded in the browser, so as to avoid any Sandbox issues, and still -- no video.
As a note, I'm loading the content from an XML file, with the relative path to the video (which is just a test file) being "videos/stupidDog.flv". As mentioned, I've tried an absolute path like "http://www.mydomain.com/videos/stupidDog.flv", but no difference.
Any help would be greatly appreciated, as always. Here's the code:
Code:
//play video if included
if (content_array[section_num].video_str.length > 0) {
//init video MC
_root.attachMovie("video", "video_mc", ++depth_num);
video_mc.createEmptyMovieClip("loadBg_mc", video_mc.getNextHighestDepth());
with (video_mc.loadBg_mc) {
beginFill(loadColor_num, loadAlpha_num);
moveTo(0, 0);
moveTo(video_mc.myVideo.width, 0);
moveTo(video_mc.myVideo.width, video_mc.myVideo.height);
moveTo(0, video_mc.myVideo.height);
moveTo(0, 0);
endFill();
}
video_mc.attachMovie("videoLoad", "videoLoad_mc", video_mc.getNextHighestDepth());
video_mc.videoLoad_mc._x = video_mc.myVideo._width / 2;
video_mc.videoLoad_mc._y = video_mc.myVideo._height / 2;
//set connection parameters
my_nc = new NetConnection();
my_nc.connect(null);
my_ns = new NetStream(my_nc);
my_ns.onStatus = function(infoObject:Object):Void {
//trace("Status: " + this.time + " seconds");
//trace("Level: " + infoObject.level);
//trace("Code: " + infoObject.codetrace);
var newWidth_num:Number;
switch (infoObject.code) {
case 'NetStream.Buffer.Full' :
//get width and height
var oldWidth_num:Number = video_mc.myVideo.width;
var oldHeight_num:Number = video_mc.myVideo.height;
var sizeRatio_num:Number = oldWidth_num / oldHeight_num;
newWidth_num = (textBoxHeight_num + textTitleHeight_num) * sizeRatio_num;
//set new width and height to match text box size
video_mc.myVideo._width = newWidth_num;
video_mc.myVideo._height = textBoxHeight_num + textTitleHeight_num;
//stop loop
break;
case 'NetStream.Play.Start' :
//clear load mc
video_mc.videoLoad_mc.removeMovieClip();
//init controls
video_mc.attachMovie("PlayButton", "play_btn", video_mc.getNextHighestDepth());
video_mc.attachMovie("PauseButton", "pause_btn", video_mc.getNextHighestDepth());
video_mc.attachMovie("StopButton", "stop_btn", video_mc.getNextHighestDepth());
video_mc.attachMovie("shadow", "shadow_mc", video_mc.getNextHighestDepth());
//video_mc.attachMovie("VolumeBar", "vol_mc", video_mc.getNextHighestDepth());
video_mc.play_btn._x = textPadding_num;
video_mc.play_btn._y = textBoxHeight_num + textTitleHeight_num - video_mc.play_btn._height - textPadding_num;
video_mc.play_btn._visible = false;
video_mc.pause_btn._x = video_mc.play_btn._x;
video_mc.pause_btn._y = video_mc.play_btn._y;
video_mc.stop_btn._x = video_mc.play_btn._width + textPadding_num;
video_mc.stop_btn._y = video_mc.play_btn._y;
video_mc.vol_mc._x = video_mc.stop_btn._x + video_mc.stop_btn._width + textPadding_num;
video_mc.vol_mc._y = video_mc.play_btn._y;
video_mc.shadow_mc._width = video_mc.myVideo._width;
video_mc.shadow_mc._alpha = shadowAlpha_num;
video_mc.onEnterFrame = function() {
//textBox_mc.theText = "<p>" + my_ns.time + "</p>";
}
//set control functions
video_mc.play_btn.onRollOver = function() {
this._alpha = vControlDimAlpha_num;
}
video_mc.play_btn.onRollOut = function() {
this._alpha = 100;
}
video_mc.play_btn.onRelease = function() {
my_ns.pause();
this._visible = false;
video_mc.pause_btn._visible = true;
video_mc.stop_btn.enabled = true;
video_mc.stop_btn._alpha = 100;
}
video_mc.pause_btn.onRollOver = function() {
this._alpha = vControlDimAlpha_num;
}
video_mc.pause_btn.onRollOut = function() {
this._alpha = 100;
}
video_mc.pause_btn.onRelease = function() {
my_ns.pause();
this._visible = false;
video_mc.play_btn._visible = true;
}
video_mc.stop_btn.onRollOver = function() {
this._alpha = vControlDimAlpha_num;
}
video_mc.stop_btn.onRollOut = function() {
this._alpha = 100;
}
video_mc.stop_btn.onRelease = function() {
my_ns.seek(0);
if (video_mc.pause_btn._visible) {
my_ns.pause();
}
else {
my_ns.pause();
my_ns.pause();
}
this.enabled = false;
this._alpha = vControlDimAlpha_num;
video_mc.pause_btn._visible = false;
video_mc.play_btn._visible = true;
}
my_ns.volumeBar = video_mc.vol_mc;
//stop loop
break;
}
}
video_mc.myVideo.attachVideo(my_ns);
my_ns.setBufferTime(5);
my_ns.play(content_array[section_num].video_str);
}
-
Never mind, I found the problem: Win2003 IIS needed to have a MIME type added for FLV files!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|