WARNING: Actions on button or MovieClip instances are not supported in ActionScript 3

WARNING: Actions on button or MovieClip instances are not supported in ActionScript 3

I'm getting the error message below for a button I have that goes to url function. What code do I need to do for this to work?

This is what I'm using now:

on (release) {
getURL("http://www.angelfire.com/in/HisTruth/copyofindex.html", "content");
}

(Can I use this code and just change it to actionscript 2 instead or what?)


WARNING: Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored.

thanks for any help,
tseyigai

If you change the publish settings to actionscript 2 you’ll be ok

Well, that work for the gotourl but then it won’t allow the other coding to work for my fla.

If you use actionscript 3, then
a) you can’t place code on top of clips, it has to reside in the root timeline
b) you can’t use getURL, instead use URLRequest and navigateToURL, and addEventListener to monitor click events

Well, this is what I’ve been told to use and it comes up as a “duplicate error.”*And it’s the “only” one that is being used, so there shouldn’t be a duplicate error message.

*I’ve placed this code in a second layer underneath the main layer.

[B]btn.addEventListener(MouseEvent.CLICK,f);

function f(e:MouseEvent):void{
navigateToURL(new URLRequest("http://www.adobe.com

"));
}
[/B]