I have figured out how to link a mxml page to an as page fine. However, when it 
comes to communication betweem the two pages such as the mxml page calling on a 
function on the .as page to change the label of a control on the mxml page I 
have had problems. What I am trying to do is basicly do a Hello World 
application where you click a button and the label on the mxml page changes to 
"Goodbye World!!". I want to somehow call a function on the .as page to do this 
and I have had a lot of problems. So here is the code for the mxml page I am 
trying to make:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"; xmlns="*">
<brandnewas id="bna" fresh="{this}" />
<mx:HBox>
<mx:Button label="Change World" id="worldchanger" click="bna.changeworld()"/>
<mx:Label text= "Hello World" id="world"/>
</mx:HBox>
</mx:Application>


Now here is the code for the .as page I am hoping to link it to
// ActionScript Document

class brandnewas
{
public var fresh:Object;

public var worldstate:String;



public function brandnewas()
{}
public function changeworld():Void
{
world.text ="Goodbye world";
}
}


I hope somebody can clear up the confusion.


Reply via email to