A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: [F8] Button _root. question

  1. #1
    Senior Member
    Join Date
    May 2001
    Posts
    314

    [F8] Button _root. question

    I have the mcl actions on the main scene frame 01, however my button is located within several movies. Can you please tell me what is wrong with this part of the script. When I press the button, nothing happens.

    thanks

    navClip.mc_navbar_01.btn_about_me.onRelease = function() {
    _root.loader._visible = true;
    mcl.loadClip("new_movie.swf",holder);
    }


    As you can see, the button is located within other mc.
    Dijhili

  2. #2
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    _root.mcl.loadClip("new_movie.swf", _root.holder);
    ????
    Please sign here

  3. #3
    Senior Member
    Join Date
    May 2001
    Posts
    314
    ops, yea my bad..hehehe
    Dijhili

  4. #4
    Senior Member
    Join Date
    May 2001
    Posts
    314
    the button (btn_about_me) is actually located on frame 5 and not the first frame. Could this be the problem ? The scrip is looking for it on frame 1 ?
    Dijhili

  5. #5
    Senior Member
    Join Date
    May 2001
    Posts
    314
    when I move the button to the first frame it works fine. So obviously the issue is that the script is not looking at frame 5 for the mc (btn_about_me). So how can I change this line of code to find it on the 5th frame ?

    navClip.mc_navbar_01.btn_about_me.onRelease = function() {

    Thanks again
    Dijhili

  6. #6
    Senior Member Dricciotti's Avatar
    Join Date
    Aug 2002
    Posts
    2,988
    Put the code in the same frame as the button's parent clip or have your clip in the first frame (even if its hidden)

  7. #7
    Senior Member
    Join Date
    May 2001
    Posts
    314
    Is there another way ? I really need it to be where it is. The button is animated with a few other navigation bars.... I just need to get it to look on the 5 frame. If I change it to be on the first frame it would be lots of redo'ing.

    But if there is no other way
    Dijhili

  8. #8
    Senior Member Dricciotti's Avatar
    Join Date
    Aug 2002
    Posts
    2,988
    Put the code on the 5th frame then. Code cant be assigned to something that doesnt exist yet.

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