FORUMS: list search recent posts

updating project to Flash 8

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jeff Penano
updating project to Flash 8
on Feb 7, 2006 at 4:01:06 pm

I'm trying to update a project from Flash 7 to Flash 8. Thing is I didn't develop the back-end of this thing and slowly trying to figure it out. The project works fine in Flash 7 but I get a few errors when publishing to Flash 8. When I publish I get this error:


**Error** /as/sequence.as: Line 2: ']' expected
var prevBar = this[highlightPrefix add (cue-1)];

**Error** /as/sequence.as: Line 3: ']' expected
var highlightBar = this[highlightPrefix add cue];



--------- The external .as file is as follows: -----------------

function highlighter(cue:Number, highlightPrefix, imagePrefix) {
var prevBar = this[highlightPrefix add (cue-1)];
var highlightBar = this[highlightPrefix add cue];

var prevImg = this[imagePrefix add (cue -1)];
var highlightImg = this[imagePrefix add (cue)];

if(highlightBar.lit != true) {
prevBar._alpha = 0;
prevImg._alpha = 0;

highlightBar._alpha = 70;
highlightImg._alpha = 70;
highlightBar.lit = true;
} else {
highlightBar._alpha = 0;
highlightImg._alpha = 0;
highlightBar.lit = false;
}
}

function imageCue(cue:Number, imageArray:Array) {
if (stopPressed != true) {
loadImage(_global.path + "images/" + imageArray[cue-1]);
} else {
loadImage(_global.path + "images/" + imageArray[0]);
}
}

----------------------------------------------------------------------

If push comes to shove I'll just keep developing this project in Flash 7 but I'd really like to upgrade it to 8.


Return to posts index

LeeBrimelow
Re: updating project to Flash 8
on Feb 7, 2006 at 11:22:11 pm

I'm not understanding this line of code...

ar prevBar = this[highlightPrefix add (cue-1)];

what is the add for?


Return to posts index

LeeBrimelow
Re: updating project to Flash 8
on Feb 7, 2006 at 11:23:01 pm

If you are trying to concatenate something together you need to use the "+" sign instead of add


Return to posts index


Jeff Penano
Re: updating project to Flash 8
on Feb 8, 2006 at 3:41:38 pm

Yeah, changing "add" to "+" seemed to work. Much thanks!

--Jeff Penano


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]