A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Here's a complicated mindbender...

  1. #1


    I have 6 different buttons on a main timeline that I want to have behaving this way (numbers are examples):

    when the user clicks on button 1,
    if frame 10 of nested movieclip 4,or 2, or whatever, is active,
    then, nested movieclip 1 will play from frame 15 and nested movieclip 2 will play from frame 1...
    if not, then I want nested movieclip 1 to stop at frame 10 and nested movielclip 2 to stop at frame 3...

    I got the 1st part right but I don't understand why my "else if" isn't working...

    pleease help......

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Hi squisshh...not sure without seeing your actual code, but it sounds like maybe you just need an "else" instead of an "else if".......but that's purely a guess....post your code and we can tell more...


  3. #3
    I've tried so many combinations of code but I am starting to settle for the fact that what I want is simply impossible (I'm not totally resigned to that yet)...you see, I wanted to have it working so that depending on which section of the page you are at (determined by number of frame in a nested MC), when you click on button 1, 2, 3 or whatever, the transition (2 MCs playing and the one that will play depends on which frame in a particular nested MC is) will happen accordingly.
    This is the code that I was using. I had tried using "with" instead of tellTarget but it wouldn't work at all and I have tried several combinations... It's not reading my else if (sniff..)

    on (release) {
    if (mainclip==true) {
    tellTarget ("/mainMC") {
    gotoAndPlay (11);
    tellTarget ("/contact") {
    gotoAndPlay (2);
    } else if (about==true) {
    tellTarget ("/contact") {
    gotoAndStop (2);
    tellTarget ("/aboutMC") {
    gotoAndPlay (11);
    etc... (there's more conditions)

    The real purpose of this?
    Well, I have a cool MC that shows up when you are in the main section of the page. When you click on the "about" button for example, a new MC will fade in and the previous one will fade out so they look that they are merging. The thing is that if I am in the news section for example and I click on the about button, the fade in will show as if I were in the main section, thus showing the wrong MC, so, I need to add a new condition right? If there's a simple way of doing this, I'd like to know... thanx

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