A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: controlling movieclips

  1. #1
    Junior Member
    Join Date
    Oct 2001
    Posts
    16

    Smile

    Hello,

    Can anyone help with the following, I have a navigationbar with buttons controlling the movieclips,
    when you hit the button it plays the movieclip (i used the "with" function and then the command it should play).
    The problem is that when I press another button to play another movieclip movieclip, I have to hit the button twice, so it makes it for the user funny to navigate cause they have to press the button twice...
    I used "on release" as mouse event.
    Can anybody tell if it's a scripting problem or something else?

    Thanx

  2. #2
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    might be a scripting problem.
    showing us the code you use would make it easier to help...

  3. #3
    Junior Member
    Join Date
    Oct 2001
    Posts
    16

    code

    Here is the code for one of the buttons

    The first with is to control the movie which has to play, the others to stop the other movieclips and make them disappear again.

    on (release) {
    with (profilecontent) {
    play();
    with (contactcontent) {
    gotoAndStop(31);
    }
    with (photoshopcontent) {
    gotoAndStop(40);
    }
    with (websitecontent) {
    gotoAndStop(58);
    }
    with (clicksound) {
    gotoAndPlay(2);
    }
    with (videocontent) {
    gotoAndStop(33);
    }
    }
    }

  4. #4
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    is that the exact code you use on the button ???
    cause: in line 3 after play(); you have to close that curly bracket.
    if it is no mistake but nested 'with' commands then it beats me. i'ver never tried nesting 'with'. this might be the problem then... ????

  5. #5
    Junior Member
    Join Date
    Oct 2001
    Posts
    16
    That's the code allright! , there is more code on the button button that's for the rolloverstate of the button so it doesn't control any of the movieclips,

    If I start moving around in my code an start adding or delete any brackets, it gives a message that my code is wrong (syntax error)...
    so...


  6. #6
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    yeah, well the amount of brackets is alright.
    but you realize that all 'with' are contained (nested) within the first 'with'.
    if you add a bracket after play() you have to delete a bracket at the end.
    but anyway, you don't need 'with' here. a simple profilecontent.play();
    profilecontent.contactcontent.gotoAndPlay(31);
    a.s.o. would do the job also...
    you just have to take care of the correct targetting.

    unfortunately, i'm not much of a help, cause i haven't used 'with' much...

  7. #7
    Junior Member
    Join Date
    Oct 2001
    Posts
    16
    ok, I'll try it, thanx for the help... greetingz Biaz

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