Here is what I have tried but neither of example works.
trace( “my message” );
When I run the getURL code from Flash using the Publish to HTML, when I click my button, nothing happens.
Thanks you in advance for your time and knowledge.
alert('Hello, world...'); // mind the quotes
var my_message = 'Hello, world...'; // set the variable my_message
alert(my_message); // no quotes here
So, if you want to alert a message from ActionScript:
var my_message:String = 'Hello, world...';
Thank you for the post. I copied and pasted your example into the ActionScrit and it does not work. I am using ActionScript 2.0. Is there something else I need to check to see why this is not working? Any other ideas?
My problem may be with how I am testing the ActionScript in Flash. I ended up publishing the Flash file to an .SWF and ran it in my local web environment. Everything worked perfect. But I still can not get the ActionScript to alert the message in Flash. Should I be able to? If so, how do I do it?
So most people test Flash with ActionScript by publishing the Flash file to a .SWF and then load the .SWF into their web environment? It seems like there would be a more efficient way to test the ActionScript.
Yes but since in your case you’re calling something which is not a part of Flash then you do need test your application in a browser.
You can always use trace() for that.
Thank you for the response.