Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:FlashEmbed: Difference between revisions

Template page
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1: Line 1:
<includeonly>
<includeonly>
<htmltag tagname="div" style="position:relative; width:{{{width|640}}}px; height:{{{height|480}}}px;" class="flash-splash-container">
<htmltag tagname="object" type="application/x-shockwave-flash" data="{{{url}}}" width="{{{width|600}}}" height="{{{height|400}}}">
 
  <htmltag tagname="param" name="movie" value="{{{url}}}" selfclose="true" />
  <htmltag tagname="div" style="position:absolute;top:0;left:0;width:100%;height:100%;background:url('{{{splash|https://example.com/default-splash.png}}}') center center/cover no-repeat;display:flex;align-items:center;justify-content:center;cursor:pointer;" class="flash-splash-overlay">
  <htmltag tagname="param" name="allowScriptAccess" value="never" selfclose="true" />
    <htmltag tagname="div" style="background:rgba(0,0,0,0.6);padding:10px 20px;border-radius:10px;color:white;font-size:20px;">
      {{{button|Click to Play}}}
    </htmltag>
  </htmltag>
 
  <htmltag tagname="div" style="width:100%;height:100%;display:none;" class="flash-object">
    <htmltag tagname="object" type="application/x-shockwave-flash" data="{{{url}}}" width="100%" height="100%">
      <htmltag tagname="param" name="movie" value="{{{url}}}" selfclose="true" />
      <htmltag tagname="param" name="allowScriptAccess" value="never" selfclose="true" />
    </htmltag>
  </htmltag>
 
</htmltag>
 
<htmltag tagname="script">
document.addEventListener('DOMContentLoaded', function() {
  var containers = document.querySelectorAll('.flash-splash-container');
  containers.forEach(function(container) {
    var overlay = container.querySelector('.flash-splash-overlay');
    var flashObject = container.querySelector('.flash-object');
    if (overlay && flashObject) {
      overlay.addEventListener('click', function() {
        overlay.style.display = 'none';
        flashObject.style.display = 'block';
      });
    }
  });
});
</htmltag>
</htmltag>
</includeonly>
</includeonly>

Revision as of 00:53, 26 April 2025

Advertising: