Copy link to clipboard
Copied
hi everyone,
Im trying to change the alpha of an instance by code
I did this code (and many many others but it doesn't work)
//global Var
var logoName = "";
//open popup window
this.WazeBtn.addEventListener("click", WazeText.bind(this));
function WazeText(event){
logoName = "WazeXY";
this.PopUp.WazeXY.alpha = 1;
}
//hide instance in popup window
this.PopUp.Exit.addEventListener("click", PopUp_close.bind(this));
function PopUp_close() {
this.PopUp.logoName.alpha = 0; // this line doesn't work
}
I will love some help with this problem
many thanks.
It will work like this:
function PopUp_close() {
this.PopUp[logoName].alpha = 0; // this line doesn't work
}
Copy link to clipboard
Copied
It will work like this:
function PopUp_close() {
this.PopUp[logoName].alpha = 0; // this line doesn't work
}
Copy link to clipboard
Copied
Colin thank you vary much!! I struggled with this line for hours
Copy link to clipboard
Copied
You're actually changing an instance by using a variable, not a string (literal).
Find more inspiration, events, and resources on the new Adobe Community
Explore Now