Graphics Reference
In-Depth Information
return true;
}
public function get targetWindow():String{
return _targetWindow;
}
public function set
targetWindow(value:String):void{
_targetWindow = value;
}
}
}
ClickTagger Breakdown
Okay, are you ready to break this down? Because based on the rest
of this chapter, it
s start out by taking a
look at Table 12.7 and the variables that are instantiated at the top
of the class.
And now let
'
s time for that step, so let
'
s jump right into the ClickTagger constructor,
which requires only one parameter of type LoaderInfo, which is
very creatively named loaderInfo . The LoaderInfo class provides
plenty of information about our .swf including the parameters that
have been passed in to it like flashvars with clickTags. To get to
those parameters, we need not look any further than, you guessed
it, the parameters property of our loaderInfo to get the object that
contains all the name-value pairs that have been sent in to the
banner. Once we have those name-value pairs, we
'
re going to run
through them, convert them to lowercase, and test them against
our _tagName of
'
clicktag.
If we catch one that matches, we check
Table 12.7 The ClickTagger Variables
Variable
Purpose
_clickTags (Array)
An Array that will be filled with Objects containing all the clickTags and
their positions as they are passed in to the banner
_clickObjects (Array)
An Array that will have an Object added to it each time the assignClickTag
method is called
_targetWindow (String)
The window in which the target URL will be launched
_tagName (String)
A String used to handle the case sensitivity issue
_playerType (String)
A String used to determine if the ad is being played in the browser or not
_extInterfaceAvailable (Boolean)
A Boolean that will be set to true if the ad is in a browser and
ExternalInterface is available
_securePattern (RegExp)
A RegExp used to check for “http://” or “https://” in the clickTag
Search WWH ::




Custom Search