# AS3 works on mac but not pc

**URL:** https://forum.kirupa.com/t/as3-works-on-mac-but-not-pc/316034
**Category:** flash
**Created:** [November 10, 2010, 8:30pm UTC](https://forum.kirupa.com/t/as3-works-on-mac-but-not-pc/316034 "2010-11-10T20:30:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lirish](https://avatars.discourse-cdn.com/v4/letter/l/d2c977/32.png) [@lirish](https://forum.kirupa.com/u/lirish)
#### Post date: [November 10, 2010, 8:30pm UTC](https://forum.kirupa.com/t/as3-works-on-mac-but-not-pc/316034/1 "2010-11-10T20:30:56Z")

</div>

I’ve been working on a flash animation with some actionscript 3, which basically is the main.swf that calls upon 5 other swf and txt files that I am embedding into a web template. It all works fine on my mac but when I test on a pc I am able to call upon the other swfs and it pops up but the close button does not work. I assume that it has something to do with my actionscript with the children swf. But just in case I will show both.

Main

```auto
stop();
var popUpLoader:Loader = new Loader();

function rcPopUp(event:MouseEvent):void{
	popUpLoader.load(new URLRequest(event.target.name + ".swf"));
	addChild(popUpLoader);
}

discovery.addEventListener(MouseEvent.CLICK, rcPopUp);
creative.addEventListener(MouseEvent.CLICK, rcPopUp);
strat.addEventListener(MouseEvent.CLICK, rcPopUp);
resultsmg.addEventListener(MouseEvent.CLICK, rcPopUp);
horizon.addEventListener(MouseEvent.CLICK, rcPopUp);

```

Children (There are 5 files but all with the same code except calling the txt)

```auto
stop();
var content_req:URLRequest = new URLRequest("strategy.txt");
var content_1dr:URLLoader = new URLLoader(content_req);
content_1dr.addEventListener(Event.COMPLETE, onComplete);
function onComplete(event:Event):void
{
	content_txt.htmlText = event.target.data;
}
function scrollUp(event:MouseEvent):void
{
	content_txt.scrollV --;
}
function scrollDown(event:MouseEvent):void
{
	content_txt.scrollV ++;
}
up.addEventListener(MouseEvent.CLICK, scrollUp);
down.addEventListener(MouseEvent.CLICK, scrollDown);

import flash.events.MouseEvent;

if(closeButton.hasEventListener(MouseEvent.CLICK) == false)
closeButton.addEventListener(MouseEvent.CLICK , removeMe);

function removeMe(evt:MouseEvent):void
{
    closeButton.removeEventListener(MouseEvent.CLICK , removeMe);
    if(this.parent) this.parent.removeChild(this);
}

```

I tried debugging on a pc and went back to the browser and refreshed and it seemed to have worked. Checking on a browser that I did not just download the Flash debugger for does not work though. Any suggestions?
