Wow I cant believe trying to do this is confusing me so much maybe Im tired or something… Anyways…
What I want to have happen is this… I want a button that has a square on the left side of my text. When you mouse over the button the text changes colors and the square glides across to the right hand side of the text and rotates 90 degrees. I cannot seem to get this to work. If someone can give me a quick step by step it would be much appreciated.
Create the text convert it to a graphic - create the little square convert it to a graphic. Clear the timeline of them and go to insert symbol- movie clip. Go into your movie clip
In the movie clip you will have layer one.
make a new layer name it text and put the graphic symbol text there
make another named squareand put the square graphic in there.
Do the special effects you want those 2 layers to do…
On layer 1, frame 1 add this action- stop();
Click back to the main scene and drag the movie clip onto the stage. Once this is done and in the first keyframe add this action-
button.onEnterFrame = function() {
if (OK) {
button.nextFrame();
} else {
button.prevFrame();
}
};
button.onRollOver = function(){
OK = true;
}
button.onRollOut = function(){
OK = false;
}
Once I test my movie nothing happens it just sits there on the stage if I put my mouse over the stuff nothing at all happens. But in my library if I test the movie clip it works…Does anyone have any idea without me posting the .fla?
I would take a more simple route like so:
I would make what would be the first frame of the animation (the text and the box), select everything and convert it to a button. Then double click that button to edit it. I would then put keyframes in the first three of the frames (up, over, down). Then on over, select everything and convert it to a movieClip. Then double click that. You should be in a movieClip in a button. Seperate your text and box on different layers and convert both of those items to movieClips. Animate at will. Last step, back out of that movieClip so you are back to the button’s frames, and since you are using text, in the hit frame, put a box (any color, doesn’t matter) over the text and the square.
Or, try changing your instance name in your code above from button to something else i.e. myButton. I used ‘target’ as an instance name once and it screwed up everything. Now I always make sure that instance names and variables text color in actionScripting is black instead of blue.