A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: passing instance name into function not working (MX 2004)

  1. #1
    Junior Member
    Join Date
    May 2004
    Location
    Philadelphia, PA
    Posts
    24

    passing instance name into function not working (MX 2004)

    I am trying to pass an instance name into a function and its not working properly.

    here's the call:
    UpdateGraphicStatus("MIM", "mim1", "fault");


    here's the function definition:
    function UpdateGraphicStatus(objectType, objectIdentifier, state){

    here's the reference in the function:
    [objectIdentifier].gotoAndPlay("fault");

    I've tried it with and without the (.) after the brackets, and with and without the (_root)reference before the bracket notation.

    I'm at the end of my rope with this one.

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Location
    London
    Posts
    293
    should be ok
    Code:
    UpdateGraphicStatus("MIM", "mim1", "fault");
    function UpdateGraphicStatus(objectType, objectIdentifier, state){
    _root[objectIdentifier].gotoAndPlay("fault");
    trace(_root[objectIdentifier])
    }

  3. #3
    Junior Member
    Join Date
    May 2004
    Location
    Philadelphia, PA
    Posts
    24

    Thanks a TON!

    and...BOOM!, worked like a champ. Thanks again,

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