Can anyone a code making appear "Correct".. read p

  • Adde
  • Beginner
  • Beginner
  • Adde
  • Posts: 47

Post 3+ Months Ago

I was thinking of doing a puzzle, thats very easy but im a noob and i need to know a script that makes if you place all the bits on the right place that it appears "Correct!"... Anyone can? Please help me!

Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5149
  • Loc: SC-USA

Post 3+ Months Ago

Here's one way. Assume there are 10 pieces to your puzzle...

Code: [ Select ]
myResult = 0;

puzzlePiece.onRelease = function(){
   if (correctPlace === true){
     myResult += 1;
   }
   checkMyResult();
};

function checkMyResult(){
   if (myResult === 10){
     myTextField = "Correct";
   }
}
  1. myResult = 0;
  2. puzzlePiece.onRelease = function(){
  3.    if (correctPlace === true){
  4.      myResult += 1;
  5.    }
  6.    checkMyResult();
  7. };
  8. function checkMyResult(){
  9.    if (myResult === 10){
  10.      myTextField = "Correct";
  11.    }
  12. }
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Just out of curiosity, Are you reading the "Introduction To Actionscript" tutorial that comes up after clicking "Tutorials" in the "Answers" window ?
  • Adde
  • Beginner
  • Beginner
  • Adde
  • Posts: 47

Post 3+ Months Ago

No... im not reading that... but thanks digitalMedia
  • Adde
  • Beginner
  • Beginner
  • Adde
  • Posts: 47

Post 3+ Months Ago

on what site is that "Introduction To Actionscript" tutorial that comes up after clicking "Tutorials" in the "Answers" window ?, ?
  • Adde
  • Beginner
  • Beginner
  • Adde
  • Posts: 47

Post 3+ Months Ago

and digitalMedia, that actionscript, shall i have it on the frame?(or a button or a MC etc.)
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5149
  • Loc: SC-USA

Post 3+ Months Ago

I would write all my ActionScript (functions, event handlers for mc's and all) as a frame script. Probably in a single frame.
  • Adde
  • Beginner
  • Beginner
  • Adde
  • Posts: 47

Post 3+ Months Ago

Ok, thanks
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Adde wrote:
on what site is that "Introduction To Actionscript" tutorial that comes up after clicking "Tutorials" in the "Answers" window ?, ?


Sorry about that :oops: The help files that come with flash, If you press ALT+F1 it brings up the Answers window, If from there you click tutorials it will bring up a browser window with a few options on the left, the Introduction to actionscript tutorial has a puzzle in it, that's why I asked :D

Looks like dM has you goin allready though :D

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.