We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25803 ☆ A M B ☆
    • 721 Posts
    Changing to the static method makes the alternate content show up in Firefox 3 but not the swf file. If the call is uncached at all it doesn’t function in any of my browsers so I’m keeping it uncached but I"m curious as to why this is an issue.

    Uninstalled the old Adblock and installed Adblock Plus and now it works fine in Firefox 3.
      • 25803 ☆ A M B ☆
      • 721 Posts
      Update

      Both the static and dynamic methods work in both browsers if the user has the designated version of Flash or lower. If I set the Flash version to say 11.0.0 to ensure that the alternate content shows up, it does in Explorer 6, if the user has version 9 installed, but otherwise shows a blank area where the replacement content goes. In FIrefox 3 and Safari 3 I also get a blank area where the replacement content should show.

      Looking at the source code, the replacement content is there (it’s just a dummy image) but also, not in the source code, but showing up under Embedded styles in the web developer extension of edit CSS, is a declaration that set the visibility of the ID you designate in the snippet call to hidden.
        • 25803 ☆ A M B ☆
        • 721 Posts
        Update

        Decided to kill this snippet and install SWFObject 2.1. Created a chunk with template variables for each property in the Embed line as well as a template variable for the ID of div in the chunk with the alternate content. Everything works now flawlessly.
          • 6817
          • 2 Posts
          I’m having a little problem with the SWFObject snippet. I’m trying to build a Full-Flash Website with a MODx Backend. To embed the SWF file I’m using this very handy snippet, which works perfectly until I try to use [*content*] placeholder for the &altContent variable. Here’s my code:

          [!SWFObject? &mode=`dynamic` &flashVersion=`9.0.0` &objWidth=`100%` &objHeight=`100%` &objId=`flashcontent` &swfFile=[*swffile*] &altContent=[*content*]!]


          [*swffile*] is a Template Variable which works just fine. Now at least 2 problems occur within the &altContent part. First, as soon as I have more than one paragraph in my content textarea the embeding process is completely broken. No SWF is shown and the snippet code is displayed as plain html text. The problem is in my opinion the newline character (\n). Second, when I insert an anchor link to parts of the text the snippet parser fails to add the complete content into the pargraph. The problem seems to be the "=" within the "<a href="...", because the text is cut of before this sign.

          My first question would be if there is a possibility to tell MODx to parse the [*content*] after the snippet code is executed? This would in my opinion solve the occuring problems. If this is not possible my question would be if there is any other method to include the [*content*] into the &altContent variable?

          Any ideas?
          Thanks.
            • 8894
            • 114 Posts
            Hello dcb,

            I think both of your problems are due to current modx parser : ’=’ sign, new lines, and some other characters that I don’t remember now, are not supported into snippet call parameters.
            Modx Revolution (next generation of modx) parser is different and will remove this restriction.

            And, about your first question, as far as I know, it’s not possible (unless hacking the core) to specify the order for parsing.

            For now, to solve your problem, you can try this modification (tested a little, seems to work) :

            • change your snippet call parameter to &altContent=`#CONTENT#`
            • modify "swfobject.class.php" to treat this marker to retrieve content : in setConfig function, around line 163, add bold lines
              [tt]case ’altContent’:
              if ($modx->getChunk($item)) {
              $config[$key] = $modx->getChunk($item);
              }
              else if ($item == "#CONTENT#") {
              $config[$key] = $modx->documentObject[’content’];
              }

              else {
              $config[$key] = $item;
              }
              break;
              [/tt]

            Hope it will fit your needs undecided

              • 6817
              • 2 Posts
              Hi enidan,

              after figuring out some other mistake which caused problems with your parameter parsing your solution works just fine. Thank you. smiley The other problem was, that I had removed quotation marks from the swffile TV. Therefor the altContent variable was not parsed correctly by the swfobject.class... rolleyes

              dcb
                • 19132
                • 199 Posts
                rx2

                I like your approach. I tried it but when I reference the files in another directory, it doesn’t display the video control menu. I’d really like to have the video control to display without having to have the js files, the video files in the root of my website.

                Any ideas why SWFObject doesn’t display the video controls?
                  MySQL: 5.0.45
                  PHP: 5.2.6
                  Linux 2.6.9-023stab048.6-enterprise #1
                  cURL enabled
                  PDO enabled
                  FFox Apple 3.6.8
                  Firebug DIS-abled
                  • 25803 ☆ A M B ☆
                  • 721 Posts
                  None of what I’ve done is using the video controller but I can think of two things. Check the path to it within your Flash movie and then make sure all paths match. I usually put the video player swf in the same folder as the FLV but addressing it from SWFObject, I’m not sure if the path needs to be reset within Flash to reflect where the index.php file sits.

                  Also, for purely FLV stuff I just use JWPlayer and the JWPlayer snippet, which also uses SWFObject.
                    • 19132
                    • 199 Posts
                    I edited the path within the component. Nothing worked. The movie plays, but no controls.

                    The JWPlayer however worked perfectly. It was interesting to stick a different skin in there and not have it work. I’ll play around with it perhaps.

                    Thank for the reply. It is much appreciated.
                      MySQL: 5.0.45
                      PHP: 5.2.6
                      Linux 2.6.9-023stab048.6-enterprise #1
                      cURL enabled
                      PDO enabled
                      FFox Apple 3.6.8
                      Firebug DIS-abled
                      • 27330
                      • 884 Posts
                      I have an odd issue where I need to click twice on my flash toolbar when I use this snippet. once to activate the flash effects and only 2nd click triggers the link.

                      when I have the flash file embedded not with the snippet the problem is gone.

                      any idea what can it be?