A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Syntax problem...

  1. #1
    Senior Member
    Join Date
    May 2001
    Location
    Holland
    Posts
    286

    Syntax problem...

    Hi,

    This works:
    Actionscript Code:
    _level0.section_19_mc.editingPane2.spContentHolder.hold.cat0.e.label.text;
    Now, the 0 (after cat) could also be 1, 2, 3 and so on. But when I try to pass [this.id] (so that could be 1,2,3 etc.) it doesn't work. I tried two ways:

    Actionscript Code:
    _level0.section_19_mc.editingPane2.spContentHolder.hold.cat[this.id].e.label.text;
    and

    Actionscript Code:
    _level0["section_19_mc.editingPane2.spContentHolder.hold.cat"+[this.id]].e.label.text);
    Both failed, do you know how to write the syntax correctly?

    Many, many thanx!

  2. #2
    AKA [ Paul Bainbridge] webdreamer's Avatar
    Join Date
    Aug 2001
    Location
    Glasgow, Scotland, UK
    Posts
    3,320
    code:

    _level0.section_19_mc.editingPane2.spContentHolder .hold['cat'+this.id].e.label.text;

    .: To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Twitter - Linkedin
    bringmadeleinehome.com

  3. #3
    Senior Member
    Join Date
    May 2001
    Location
    Holland
    Posts
    286
    Thank you Paul, one can always rely on the Scottish !

  4. #4
    AKA [ Paul Bainbridge] webdreamer's Avatar
    Join Date
    Aug 2001
    Location
    Glasgow, Scotland, UK
    Posts
    3,320
    Quote Originally Posted by Schenkius View Post
    Thank you Paul, one can always rely on the Scottish !
    Nice one
    .: To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Twitter - Linkedin
    bringmadeleinehome.com

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