A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [F8] Operator '=' followed by an operand - Error

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Posts
    140

    [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

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    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.

  3. #3
    Senior Member
    Join Date
    Jun 2001
    Posts
    140
    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.

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    it means the code i posted has no errors.

    gparis

  5. #5
    Senior Member
    Join Date
    Jun 2001
    Posts
    140
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center