A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [F8] the trouble with true or false.

  1. #1
    Member
    Join Date
    Nov 2005
    Posts
    42

    [F8] the trouble with true or false.

    Hi all,
    Was wondering if someone could help? I have tried every way I can (as an amateur) and have completley confused myself!
    I have a button that when pressed plays movie clip foundation1_MC. inside this MC at the end is a bit of code.
    Code:
    foundation1_MC=true
    I also have an MC with this bit of code
    Code:
    onClipEvent (enterFrame) {
    	if(_root.foundation1_MC=true){
    		gotoAndStop("fact");
    Basically I wanted it then to jump to a choice of 2 frames one if the movie clip has ended on true and one if it hasn't. And for those of you who now more than I do you can probably tell it don't work!
    The reason why I wanted to do it this way was so eventually I could add more frames with more buttons almost like a multiple choice with a final scene showing the decisions that were made.
    Any help would be great or point to a tutorial, I couldn't find a helpful one!
    Thanks in advance

  2. #2
    Member
    Join Date
    May 2007
    Posts
    39
    pretty much the same thing you've got, just a little stricter:
    Code:
    var foundation1_MC:Boolean = true;
    you've got a syntax error, update to:
    Code:
    onClipEvent (enterFrame) {
    	if(_root.foundation1_MC==true){
    		gotoAndStop("fact");
    or leave yourself with less room for error:
    Code:
    onClipEvent (enterFrame) {
    	if(_root.foundation1_MC){
    		gotoAndStop("fact");

  3. #3
    Member
    Join Date
    Aug 2006
    Posts
    56
    I haven't exactly grasped what you're trying to accomplish here, but I have noticed that your "if(_root.foundation1_MC=true)" should be "if(_root.foundation1_MC==true)", or it won't work.

    EDIT: oops, a little late. Nevermind.

  4. #4
    Member
    Join Date
    Nov 2005
    Posts
    42
    Cheers none of it's too late been off ill! So Only just checked! Will have a look and let you know!

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