Question

Instead of having two separate files, can you put both DFA (clickTag) and DFP (clickTAG) code in the same flash file? Or will the code conflict with each other? For example (AS2):

///DFP///

RedBtn.onRelease = function() {
getURL(clickTAG,"_blank");
}

///DFA///

RedBtn.onRelease = function() {
getURL(clickTag,"_blank");
}
Était-ce utile?

La solution

Since variable names are case sensitive, there shouldn't be any problem having clickTag and clickTAG as separate variables with their own definitions.

You would want to combine the two sample functions however, as the second will overwrite the first; RedBtn can only have one definition for onRelease at any given time.

If you replace your code with the following, both URLs can be visited successfully.

RedBtn.onRelease = function() {

    ///DFP///
    getURL(clickTAG,"_blank");

    ///DFA///
    getURL(clickTag,"_blank");

}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top