determine object position or collision // rename Lectora object

All,


I think I've seen this as an issue before, but can't find a solution. In a nutshell, I need to be able to either "rename" Lectora objects to a user-generated name rather than the "random" lectora-generated (HTML) name, or at least allow the compiled code to recognize a particular object as "this.".


I'm trying to either determine the X,Y position of an object or collision with another object. I need this to be flexible yet generic so the logic is easily reused without need for additional input. I also don't want to modify the lectora .js files or add new external .js files since i can't ensure they will be properly inserted.


I've been able to write, call, and test functions in both the core lectora file, as well as the external .js files (trivantis-image, trivantis-inline). My tests work if I "hard-code" Image####.objLyr.[...]. Unfortunately I can't seem to recognize this.objLyr.[...] when i call a function from the image object.


(i.e. --(image7774.objLyr.hasMoved = true) tests TRUE, but (this.objLyr.hasMoved = true) tests FALSE)


I'm using an action under my image object to Go To > Web Address > javascript: FunctionName(); to call functions.


Any ideas how I can capture "this... object" so I can rename the entry? That would open up a world of opportunities, efficiencies, and portability as a template.


Thanks in advance for your help!

Lisa

Discussions have been disabled for this post