A Flash Developer Resource Site

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Apr 2006
    Posts
    7

    Update actionscript to mx2004?

    Can anyone help me debug the following errors. I am hoping that the problem is just that a different version of flash was used to create the code. The version i am using is MX2004.

    **Error** Scene=Scene 1, layer=Layer 6, frame=60:Line 1: Unexpected '/' encountered
    /datalayer1name = player1;

    **Error** Scene=Scene 1, layer=new actions, frame=61:Line 3: Operator '=' must be followed by an operand
    g1 = (/data:g)/10000;

  2. #2
    Senior Member jweeks123's Avatar
    Join Date
    Mar 2006
    Posts
    1,124
    take out the / in front of data

  3. #3
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Use of / and : like this comes from flash 4. The equivalent in flash 5 and would use dot syntax, like this,

    _root.data.player1name = player1;
    g1 = _root.data.g / 10000;

    in the first case,

    _root.data.player1name = player1;

    do you want to set player1name to be the content of a variable player1 or to be the text player1? If you want it to be the text you would use,

    _root.data.player1name = "player1";

    instead

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