Note that there are some explanatory texts on larger screens.

plurals
  1. POPlaying Flash video on part of a page - iframe versus DIV and Include in PHP
    primarykey
    data
    text
    <p>I wanted to use DIV and Include in my original page and play an FLV. I decided to use INCLUDE and reference "videoplayer.html" to play the file, but it wouldn't work. Note: the player uses the MIT Opensource SWFObject v2.2 file, which I had in my header called "lessonheader.php" .</p> <p>So, this DOES NOT work (just has a blank DIV area): From my "lessonheader.php" file</p> <pre><code>&lt;head&gt;... &lt;script type="text/javascript" src="swfobject.js"&gt;&lt;/script&gt; ... &lt;/head&gt; ... </code></pre> <p>From my main page:</p> <pre><code> include("includes/lessonheader.php"); ... elseif ($answertype == "vid") { include '.\videos\videoplayer.html'; echo '&lt;p&gt;Click next to proceed, or watch the video again.&lt;/p&gt; </code></pre> <p><strong>While if I use a simple iframe, it does:</strong></p> <pre><code>elseif ($answertype == "vid") { echo '&lt;iframe src=".\videos\videoplayer.html"&gt;&lt;/iframe&gt;'; echo '&lt;p&gt;Click next to proceed, or watch the video again.&lt;/p&gt; </code></pre> <p>For reference, here is the videoplayer.html (note script put at top has no effect on the include not working or the iframe working - just testing it out):</p> <pre><code>&lt;script type="text/javascript" src="swfobject.js"&gt;&lt;/script&gt; &lt;div id="wb_FlashVideoPlayer1" style="margin:0;padding:0;position:relative;left:10px;top:10px;width:640px;height:480px;text-align:left;z-index:5;"&gt; &lt;p&gt;This is before the player &lt;/p&gt; &lt;div id="FlashVideoPlayer1"&gt;&lt;/div&gt; This is after the player &lt;script type="text/javascript"&gt; var flashvars = {}; var params = {}; flashvars.videoPath = "addition1.f4v"; ... params.salign = "tl"; swfobject.embedSWF("wb.videoplayer.swf", "FlashVideoPlayer1", "640", "480", "9.0.0", false, flashvars, params); &lt;/script&gt; &lt;/div&gt; </code></pre> <p>Thoughts?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload