Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jul 03, 2011 @ 18:14
    Bjarne Fyrstenborg
    0

    Multilingual site and link to swf files

    Hi

    I have a multilingual site, which use Danish and English. On the frontpage I have a flash gallery with some images, which use a xml-file. In the actionscript in link til /en/home/slideshow/slideshowxml.aspx

    But right now both languages use the xml-file under the English language as above.
    Mostly both languages will use the same images, but I would like to possibility to have diffent images for each language.

    I think I will have two swf-files (da.swf and en.swf) where the link to the xml will be/en/home/slideshow/slideshowxml.aspx and /da/forside/slideshow/slideshowxml.aspx

    In my frontpage template I have the following:

    <div id="slideshow"
      <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''600',
          'height''500',
          'src''/slideshow',
          'quality''high',
          'pluginspage''http://www.macromedia.com/go/getflashplayer',
          'align''middle',
          'play''true',
          'loop''true',
          'scale''showall',
          'wmode''transparent',
          'devicefont''false',
          'id''slideshow',
          'bgcolor''#333333',
          'name''slideshow',
          'menu''false',
          'allowFullScreen''false',
          'allowScriptAccess','sameDomain',
          'movie''/slideshow',
          '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="600" height="500" id="slideshow" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="false" />
        <param name="movie" value="/slideshow.swf" />
        <param name="menu" value="false" />
        <param name="quality" value="high" />
        <param name="bgcolor" value="#333333" />
        <embed src="/slideshow.swf" menu="false" quality="high" bgcolor="#333333" width="600" height="500" name="slideshow" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
      </object>
    </noscript>

    What will be the best way to link the each swf-file from my template instead of slideshow.swf. I have considered to use a dictionary item with link to the two new swf-files. Or is there a better way to do this?

    Bjarne

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 03, 2011 @ 18:30
    Jan Skovgaard
    0

    Hi Bjarne

    I suppose it should be enough to have 1 flash file and 2 different XML files, that it should fetch images from.

    If I understand your issue correctly the challenge is to figure out how to make sure that flash file gets the correct feed, right?

    /Jan

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jul 03, 2011 @ 18:39
    Bjarne Fyrstenborg
    0

    Hi Jan

    Yes, that's right.
    But I'm not sure how or if it's possible in the actionsscript the link to two different xml-files depending on the language. Right now the link to the xml-file in actionscript is just static like this: /en/home/slideshow/slideshowxml.aspx ...

    So I suppose using a dictionary item can be a solution, but perhaps not the best way to do it.

    Bjarne

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jul 04, 2011 @ 18:00
    Bjarne Fyrstenborg
    0

    Is there anyone, who has worked with flash and multilingual site, so it use the xml-file depending on the site language?

    Or perhaps a link to some information about it?

    Bjarne

  • Richard 146 posts 168 karma points
    Jul 05, 2011 @ 12:58
    Richard
    0

    Bjarne,

    I do not think you can get the language with XSLT, you can with a user control, but that would feel a bit of over-kill just to write out the code for the Flash. I would write an XSLT macro to output the code you pasted at the start of this post. Then either use the server name to switch the path to the XML file, or in your case I would add a property to the page where you can set the language, and use this value to build the directory to the XML file. You could create a DataType with the two options da and en.

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jul 09, 2011 @ 00:18
    Bjarne Fyrstenborg
    0

    Okay.. but I'm not sure how the actionsript code will refer to the different xml-files for Danish and English.

    I have just linked to the English version of the xml from flash right now: /en/home/slideshow/slideshowxml.aspx
    So somehow I think flash should check whether it's the English og Danish site version to get the right xml-file..

    Bjarne

Please Sign in or register to post replies

Write your reply to:

Draft