A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: (Flash8) Syntax problem with attachMovie

  1. #1
    Senior Member
    Join Date
    Sep 2002
    Location
    Clogland
    Posts
    100

    (Flash8) Syntax problem with attachMovie

    Howdy, this works...

    Code:
    update_area1.attachMovie("mc1","mc1",1);
    ... but I would like to achieve it dynamically as in...

    Code:
    var update_area_number:Number = 1
    var updateName:String = "update_area" + update_area_number; // "update_area1"
    updateName.attachMovie("mc1","mc1",1);
    Thanks in advance

  2. #2
    foo to you foo2's Avatar
    Join Date
    Nov 2006
    Location
    Germany,Europe
    Posts
    180
    PHP Code:

    var update_area_number:Number 1
    var updateName:String "update_area" update_area_number// "update_area1"
    this[updateName].attachMovie("mc1","mc1",1); 
    Sorry for my bad english. Feel free to correct my mistakes

  3. #3
    Senior Member
    Join Date
    Sep 2002
    Location
    Clogland
    Posts
    100
    Excellent, thank you

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