A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: string manipulation with "this" object

  1. #1
    Junior Member
    Join Date
    Oct 2003

    string manipulation with "this" object

    I have a button within a movie clip that passes an identifier to a function like so:

    on (release)

    The function recieves "this" as "_level0.mc_main_menu.game0"

    I want to treat the returned value as a string & get the value "game0" from it.

    How do I do this?

    Am I right in saying that "this" is an object, and I need to convert it to a string first?

    p.s - in case your interested - the value "game0" matches an xml node & the function plays a movie clip which is populated by the node attributes.

  2. #2
    Senior Member
    Join Date
    May 2003
    in your function if for example you are calling the passed varible "mc"(so really "mc" is becoming "this") you should just be able to put "mc._name" and that will give you the instances name. Hopefully in your case "game0".

    And that will actually give you a string so no need to convert it.


  3. #3
    Junior Member
    Join Date
    Oct 2003


    Thank you, that works perfectly.

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