Groups | Blog | Home
all groups > flash (macromedia) > november 2003 >

flash (macromedia) : Is there something like "imageswap"



aixamarquez
11/7/2003 9:49:38 PM
I want to create a button that changes its appearance (and remains on the stage) after it's clicked. I'd like it to change back again if the user clicks again. I was thinking of putting an "X" over an image on one click and removing it on the second click. Or how about a play/pause button?


Thanks.

Dan

urami_
11/8/2003 11:08:17 AM

[quoted text, click to view]

hmmm... number of ways .
You could attach movie clip to it , you could place the button in movie clip
with two frames and simply on one click go to second frame , on second click go back
to first.
Do you have any particular arrangement to follow ?
And the Pause button , what should it pause.
Different methods for different stuff :)




Regards

urami_*



<lsym>

There's no place like 127.0.0.1

aixamarquez
11/8/2003 1:31:47 PM
I'm going to try that right now (putting a button in a movie clip) Thanks!

I want to pause the main timeline.

Dan


urami_
11/8/2003 9:37:13 PM


[quoted text, click to view]

if you have just motion tween , shape tween or frame by frame animation
all you need is _root.stop(); to stop and _root.play(); to play.
It won't pause action script . It also want pause any active movie clips.
If there are movie clips , we have methods on stop timeline and all the movie clips
on it .
Let me demonstrate :


Attach this to movie clip , it will stop all clips including timeline on MOUSE DOWN , than on Second Click
on same movie will play them all back .......alternate switch using clip events.....


onClipEvent (load) {
function xTellDependant(mc, method) {
mc.method = method;
mc.method();
for (name in mc) {
if (typeof (mc[name]) == "movieclip") {
if ((mc != mc[name])) {
mc[name].method = method;
mc[name].method();
xTellDependant(mc[name], method);
}}}}playing = true;}
onClipEvent (mouseDown) {
if (playing == true) {
xTellDependant(_level0, stop);
} else {
xTellDependant(_level0, play);
}
playing = !playing;
}






Regards

urami_*



<lsym>

There's no place like 127.0.0.1

AddThis Social Bookmark Button