HighDots Forums  

JavaScript to Flash problem

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss JavaScript to Flash problem in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pioSko webforumsuser@macromedia.com
 
Posts: n/a

Default JavaScript to Flash problem - 01-14-2004 , 08:55 AM






So...


<script language="JavaScript">

var lang = String(document.location);
lang = lang.substr(lang.length-1,1);


//-->
</script>



<object classid="bleh"
codebase="bleh>

document.write('<param name=movie value="main.swf?lang='+lang+'">');
<param name=quality value=high>
<embed src="main.swf" quality=high

</embed>
</object>

First code get's the location of the html file and throws away everything except the last character (my variable value).

Second code embeds flash and I want it to identify it as main.swf?lang=3... (3 being the value of the variable lang).

However, flash reads it only as http://www.......com/main.swf?lang='+lang+' and!! .. it does (in flash) give lang a value but as this:

' lang '

I've played around with the quotation marks and taken example from other sites use of this method. What am I doing wrong?

cheers



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.