# Html to flash communication impossible

**URL:** <https://forum.kirupa.com/t/html-to-flash-communication-impossible/286655>\
**Category:** flash\
**Created:** [April 18, 2009, 1:21pm UTC](https://forum.kirupa.com/t/html-to-flash-communication-impossible/286655 "2009-04-18T13:21:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_paparis](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@john\_paparis](https://forum.kirupa.com/u/john_paparis)\
**Post date:** [April 18, 2009, 1:21pm UTC](https://forum.kirupa.com/t/html-to-flash-communication-impossible/286655/1 "2009-04-18T13:21:20Z")

</div>

hi, i just need to pass 1 parameter from html to flash.  
i have used both ways. in the movie url or in the embeded obj . html example \>\>\>  
\<script language=“JavaScript” type=“text/javascript”\>  
AC\_FL\_RunContent(  
‘movie’, ‘aidonitsa’,  
‘salign’,  
‘FlashVars’,‘pa=34’  
…  
and in the embeded object \>\>\>  
\<param name=“FlashVars” value=“pa=34” /\>  
and \<embed src=“mymovie.swf” FlashVars=“pa=34” …

or in the movie url \>\>\>  
\<param name=“movie” value=“mymovie.swf”?myvar=345/\>  
and  
\<embed src=“mymovie.swf?myvar=345”

and to recieve it in my main class in flash \>\>\>

1. i set the listener  
this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);

2)the listener function

function loaderComplete(myEvent:Event)  
{  
var flashVars=this.root.loaderInfo.parameters;  
var myvar:String=flashVars.imageFilename;  
trace(flashVars+" "+myvar);  
}

now what happens is flashVars traces [object object] and  
myvar traces undefined.  
no matter if i use a for statement to go through the object properties,  
it just don’t run and it seems like the object has no properties.i am testing it locally on my pc.

i havee been searching in google for hours, and tried all solutions  
i came up with before starting a new thread about a problem that  
has been addressed multiple times before. but no matter how many times i try it just won’t work, and i am stuck in the middle of developing a big project.  
thanks for you time.
