# Converting AS3 to 2.0

**URL:** https://forum.kirupa.com/t/converting-as3-to-2-0/296394
**Category:** flash
**Created:** [September 14, 2009, 3:28pm UTC](https://forum.kirupa.com/t/converting-as3-to-2-0/296394 "2009-09-14T15:28:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nate51](https://avatars.discourse-cdn.com/v4/letter/n/4da419/32.png) [@nate51](https://forum.kirupa.com/u/nate51)
#### Post date: [September 14, 2009, 3:28pm UTC](https://forum.kirupa.com/t/converting-as3-to-2-0/296394/1 "2009-09-14T15:28:16Z")

</div>

This code I have here has some issues in AS2 and I was wondering if anyone knew how to debug this?

some of the variables I am not sure what they would be under 2.0

```auto
SWFAddress.addEventListener(SWFAddressEvent.CHANGE, onChange);
function mc02Change (e:Event):void {
 _root.mc01.mc02.gotoAndPlay("start");
}
function mc03Change (e:Event):void {
 _root.mc01.mc03.gotoAndPlay("start");
}
function mc04Change (e:Event):void {
 _root.mc01.mc04.gotoAndPlay("start");
} 
function mc05Change (e:Event):void {
 _root.mc01.mc05.gotoAndPlay("start");
}
function onChange(e:SWFAddressEvent):void {
 if(e.value !="/")
  SWFAddress.setTitle("page title" + e.value.substring(1));
 else
  SWFAddress.setTitle("page titled");
 
 switch(e.value) {
  case "/";
   mc02Change(null);
   break;
 
  case "/projects";
   mc03Change(null);
   break;
 
  case "/solutions";
   mc04Change(null);
   break;
 
  case "/contact";
   mc05Change(null);
   break;

```

If anyone knows direct translations or can point me towards documentation to convert from 3 to 2 that would be great.
