PDA

View Full Version : switching between 2 movie clip.....HELP!!!!



cool blue
May 21st, 2003, 06:36 AM
HI!!

I have 2 movie clip avi1 and avi2
i am using movie controls for them....like start stop pay..etc.
now iam use another button whitch switches between these 2 avis.....
how do i do that....also i want the controls to be same for both the movie and Working...

can u help me...

thankx:trout:

Stephen
May 21st, 2003, 11:12 AM
It depends on what you want to do if you, have 1 movie and then want to replace it with the other or if you have both on at the same time and want to play one or the other movie. Which is the case?

cool blue
May 22nd, 2003, 12:07 AM
i have a movie which is running, but as soon as u click the button the movie changes........and vis-ver sa.....

i have the code just la me know where am i wrong

on (release)
{
if (getProperty("avi1",_visible)=1)
{
setProperty("avi2", _visible, 1);
setProperty("avi1", _visible, 0);
};
if (getProperty("avi2",_visible)=0)
{
setProperty("avi1", _visible, 1);
setProperty("avi2", _visible, 1);
};
}

in this avi1 is running when the file starts....and on click the other movie rins....but when clicked again, the avi1 does not run ....y ??? so..
PLZ help me out in this
thankx

cool blue
May 22nd, 2003, 01:15 AM
OK!!! i got it....
Yes!!...the logic was wrong.....wat i was doing is just cheking for the statement......

this is the right answer

on (release){
if (getProperty("avi1",_visible)){
setProperty("avi2", _visible, 1);
setProperty("avi1", _visible, 0);
}
else if (getProperty("avi2",_visible)){
setProperty("avi1", _visible, 1);
setProperty("avi2", _visible, 0);
}
}

bye
Enjoy

cool blue
May 22nd, 2003, 01:23 AM
GUYS now i have another problem...

on (release){
if (getProperty("avi1",_visible)){
setProperty("avi2", _visible, 1);
setProperty("avi1", _visible, 0);
}
else if (getProperty("avi2",_visible)){
setProperty("avi1", _visible, 1);
setProperty("avi2", _visible, 0);
}
}
in this code i want , that when any movie clip is visible 0 the it should stop on that fram.....
means when i click on th button another movie load , and the perivious movie should stop as well as should be visible = 0
how do i do that...

plz guys help me out here
plz

cool blue
May 22nd, 2003, 02:01 AM
hahahahah!!! wat a day!!!

I ask u guys a proble....and guess wat got this one also right

the code is

on (release) {
if (getProperty("avi1", _visible)) {
avi1.stop();
setProperty("avi2", _visible, 1);
avi2.play();
setProperty("avi1", _visible, 0);
} else if (getProperty("avi2", _visible)){
avi2.stop();
setProperty("avi1", _visible, 1);
avi1.play();
setProperty("avi2", _visible, 0);
}
}

I get my inspiration form u guys.....

THANKX....for a new in flash this is a good code.....thats me!!
THANKX a lot..
bye and enjoy