Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

clickTag and AS3 code c heck please

27 views
Skip to first unread message

Ofeargall

unread,
Sep 18, 2007, 2:18:23 PM9/18/07
to
I'm new to Flash and Action Script. I'm creating a banner ad for a clent for
the first time. I've created a transparent MovieClip covering the stage called
clickthrough_mc. The agency wants a clickTag added. Here's the code I've added
to the actions layer. Can someone proof it for me and let me know if I'm doing
this right?

on(release)
{
getURL (_level0.clickTag, "_blank");
}

clickthrough_mc.buttonMode = true

I get errors but I assume that is because my code is calling for something
that doesn't exist yet because the swf isn't uploaded to the host site, correct?

Here's the error codes.

1180: Call to a possibly undefined method on.

Manno Bult

unread,
Sep 18, 2007, 3:11:28 PM9/18/07
to
Set the publish settings to Actionscript 2 instead of 3.

Or ask for up to date documentation for actionscript 3, your client
should be able to provide it if it's there. I kind of doubt it will be
though, most banners don't need AS3 functionality, I suppose they won't
bother.

HTH,
Manno


--
----------
Manno Bult
http://www.aloft.nl

SymTsb

unread,
Sep 18, 2007, 3:33:26 PM9/18/07
to
This is invalid code for AS3. Your code above is for AS2. The on method was
deprecated in AS3 and a new event model replaced the old style of events.


// AS3 Code
// Assumes that clickTag is a URL to whatever page you want to go to...

var clickTag:String = "http://www.mysite.com/";

clickthrough_mc.addEventListener( MouseEvent.CLICK, handleClick );
clickthrough_mc.buttonMode = true;
function handleClick( e:MouseEvent ):void{
navigateToURL( new URLRequest( clickTag ) );
}

0 new messages