# Actionscipt not working in IE 7 passing Vars

**URL:** https://forum.kirupa.com/t/actionscipt-not-working-in-ie-7-passing-vars/286027
**Category:** flash
**Created:** [April 8, 2009, 10:10pm UTC](https://forum.kirupa.com/t/actionscipt-not-working-in-ie-7-passing-vars/286027 "2009-04-08T22:10:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lamoose](https://avatars.discourse-cdn.com/v4/letter/l/8797f3/32.png) [@lamoose](https://forum.kirupa.com/u/lamoose)
#### Post date: [April 8, 2009, 10:10pm UTC](https://forum.kirupa.com/t/actionscipt-not-working-in-ie-7-passing-vars/286027/1 "2009-04-08T22:10:01Z")

</div>

I am having a strange problem with my Actionscript not working in PC IE7. Everything works fine in Mac Firefox and safari.

I am passing a variable from the html using swfObject, loading it in flash, populating a movie clips text field. However, the field shows “error” in IE7.

Also with the actionscript I am positioning the movieclip to stage right. When I remove that code everthing appears to work fine. However, positioning to the right is a must for my design. Why does IE7 act differently. I have spent way to long googling a solution to no avail. Can anyone shed light on this for me?

Sample:

> **[Home - Creative Magma](http://www.creativemagma.com)**
>
> The latest on business, tech and lifestyle news.  Breaking stories in the news and helpful top 5 lists.  Reviews and previews for upcoming tech.

My actionscript code on frame1:

```auto

maskbox.width = stage.stageWidth;
backgroundclip.width = stage.stageWidth;
rightside.x = stage.stageWidth;
slogan.x = stage.stageWidth;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;

function resizeListener (e:Event):void {
maskbox.width = stage.stageWidth;
backgroundclip.width = stage.stageWidth;
rightside.x = stage.stageWidth;
slogan.x = stage.stageWidth;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
}

var allFlashVars:Object = LoaderInfo(this.root.loaderInfo).parameters
slogan.InstanceName_6.text = String (allFlashVars.pagetitle);
stage.addEventListener(Event.RESIZE, resizeListener);

logo.addEventListener(MouseEvent.CLICK, myBtnClicked);

function myBtnClicked(e:MouseEvent):void {
var url:String = "../index.php";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request);
} catch (e:Error) {
trace("Error occurred!");
}

}

```

My swfObject code:

```auto

<script type="text/javascript">
		// <![CDATA[

		var so = new SWFObject("../BPPWsubheader3.swf", "fwa", "100%", "100%", "9", "#000000");
		so.addVariable("flashVarText", "this is passed in via FlashVars");
		so.addParam("scale", "noscale");
		so.addParam("wmode","transparent");
		so.useExpressInstall('../expressinstall.swf');
		so.addVariable("pagetitle","Areas of Practice");
		
		so.write("header2");

		// ]]>
	</script>

```
