dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Calling a function

  1. #1
    Junior Member
    Join Date
    Feb 2001
    Posts
    11
    Good Morning,

    I have a user-defined function in the first frame of the main movie. I am calling the function from a button nested in another movie called mc_map.

    If I place a test button on the main stage and call the function, it works. But if I put the identical action in the button in mc_map, nothing happens.

    Main Movie > mc_map > button > call function - doesn't work
    Main Movie > test button > call function - works

    Any suggestions?

    Thanks...

  2. #2
    Flashmaster
    Join Date
    Sep 2000
    Location
    The Netherlands
    Posts
    38

    Lightbulb use "_root."

    Hi there,

    I had some same problems to control the mainmovie with a button or script in the movieclip.
    But I figured out how to control the mainmovie with a movieclip(-button), just put _root. before the action of button.

    Example:

    You want to go and play the frame with label "test" in the MAINmovie u type in the actionscript of the button in the movieclip:

    _root.gotoAndPlay("test");


    Get it??

    Greetz,
    Cyb :-)

    -----------------------
    http://members.home.nl/joost.verbiest/Ckv.html


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