-
[F8] Operator '=' followed by an operand - Error
Hi,
I'm getting the following code error and can't figure out why so was hoping someone else might be able to shed some light on the issue:
Error msg:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 134: Operator '=' must be followed by an operand
trace("You pressed this item : " + evt_obj.target.selectedIndex);
**Error** Scene=Scene 1, layer=actions, frame=1:Line 135: Syntax error.
ns.play(tabInfo[evt_obj.target.selectedIndex].flv);
Total ActionScript Errors: 2 Reported Errors: 2
Code triggering error:
Code:
131: var changeListener:Object = new Object();
132: changeListener.change = function(evt_obj:Object)
133: {
134: trace("You pressed this item : " + evt_obj.target.selectedIndex);
135: ns.play(tabInfo[evt_obj.target.selectedIndex].flv);
136: };
137: tab_dg.addEventListener("change", changeListener);
Any advice is appreciated,
Thanks
-
code: changeListener = new Object();
changeListener.change = function(evt_obj:Object) {
trace("You pressed this item : "+evt_obj.target.selectedIndex);
ns.play(tabInfo[evt_obj.target.selectedIndex].flv);
};
tab_dg.addEventListener("change", changeListener);
no syntax errors here.
gparis
Last edited by gparis; 01-02-2007 at 04:10 PM.
-
just commented out all other lines of code and am still getting the same errors.. what does this mean? that you didn't get errors?
I'm using Flash8 and my publish settings are AS2.0
Last edited by digitalpencil; 01-02-2007 at 06:07 PM.
-
it means the code i posted has no errors.
gparis
-
Sorry bit of a stupid error to make there.
Thanks for the revision
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|