Reputation: 77
Okay so I've probably watched and read every tutorial available on this subject, and none of them have worked for me, so I'm going to the pros(thats you guys :D) I'm trying to make a custom scroll button/ textfield setup. I have the dynamic textbox, the buttons, here's the code :
Down.on(click) = function() {
scrolltext.scroll--;};Up.on(click) = function() {
scrolltext.scroll++;};
And I'm getting the error "Target of Assignment must be a reference value"
Any suggestions and/or advice would be greatly appreciated :)
Upvotes: 0
Views: 1895
Reputation: 77
I figured it out! I was using the wrong code. Here is what I found made it work:
function clickUp(event:MouseEvent):void {
scrolltext.scrollV -=1; } Up.addEventListener(MouseEvent.CLICK, clickUp);function clickDown(event:MouseEvent):void {
scrolltext.scrollV +=1;} Down.addEventListener(MouseEvent.CLICK, clickDown);
Thanks everyone for pointing me in the right direction :)
Upvotes: 1