Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / September 2005



Tip: Looking for answers? Try searching our database.

Passing Different Text Variable FILES to SWF Using HTML PARAM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dr. DOT - 29 Sep 2005 16:06 GMT
I have a number of different *.txt files in a directory on the server. Each
*.txt has the same number of dynamic variables (&text1, &text2, &text3,
&text4). Howevere, each *.txt has different content assigned to each of the 4
variables.

I want to be able to dynamically select a *.txt usng the <param> <embed> sytax
on in my HTML document.

I found where I can specify <param name="loadvariables" value="text=Hello">
but what I really need to do is be able to specify the text file name on the
param tag and not the dynamic text content.

Can this be done?
perry - 30 Sep 2005 10:21 GMT
use
<PARAM NAME=FlashVars VALUE="filetoload=yourtextfile1.txt">

then use
any_mc.loadVariables(filetoload);
orLoadVars.load(filetoload);
in flash

> I have a number of different *.txt files in a directory on the server. Each
> *.txt has the same number of dynamic variables (&text1, &text2, &text3,
[quoted text clipped - 9 lines]
>
>  Can this be done?
Dr. DOT - 30 Sep 2005 11:33 GMT
Thanks Perry, I got excited becuase It hought this mught be the solution. But
it did not work.

Here is my HTML:
<?php
echo "<div id=\"tickerPane\">
<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\"
codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab
#version=7,0,0,0\" width=\"848\" height=\"20\" id=\"ticker\" align=\"middle\">
<param name=\"allowScriptAccess\" value=\"sameDomain\" />
<param name=\"movie\" value=\"http://teamsonline.net/flash/ticker.swf\" />
<param name=\"quality\" value=\"high\" />
<param name=\"bgcolor\" value=\"#000000\" />
<param name=\"FlashVars\" value=\"filetoload=%2Ftickers%2Fticker00187%2Etxt\"
/>
<embed src=\"http://teamsonline.net/flash/ticker.swf\"
FlashVars=\"filetoload=%2Ftickers%2Fticker00187%2Etxt\" quality=\"high\"
bgcolor=\"#000000\" width=\"848\" height=\"20\" name=\"ticker\"
align=\"middle\" allowScriptAccess=\"sameDomain\"
type=\"application/x-shockwave-flash\"
pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />
</object></div>";
?>

Here is my ActionScript in Frame 1:
orLoadVars.load(filetoload);

Can you see anything wrong? Thank you for your help.
Dr. DOT - 30 Sep 2005 13:45 GMT
Found the answer:

In your ActionScript you need the following simple command in Frame 1:

loadVariables(_root.textfile,"");

where "textfile" is the name on the PARAM element:

<param name="loadVars" value="textfile=A sample message">

That's it -- easy once you see it :)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.