Copy link to clipboard
Copied
I have a graphic symbol nested inside another graphic symbol.
The parent symbol has movement controlled via JavaScipt on button press on the main timeline. I want to do the same for the nested symbol. How would I do that?
Worked it out...
Copy link to clipboard
Copied
At the moment I have this code on the main timeline.
The symbol RFLensHolder is not rotating. However, if I change that code to a diferent graphic symbol which is not nested, that symbol rotates. It appears to be an issue with controlling nested symbols.
//Right Frame Rotate CW Buttons
this.ButtonRotateCWRightFrame.addEventListener("mousedown", RF_RotateCW_Down.bind(this));
this.ButtonRotateCWRightFrame.addEventListener("pressup", RF_RotateCW_Up.bind(this));
this.ButtonRotateCCWRightFrame.addEventListener("mousedown", RF_RotateCCW_Down.bind(this));
this.ButtonRotateCCWRightFrame.addEventListener("pressup", RF_RotateCCW_Up.bind(this));
//Right Frame Rotate CW Buttons functions to move Rotate Frame CW
function RF_RotateCW_Down() {
createjs.Ticker.addEventListener("tick",updateRF_RotateCW);
}
function RF_RotateCW_Up() {
createjs.Ticker.removeEventListener("tick",updateRF_RotateCW);
}
function updateRF_RotateCW(){
var angle = 1/Math.PI;
root.RFLensHolder.rotation += angle;
}
Copy link to clipboard
Copied
Worked it out...