views:

338

answers:

1

I have a flash application (CS3.0) that is published and i got the flash HTML and put it inside asp.net page. The asp.net page include a public variable which is set in the loading of the page i need to get this variaable value in the code of the flash to do some operations based upon this variable so how can i get this variable value in the CS3.0 aplpication which resides in the page.

Hope that my question is clear if any illustrations needed just determine it and i will explain it more.

Thanks in advance

+1  A: 

You could do something like the following code below on your aspx page, note inparticular the following line: 'FlashVars', 'PublicProperty=<% Response.Write( PublicProperty ) %>'

<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', '100%',
  'height', '100%',
  'src', 'Game',
  'quality', 'high',
  'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
  'align', 'middle',
  'play', 'true',
  'loop', 'true',
  'scale', 'showall',
  'wmode', 'window',
  'devicefont', 'false',
  'id', 'Game',
  'bgcolor', '#ffffff',
  'name', 'Game',
  'menu', 'true',
  'allowFullScreen', 'false',
  'allowScriptAccess', 'sameDomain',
  'movie', 'Game',
  'FlashVars', 'CID=<% Response.Write( PublicProperty ) %>',
  'salign', ''


  ); //end AC code
    }
</script>
Kevin
And how can i call this variable from action script code?did the variable name is "CID"?so i will get its value by this line of code :var VarValue:String = CID.toString();??
Ahmy
The variable can be named anything, it is just a copy and paste, from a working example. To access the variable in flash you can use:root.loaderInfo.parameters.CID
Kevin
This is not working do u have another solution? and i need to tell u that i am not including this code i am including tags <object> which is in case of noscript and i don't use this code int he page so can u help me again please? i have add to u +1 for ur attention thanks
Ahmy