We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21477
    • 25 Posts
    If I add the following code to my page in HTML:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="544" height="174" id="tech" align="middle">
    		<param name="allowScriptAccess" value="sameDomain" />
    		<param name="movie" value="flash.swf?xml_path=flash.xml" />
    		<param name="quality" value="high" />
    		<embed src="flash.swf?xml_path=flash.xml" quality="high" width="544" height="174" name="tech" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    
    	</object>

    then save the page it displays ok however if I edit the page or open it in TinyMCE editor the flash no longer appears. Is there a way to stop this happening... the HTML is still there but seend to do something strange with it.
      • 36624
      • 535 Posts
      i see three simple solutions :

      1 - desactivate the editor for this page smiley
      2 - do a chunk.
      3 - have a look here : http://modxcms.com/resource-listing.html?tags=flash

      ciao
        CTRL+SHIFT+U - Clear Cache
        CTRL+SHIFT+H - Hiding Heft Panel
        CTRL+SHIFT+N - Fast Create Resource
        CTRL+ALT+P - Preview Recource (in edit resorce window)
        CTRL+ALT+S - Save
        • 25803 ☆ A M B ☆
        • 721 Posts
        The changes TinyMCE makes can be very annoying. It would be great to have an XHTML WYM or WYSIWYG editor that doesn’t change your code and furthermore, is safe in the hands of regular people in the office rather than developers, but that is another story.

        In MODx, I use chunks for my Flash content. I also use SWFObject (there is a snippet but I couldn’t get it to work so I do it manually.)

        I place the swfobject.js file in /assets/js (of course, you can place it where ever you want) and make sure to reference it in my template:

        <script src="[(base_url)]assets/js/swfobject.js" type="text/javascript"></script>


        Then I create a chunk for each particular Flash movie.

        <div class="audioclip" id="flashcontentaudioclip">
        <a href="/assets/audio/sound_clip.mp3">
        <img src="/assets/images/icons/sound_clip.gif" alt="Play" width="62" height="80" /></a>
        <h1>Audio Clip</h1>
        <p>Some information about the clip.</p>
        <p><a href="/assets/audio/sound_clip.mp3">Play Clip</a>  |  Format: MP3  |  Duration: 2:12</p>
        </div>
        
        <script type="text/javascript">
        // <![CDATA[
        var so = new SWFObject("/assets/swf/soundclips/soundclip.swf", "soundclip", "600", "100", "8", "#FFFFFF");
        so.write("flashcontentaudioclip");
        // ]]>
        </script>
        


        In this case, inside the div id="flashcontentaudioclip" I’ve included alternate content in case the viewer doesn’t have Flash 8 in this case. What SWFObject does is replace the alternate content with your Flash content, and you can specify a number of parameters, including version, as well as pass variables if you like.
          • 28625
          • 24 Posts
          For me, where you put var so = new SWFObject("/assets/swf/soundclips/soundclip.swf", "soundclip", "600", "100", "8", "#FFFFFF"); the link doesn’t work. In this example it would only work if I put "soundclip.swf" and the file was in the directory root.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Have you tried a full URL? Is your MODx installation in the root of your web space?
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 28625
              • 24 Posts
              Quote from: sottwell at Jul 29, 2009, 05:32 AM

              Have you tried a full URL? Is your MODx installation in the root of your web space?
              Yes and yes (I think - installed in httpdocs). That is what is so strange. I can’t understand why it doesn’t work.