This content has been marked as final. Show 5 replies
What errors does the compiler throw?
None... the link does not work...
I am reading something off of the Adobe site that you have to create a button then place this code on the release part of the button...?
I have created a button on top of the entire banner; selected it; then hit F9; add in the action script from above and nothing... any suggestions?
Then I don't know...not sure what clickTAG even is ... lol
clickTag is how Pointroll and others set links into SWFs through the browser. clickTag is set through flashVars so it exists whenever the SWF is run. To access the value of the clickTag, reference is like _root.clickTag. It's really not that hard, it's just a String that lives at _root. You shouldn't need to change clickTag and test whether you should getURL to it or not, you just should.
To test it, look into running traces. trace("clickTag: " + _root.clickTag);
I wouldn't use the substr method on clickTag, though, because it's too specific. Try something like
if (clickTag.indexOf("COMPANY.com") >= 0) getURL(_root.clickTag);
For the record, this if Flash--reporting that "the link does not work..." doesn't tell us anything. Do you get a hand cursor? Does it link to the wrong page? Does it link to a blank page? Does it make something else happen? Flash is too multi-faceted for something to simply "not work." HOW does it not work?
When you run into problems, use your traces and look at similar code that does what you'd like and see where you've gone astray.
there's sure no reason your link would ever work because that conditional can never resolve to true. use _R_'s suggestion.