SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    PHP Otaku Gibb's Avatar
    Join Date
    Jul 2004
    Location
    Texas
    Posts
    454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem loading .flv video into .swf when accessed from webpage

    I have an .swf file (demo.swf) which is essentially the JC Player component with parameters pointing to a video called "video.flv". Here are the parameters for reference:
    Code:
    videoURL: video.flv
    startPhotoSource: photo.jpg
    If I put the video.flv and photo.jpg files in the same directory as the demo.swf file, then run it, the video and the screenshot work perfectly.

    If I try to load in demo.swf from within a webpage, I get a "Video does not exist!" error, even tho the screenshot itself works.

    Here is the code I'm using to load in the .swf
    Code:
    <script language="javascript">
    if (AC_FL_RunContent == 0) {
    alert("This page requires AC_RunActiveContent.js.");
    } else {
    AC_FL_RunContent(
    'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
    'width', '618',
    'height', '349',
    'src', 'demo',
    'quality', 'high',
    'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
    'align', 'middle',
    'play', 'true',
    'loop', 'true',
    'scale', 'showall',
    'wmode', 'window',
    'devicefont', 'false',
    'id', 'demo',
    'bgcolor', '#666666',
    'name', 'demo',
    'menu', 'true',
    'allowFullScreen', 'false',
    'allowScriptAccess','sameDomain',
    'movie', 'demo',
    'salign', ''
    ); //end AC code
    }									
    
    </script>
    <noscript>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="618" height="349" id="demo" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="movie" value="demo.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#666666" />	<embed src="demo.swf" quality="high" bgcolor="#666666" width="400" height="195" name="demo" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>
    </noscript>
    I'm really at my wits end trying to figure this out. I figured it would only take me 30 minutes to embed a video into a section of my website, but it's taken me over a day so far and I'm still lost.

    Any help would be most appreciated!

  2. #2
    PHP Otaku Gibb's Avatar
    Join Date
    Jul 2004
    Location
    Texas
    Posts
    454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I just figured out what was causing this problem, in case anybody else runs into the same situation.

    Apparently Windows Server 2003 has a bug in it where .flv files weren't properly setup in the MIME types of IIS, like they were in previous OS. I went into my IIS settings, and added the MIME name .flv with "flv-application/octet-stream" as the type. Now my streaming video is working fine.

    Here's the article at adobe's website if anybody wants more details:
    http://kb2.adobe.com/cps/194/tn_19439.html

  3. #3
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,551
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    Glad you got it sorted


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •