can some one tell me why the script in the movie as shown in the attached file bitwise.gif is not working.
I have used 2 instances of buttons and a movieclip (orange box) wiht an onclipEvent( enterframe) handler. the goal was to use the movie clip to monitor if the buttons are clicked once or twice. the movie works if I use the button with (1<<0) only
The above code is a way to tell if the user double clicked or single clicked (which is what it sounded like you wanted to do, I could have misunderstood though). Add those actions to a frame, create a button on the main timeline, and create a dynamic text area with the var name “results” (without quotes).
Ok, I am not going to delete my last post, just so everyone can see how much of a jack@$$ I am, but I decided to test your code AFTER I posted, which was a very stupid mistake.
I see you are trying to toggle things on and off.
I still think you are going about it all wrong.
Here try this…
On the frame add this action…
count = 0;
Now on your toggle pressed button add these actions…
on (release) {
_root.count = 0;
}
And on your toggle released button add these actions…
I tested it and I think that this is actually what you wanted to do.
Of course the count = 0 is to set a default from the beginning (you can change it to 1 if you want it to be released first, or just switch the way the numbers work if you want). You can remove that if you don’t want anything set as default when you load the movie.
whats the meaning of all that prototype stuff? i’ve seen it in books but never really read it? it just looks like hes attaching events to clips. but that can be done with clip.onEnterFrame for example…