문제

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