# Help with actionscript

**URL:** <https://forum.kirupa.com/t/help-with-actionscript/173168>\
**Category:** Uncategorized\
**Created:** [December 21, 2005, 10:21pm UTC](https://forum.kirupa.com/t/help-with-actionscript/173168 "2005-12-21T22:21:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terry\_elekes](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@Terry\_elekes](https://forum.kirupa.com/u/Terry_elekes)\
**Post date:** [December 21, 2005, 10:21pm UTC](https://forum.kirupa.com/t/help-with-actionscript/173168/1 "2005-12-21T22:21:01Z")

</div>

on (press) {  
var myVariable = 7;  
var myOthervariable = “Macromedia”;  
if ((myVariable+2) == myOtherVariable.length) {  
trace(myOtherVariable);  
}  
}

Here is the code I put on a button. When I press the button, I thought that I would get the word Macromedia in the output window. myVariable +2 =9 and myOtherVariable.length =9 also. I am trying to learn this and I am having trouble. Please help
