A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Old Newbie I Really Need Your Help

  1. #1
    Senior Member
    Join Date
    May 2002
    Posts
    132

    Old Newbie I Really Need Your Help

    Hi all,

    Old newbie I think you would know the answer to my problem so I thought I wwould just ask you first.

    I have attached a flash file for you to see what I am actualy trying to do.

    What I am trying to do
    ---------------------------------------------
    I have 3 keyframes each with a different coloured square.
    Each different square has a fade in and fade out tween.

    There are three buttons 1 for each square

    When the movie plays it fades in the first square then stops on its keyframe

    when I click the second green button what I want it to do is play out the tween of the first square so it appears to fade out then it would go to the start of the tween of the fading in of the green square.

    What I am having trouble with is when I am at one square I want to be able to click a button and the movieclip knows to fade out the square it is on then jump to the frame label of the square I want to start the fade of so matter whic one your on it will always finish its tween before starting the next section tween.

    I tried doing this by puttin a blank movieclip on the stage which elvaluates whether are variable is true or not which would be set by the button pressed in order to decipher which section to jump too.

    At present it is just playing through to the second section.

    WHAT AM I DOING WRONG!

    Feel free to change the flash file that I have posted and that goes for anyone that knows the answer

    I appreciate any help given in advance

    Cheers
    Pixelmagik
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Aug 2003
    Posts
    163
    The code is very sloppy, but if you want a quick solution, in your empty MC you forgot to reference the variable "two" as "_root.two" and the frame that you tell the play head to go to "lvl2Begin" does not even exist and you are telling that movie clip to go to those frames, not the root. take out that empty MC completely and put this in you main timeline where that empty MC is now:


    if(_root.two){
    _root.gotoAndPlay("2begin");
    }else{
    _root.gotoAndPlay("3begin");
    }

    Keep coding and you'll eventually get the hang of it.

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Charming!

  4. #4
    Senior Member
    Join Date
    May 2002
    Posts
    132
    Hey Treylok,

    Thanks for your help I really appreciate it.

    In what way do you mean my code is sloopy. what do I need to improve.

    I gradually get better as I go with my code and so shall keep coding

    Thanks
    Pixelmagik

  5. #5
    Senior Member
    Join Date
    Aug 2003
    Posts
    163
    It wasn't that bad, it's just that it takes a while to learn all of the functions and objects in flash (I don't even know half of them). The more you keep at it the more effecient your code will get. It just takes time. There is no magical tutorial that will teach you how to keep your code elegant. Besides, I am just giving my perspective. If I were to post some of the projects I have done you would say the same thing about my code, maybe worse . I just saying to keep at it and in a few months from now, look back at that code, and I bet you will have a better solution for solving the same problem.

  6. #6
    Senior Member
    Join Date
    May 2002
    Posts
    132
    I appreciate your honesty and I look forward to the day I can look back on my code and smile!

    I am grateful for all your help.

    Cheers Pixelmagik

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