Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I change the language of dynamic text in a SWF using flashvars?
    primarykey
    data
    text
    <p>I have a SWF with text embedded from an external .txt file. Is there a way I can have a different file used as the text source through the embedcode (swfObject) depending on the language?</p> <p><strong>Here is my current actionscript:</strong></p> <pre><code>myData = new LoadVars(); myData.onLoad = function() { text_clips.project_title.text = this.projecttitle1; }; myData.load("translatetext.txt"); var loader:MovieClipLoader = new MovieClipLoader(); loader.loadClip(_level0.projectimage1,pic1.image_holder); </code></pre> <p><strong>This is the content of translatetext.txt:</strong></p> <pre><code>projecttitle1=This is my translatable text </code></pre> <p><strong>This is the embed code I'm using:</strong></p> <pre><code>&lt;div&gt; &lt;object width="960" height="275" id="rvFlashcontent"&gt; &lt;param name="movie" value="lang_test_3.swf" /&gt; &lt;param name="wmode" value="transparent" /&gt; &lt;param name="flashvars" value="projectimage1=flashimages/testimage.jpg" /&gt; &lt;!--[if !IE]&gt;--&gt; &lt;object type="application/x-shockwave-flash" data="lang_test_3.swf" width="960" height="275"&gt; &lt;param name="wmode" value="transparent" /&gt; &lt;param name="flashvars" value="projectimage1=flashimages/testimage.jpg" /&gt; &lt;!--&lt;![endif]--&gt; &lt;h1&gt;Alt Content&lt;/h1&gt; &lt;!--[if !IE]&gt;--&gt; &lt;/object&gt; &lt;!--&lt;![endif]--&gt; &lt;/object&gt; &lt;/div&gt; </code></pre> <p>What I want to do is add a Flashvars parameter to name the file to load, so I can change the language:</p> <pre><code>&lt;param name="flashvars" value="projectimage1=flashimages/image.jpg&amp;projecttext=textfrench.txt" /&gt; </code></pre> <p>There are four languages needed so far, but this will grow so it needs to be flexible enough to let the developers add languages without getting a new SWF each time. Thanks in advance all!</p> <p><a href="http://db.tt/WzXift" rel="nofollow noreferrer">Files for this question available here...</a></p>
    singulars
    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.
 

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