dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Nested Buttons within movie won't work - help!

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Posts
    3

    Nested Buttons within movie won't work - help!

    I'm having trouble with buttons to work that are embedded in a movie on the main stage. It doesn't matter if they are button-buttons or movie buttons.

    Specifically, I have an external .swf load into the movie's main stage. The loaded external .swf has some buttons that advance the movie, but they won't work even though the cursor turns into the finger.

    Any thoughts on why the buttons will not work?

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    "I have an external .swf load into the movie's main stage"

    You can not load a movie to the main stage, Only into a _level of the Flash player or into a movieclip ( which could be on the main timeline ). There is a difference how to target these.

    If you are loading into a movieclip, the main problem is any reference to the _root, which then will point to the wrong timeline ( a swf loaded this way is regarded as the movieclip its loaded into, and movieclips dont have a root ). Only the host swf ( main swf ) has a _root.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Junior Member
    Join Date
    Aug 2004
    Posts
    3

    Yes, it loads into a clip

    Pellepiano,

    Ah, I see what you are saying. You are right, of course, the .swf is loaded into a movieclip, called viewer_mc. The .swf loads just fine but the buttons will not respond (they are supposed to advance the .swf, which has screens). In its own player, the .swf works just fine.

    So the .swf loads into the movie clip with 'loadMovie ("name_of_movie.swf", "viewer_mc")...' but the loaded .swf file's buttons will not work.

    No reference to the _root in the target.

    Any thoughts?
    Last edited by gburruss; 07-14-2005 at 10:53 PM. Reason: minor correction

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Its in the external swf, that there should be no _root or _level references.
    Whats the action on the buttons?

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  5. #5
    Junior Member
    Join Date
    Aug 2004
    Posts
    3
    Okay, I jsut figured it out. The movie clip that was replaced by the external .swf had drop and drag actions assigned to it. The external .swf would load and could be dragged, but the button did not work. I deleted the drop and drag functions and viola -- the buttons now work.

    Is that because the drop and drag functions supersede the button in the nested movie? That would make sense. But now the loaded movie wont drag like I wanted it to.

    Thanks for the help.

  6. #6
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    You can put some drag actions on the buttons instead, should work just as well.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

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