A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: dot syntax conversion problem

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

    dot syntax conversion problem

    Hi,

    Can anyone shed light as to why the dot syntax format will not execute at all? I think I converted everything right.

    Both examples appear below.

    //converted to dot syntax
    _root["orbit"+i]._xscale = 300*Math.cos(Math.PI/nrc*i+Math.PI*cnt*step/300);

    //original code
    setProperty("orbit"+i,_xscale,300*Math.cos(Math.PI/nrc*i+Math.PI*cnt*step/300));

    Thanks

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Have the variables nrc, cnt, and step all been initialized?

  3. #3
    Senior Member
    Join Date
    Jun 2001
    Posts
    250
    yes they have been initialized.

    I'm sorry, I forgot to mention that the code works like a charm! The problem I'm having is trying to convert the code from traditional Flash to dot syntax format.

  4. #4
    :
    Join Date
    Dec 2002
    Posts
    3,518
    The way you have converted it is correct, IF the orbit MCs are on the _root timeline. Where are the orbit MCs, in relationship to the position of the code?

  5. #5
    Senior Member
    Join Date
    Jun 2001
    Posts
    250
    there is only one mc being made to orbit at this time and the code is placed inside that clip.

    clip1 is on stage > code on frame 1;

  6. #6
    Senior Member
    Join Date
    Jun 2001
    Posts
    250
    Just to be clear, clip1 is on stage > code on frame 1 inside clip1.

  7. #7
    Senior Member
    Join Date
    Jun 2001
    Posts
    250
    From your response I was able to figure it out. It was a pathing issue as you aluded to in your post. After closer observation, the clip was actually nested two deep.

    Thank You

  8. #8
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Okay.

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