# FlashVars small problem

**URL:** <https://forum.kirupa.com/t/flashvars-small-problem/277223>\
**Category:** flash\
**Created:** [December 9, 2008, 6:36pm UTC](https://forum.kirupa.com/t/flashvars-small-problem/277223 "2008-12-09T18:36:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![autumnmedia](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@autumnmedia](https://forum.kirupa.com/u/autumnmedia)\
**Post date:** [December 9, 2008, 6:36pm UTC](https://forum.kirupa.com/t/flashvars-small-problem/277223/1 "2008-12-09T18:36:05Z")

</div>

Hi i have a flash swf that i am trying to pass variables into,

my html is

```auto
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="800" height="600" id="CarepathwayStar" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="flashvars" value="myvar1=5">
    <param name="movie" value="CarepathwayStar.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" />    
    <embed src="CarepathwayStar.swf" quality="high" 
    flashvars="myvar1=5"
    bgcolor="#000000" width="800" height="600" name="CarepathwayStar" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>

```

and my actionscript is

```auto
  function loaderComplete(myEvent:Event)
{
  var flashVars=this.loaderInfo.parameters;
  myvar.String=flashVars.myvar1;
  var top1:Number = Number(myvar);  
}

this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);

```

basically i just want to get the number input from the html “5” so that i can use it inside the flash file, obviously once i have this working i will be changing the value on the html page to a different variable but everytime i compile the swf i get compiler errors as it is not finding the variable myvar?

i thought this wouldnt matter when i ran the html page but it is not picking up the variable

any help would be greatly appreciated
