Graphics Reference
In-Depth Information
it for an int on the end, so we
'
ll know if it
'
s clickTag1, clickTag2,
and so on. From that int , we get the
of the clickTag,
andwewrapitupinanobjectwiththeassociatedURLandput
that object in out _clickTags Array. Finally, after we
position
re finished
checking the parameters for clickTags, we sort the _clickTags
Array based on the tagIndex we pulled from the end of each
clickTag name. Next in this class is the assignClickTag method,
which calls for the parameters in Table 12.8, but first, here
'
'
sthe
constructor:
public function ClickTagger(loaderinfo:LoaderInfo){
for(var p:String in loaderinfo.parameters){
if (p.toLowerCase().indexOf(_tagName) == 0) {
var tagPosition:int = 0;
if(p.length
_tagName.length){
tagPosition =
int(p.substr(_tagName.length))
>
1;
}
_clickTags.push({tagIndex:tagPosition,tagUrl:loaderinfo.
parameters[p]})
}
}
_clickTags.sortOn( " tagIndex " , Array.NUMERIC);
}
t judge
its value by its size because outside of the constructor, this is the
most important method in this class. The first line is reassigning the
value of the tagNumber parameter. The reason for this is because
before all is said and done, tagNumber is going to be used to call on
a position in our _clickTags Array. Since arrays are zero based but
our clickTags aren
This particular method is very short (three lines), but don
'
'
t, we need to drop the value of tagNumber down
Table 12.8 Parameters for the ClickTagger
assignClickTag Method
Parameter
Purpose
element (InteractiveObject)
The InteractiveObject that will accept the click event from the user's mouse
failSafeUrl (String)
The URL to be used during testing and also in the event that the clickTags
don't load for some reason
tagNumber (int)
The clickTag to use for this particular InteractiveObject (clickTag1, clickTag2,
and so on); default is 1
Search WWH ::




Custom Search