Вопрос

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");
}
Это было полезно?

Решение

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");

}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top