For some reason the following scroll bar actionScript does not work when published as actionScript 2.0. I really need it as 2.0 player 8. Can someone take a look at the link below? Thanks. http://www.ctvdesigns.com/scrollbar.zip
Actually, I'm getting the following errors. I tried changing 0 to NaN. Didn't work. Any other ideas? [b] Thanks for your help!.[/b] **Error** Symbol=scroll down button, layer=Layer 1, frame=1:Line 3: Unexpected '.' encountered ../:loopEnabled = 0; **Error** Symbol=scroll down button, layer=Layer 1, frame=1:Line 4: Statement must appear within on handler tellTarget ("../") { **Error** Symbol=scroll down button, layer=Layer 1, frame=1:Line 7: Unexpected '}' encountered } **Error** Symbol=scroll up button, layer=Layer 1, frame=1:Line 3: Unexpected '.' encountered ../:loopEnabled = 0; **Error** Symbol=scroll up button, layer=Layer 1, frame=1:Line 4: Statement must appear within on handler tellTarget ("../") { **Error** Symbol=scroll up button, layer=Layer 1, frame=1:Line 7: Unexpected '}' encountered } **Error** Symbol=clip scroll knob, layer=Layer 1, frame=1:Line 2: Operator '+' must be followed by an operand startDrag("", false, getProperty("", _x), Number(getProperty("../scroll_track", _y))+Number(../:scrollTrackPadding), getProperty("", _x), Number(Number(getProperty("../scroll_track", _y))+Number(../:scrollTrackPadding))+Number(../:travelLength)); **Error** Symbol=clip scroll knob, layer=Layer 1, frame=1:Line 3: ')' or ',' expected tellTarget ("../") { **Error** Symbol=clip scroll knob, layer=Layer 1, frame=1:Line 6: Unexpected '}' encountered } Total ActionScript Errors: 9 Reported Errors: 9
don't change a zero to NaN in the script. i was pointing out that an undefined numeric variable in older versions of actionscript was understood to have a value of zero. so, you could, for example, add one that undefined variable and it would have a value of one. with the current version of flash if you add one to an undefined variable it is NaN (or Not a Number). as for those errors, well that code is a mess. i started to correct that code and saw some other "issues". for example, the author of that code used maxScroll which is incorrect. that should be maxscroll and is one of the two major problems i mentioned above.
I got it to work! I just changed this: .../:scrollTrackPadding to this: this._parent.scrollTrackPadding and this: .../:loopEnabled = 0; to this loopEnabled = 0;
Don't see what you're looking for? Try a search.
|