tryingtolearn — 2008-07-08T12:11:11-04:00 — #1
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.
hexburner — 2008-07-08T12:21:28-04:00 — #2
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...';
tryingtolearn — 2008-07-08T13:18:22-04:00 — #3
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?
tryingtolearn — 2008-07-08T15:16:09-04:00 — #4
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?
stevewebdev2005 — 2008-07-08T15:35:44-04:00 — #5
tryingtolearn — 2008-07-08T15:49:08-04:00 — #6
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.
jim_morrison3 — 2008-07-09T02:42:19-04:00 — #7
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.
tryingtolearn — 2008-07-10T10:20:34-04:00 — #8
Thank you for the response.