# Actionscript 2.0 to 3.0

**URL:** <https://forum.kirupa.com/t/actionscript-2-0-to-3-0/324832>\
**Category:** flash\
**Created:** [September 11, 2011, 1:56pm UTC](https://forum.kirupa.com/t/actionscript-2-0-to-3-0/324832 "2011-09-11T13:56:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgs](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@pgs](https://forum.kirupa.com/u/pgs)\
**Post date:** [September 11, 2011, 1:56pm UTC](https://forum.kirupa.com/t/actionscript-2-0-to-3-0/324832/1 "2011-09-11T13:56:12Z")

</div>

Please, can somebody give me the right code in 3.0 for these 2 codes?

Thank you.

stop ();  
var location\_so:SharedObject;  
if (selectedItem == null) {  
Selection.setFocus(groups\_btn);  
}  
else {  
Selection.setFocus (selectedItem);  
}  
groups\_btn.onPress = function () {  
selectedItem = this;  
gotoAndStop (“Groups”);  
};  
draws\_btn.onPress = function () {  
selectedItem = this;  
gotoAndStop (“submenu”);  
};  
final\_btn.onPress = function () {  
selectedItem = this;  
gotoAndStop (“imagens”);  
}

Key.removeListener (myListener);  
var myListener:Object = new Object ();  
myListener.onKeyDown = function () {  
var keyCode = Key.getCode ();  
if (keyCode == ExtendedKey.SOFT1) {  
}  
else if (keyCode == ExtendedKey.SOFT2) {  
fscommand2 (“Quit”);  
}  
};  
Key.addListener(myListener);
