flash question

Out of context: Reply #6

  • Started
  • Last post
  • 11 Responses
  • fyoucher10

    Sounds like a scope prob....can't see all of your code so I'm not exactly sure but...
    You're heading in the right direction. Lets say you have a button in _root and you're using the code above. To target a movieclip inside of the loaded SWF from that button, you would use the following:

    mytarget1.myClip_mc.gotoAndPlay... //Example

    Another thing to mention:
    The clip has to be loaded before you can target it as taxiguerilla has mentioned. Does your loading code have to be attached to that button? You may be loading the SWF and then calling interaction code immediately after BUT the clip may not be loading yet.

    Another thing: instead of attaching code directly to the button, try this way instead:
    - Give the button an instance name (i.e. myBig_btn)
    - Add code to a separate layer in the timeline or external script (or a class file when you get into OOP).

    myBig_btn.onRelease = function():Void {
    doThisAction(); //Example
    }

View thread