Thanks I have it now, I ended up doing it a little different, I added 1 to the variable when the hitTest was true, the problem was not in this as I found out when I added a dynamic text box to display the variable as I could see it working. The problem was a little odd. I wanted an event when the variable equalled 24. I used an if statement. The thing was that I wanted to go to another scene when the variable got to 24 but the goto scene command would not work no matter how I tried to do it. That was the problem. In the end I added a frame and used a goto nextframe instead and this worked. Now it goes to the next frame when the variable reaches 24 and there is no stop in the next frame so it just rolls into the next scene. I have no idea why "if variable >= 24 gotoplay (nextscene. 1)" does not work when "if variable >= 24 gotoplay nextframe" does work. Ignore my syntax here I am only outlining it for you. I used the Script Editor so the syntax was right and I check it many times anyway.
I do not know if you know why this should be, any way I have it all working now so I am not to bothered. I am glad that the increment was working.
A
----- Original Message ----- From: Gregg Caines <gc@neometrixsystems.com> To: <flasher@chinwag.com> Sent: Wednesday, December 27, 2000 7:16 PM Subject: Re: FLASH: Help with increment
> It sounds like you've answered your own question! I'd put it in the first > frame of the main timeline (varname = 0;) so it can be accessed from > anywhere as _root.varname . Just put ++_root.varname anywhere you > want to increment it (like in your hittest handler) and you'll count the > pieces correctly. > > HTH > > --------------------------------------------------- > Gregg Caines > n e o m e t r i x systems inc. > http://www.neometrixsystems.com > gcaines@neometrixsystems.com > > > Hi all > > > > I have a problem, I have a 24 piece jigsaw which all works fine with the > > bits snapping into place as the result of a hitTest. There is no problem > > with that. However I want to have an action caused by the last bit being > put > > into place. The bits can go in any order so the only way I can see to do > > this is to have a variable that increments everytime a bit is put into the > > correct position. Once in the correct position they cannot be moved again > so > > as soon as the variable reaches 24 I could have the movie goto the next > > scene or whatever. The problem is that I cannot seem to set this up. Where > > should the variable be declared, in the main timeline in the 1st frame? > then > > in the code for every dragable MC (puzzle bit) have it increment the > > variable by 1 on a true hitTest. If this is right so far then it is the > > syntax that I am having trouble with. Or is my idea the totally incorrect > > way to do this. > > > > Thanks for sparing the time to read this and thanks if you decide to help > > > > Andrew Le Sage > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > flasher is generously supported by... > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > flashforward2000 and the Flash(tm) Film Festival > November 27-29, 2000, LONDON, National Film Theatre > > Produced by United Digital Artists and lynda.com > -Sponsored by Macromedia, Adobe Systems and Apple Computer > -http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526 > Register before November 10 and save £200 > http:// www.flashforward2000.com > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > To unsubscribe or change your list settings go to > http://www.chinwag.com/flasher or email help@chinwag.com > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ flasher is generously supported by... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ flashforward2000 and the Flash(tm) Film Festival November 27-29, 2000, LONDON, National Film Theatre
Produced by United Digital Artists and lynda.com -Sponsored by Macromedia, Adobe Systems and Apple Computer -http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526 Register before November 10 and save £200 http:// www.flashforward2000.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To unsubscribe or change your list settings go to http://www.chinwag.com/flasher or email help@chinwag.com