views:

449

answers:

1

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 :)

+1  A: 

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 :)

jxd215
And by "wrong code" you mean AS2 code.
kaloyan