I am now working in Flash CS5 and I some how seem to have lost the plot with AS. The interaction is something foreign and the simple things are lost on my for some reason.
The simple point I am trying to make is I need to create a var and pass it through to a function:
var refer:String =“http://alison.studiosgroup.co.uk”;
About_Com_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
function fl_MouseClickHandler(event:MouseEvent):void
{
// Start your custom code
var targetURL:URLRequest = new URLRequest(refer.toString("/buying.htm"));
navigateToURL(targetURL, “mainFrame”);
// This example code displays the words “Mouse clicked” in the Output panel.
trace(“Mouse clicked”);
// End your custom code
}
Simple I would expect, but no. I would like to declare the “var refer” to pass to the second var targetURL. This is so that I can pass a test domain to the function and then once testing is complete I would like to change the “var refer” to the new domain.
Am I lost or just looking at the trees in the forest I can’t see