A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: targeting a multivaribled path

  1. #1
    Senior Member
    Join Date
    Mar 2000
    Posts
    111

    Wink

    Hi , my problem is I need to target the equivalent of
    _root.man.clothes._gotoandstop(2)

    but using variables for both mansprite and clothes, so I have 10 men all with different clothes right ?.

    I have tried many things to concatanate the variables
    _root[[currentsprite].art].
    _root[[currentsprite]+"."+[art]].

    etc.etc ....so what is the correct way ?


    oddly the below returns a value(1) but cannot be set, it is not the frame val of currentsprite either as that returns 6.
    >>> trace ((_root[[currentsprite].art]._currentframe))
    .. so whats going on then, shouldnt it return " "? I can replace 'art' in this code with anything and it will return '1'

    Any help Appreciated
    TIA


  2. #2
    Member
    Join Date
    Aug 2001
    Posts
    32
    Try _root[currentsprite][art].gotoAndStop
    I haven't tested it though.

  3. #3
    Senior Member
    Join Date
    Mar 2000
    Posts
    111

    Smile that worked

    Hi. thanks that worked.
    I actually used a workaround for what I was doing but coincidentally a workmate needed the same info on concatanation so He's using that method

    Cheers !

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