Howto: Flash ClickTAG for ActionScript 3 (AS3)

Create a new layer and make a rectangle that covers the whole area. Convert the rectangle to a Symbol (F8), and select Type: Button.

Flash ClickTAG AS3

Select the Symbol and give the Button an instance name, like I did: “btn_knop”. There are many ways of hiding the transparent layer. I prefer to use Color Effect: Alpha 0%. (See below).

Flash ClickTAG AS3

Then press F9 (or go to your actions tab) and add the following code to to the Actions Frame:

btn_knop.addEventListener(MouseEvent.CLICK,function(){
navigateToURL(new URLRequest(root.loaderInfo.parameters.clickTAG), "_blank")
});

Rename btn.knop if you changed the name of your instance.

Flash ClickTAG AS3

And that’s it!

Geef een reactie