My first actionscript and I have two errors when I run it. Basically this code is to control scrolling navigation.
Code
onClipEvent (load) {
_x = 0;
_y = 0;
spd = 8;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/spd;
_y += (endY-_y)/spd;
}
_root.News.onRe lease = function() {
endX = 0;
endY = 0;
}
_root.Shows.onR elease = function() {
endX = -220;
endY = 0;
}
_root.Biog.onRe lease = function() {
endX = -440;
endY = 0;
}
_root.Band.onRe lease = function() {
endX = -660;
endY = 0;
}
Error...
**Error** Scene=Scene 1, layer=Pages, frame=1:Line 1: Clip events are permitted only for movie clip instances
onClipEvent (load) {
**Error** Scene=Scene 1, layer=Pages, frame=1:Line 6: Clip events are permitted only for movie clip instances
onClipEvent (enterFrame) {
Total ActionScript Errors: 2 Reported Errors: 2
Please Advise
Code
onClipEvent (load) {
_x = 0;
_y = 0;
spd = 8;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/spd;
_y += (endY-_y)/spd;
}
_root.News.onRe lease = function() {
endX = 0;
endY = 0;
}
_root.Shows.onR elease = function() {
endX = -220;
endY = 0;
}
_root.Biog.onRe lease = function() {
endX = -440;
endY = 0;
}
_root.Band.onRe lease = function() {
endX = -660;
endY = 0;
}
Error...
**Error** Scene=Scene 1, layer=Pages, frame=1:Line 1: Clip events are permitted only for movie clip instances
onClipEvent (load) {
**Error** Scene=Scene 1, layer=Pages, frame=1:Line 6: Clip events are permitted only for movie clip instances
onClipEvent (enterFrame) {
Total ActionScript Errors: 2 Reported Errors: 2
Please Advise