PDA

View Full Version : MC troubles


grimm
04-08-2002, 08:37 PM
Hi all...
1) i have 3 MC's on the second frame of my main stage
2) i want those movies to play all the way thru on a rollover of their corresponding button. (so if you rollover it it will play and loop until rollout when it will continue to the last frame and the MC will stop and the fla will return to frame 1 on the mainstage. if button is clicked the "on release" command needs to wait until the MC is complete. then go to the URL specified.
3) I'm stuck on the:
mainstage returning to frame 1
MC completing before going to URL
well pretty much everything.

I can mail the file it's to big to post here

Bernie X
04-08-2002, 08:42 PM
Yo man. UltraShock is having some probs. Good to see that you're resourceful in getting your problems solved.

If you go to UltraShock, you will see that I modified my first reply. The revised thread will definitely work for you.

BX

grimm
04-08-2002, 08:45 PM
ok... i tried going back but it still is having some troubles...
I'm glad you agree with my methods, some people get upset with my posting habits...

thanks again...

Bernie X
04-08-2002, 09:30 PM
I'm just sitting here...1/2 awake. Basically, this is what I wrote in UltraShock:

1. Go to the last frame of myMovie, or movie 'a', as you call it, and add the frame action:

if (_root.set==1){
gotoAndStop(1);
}

else if (_root==0){
getURL(...)
stop();
}


Then, put these mouseEvents on your button:

on(rollover){
_root.myMovie.set=1; /*causes myMovie to go to the 1st frame and stop*/
}

on(release){
_root.myMovie.set=0; /*causes myMovie to stop and getURL on the last frame*/
}

There it is.

BX

grimm
04-08-2002, 10:03 PM
that dosen't seem to work at all nothing plays, at all

farafiro
04-09-2002, 03:56 PM
BX is right so if the fla still doesn't work, post it here and we'll see what can b done

Bernie X
04-09-2002, 04:03 PM
Post' em.

BX

grimm
04-09-2002, 04:48 PM
This is as close as I can get it. The problems that still exsist are
1)on rollover it repeats it at very odd intergers.

2)on the rollout it continues to play till you rollover a second time

3)on the release it dosen't play

what I'm looking for
1) on rollover it plays continuously as long as mouse is still on top

2) on rollout it stops at the end of the MC not the moment the mouse is no longer on top

3) on release it stops MC at the end of the MC not on the exact moment the mouse was released

the file is to large to post here... I can e-mail it?

Bernie X
04-09-2002, 04:52 PM
Email it to blt8@po.cwru.edu

I probably wont be able to look at it until tonight though.

BX

tg
04-09-2002, 04:57 PM
on(rollOver){
myMC.play();
}
on(rollOut,release){
myMC.stopAtEnd=true;
}

//on last frame of myMC
if(stopAtEnd){
stop();
}

grimm
04-09-2002, 07:56 PM
tg thanks with a tinsie bit of altering it works almost flawlessly, the 2 quirks are that you need to rollover the button twice to reactivate the movie, (like one re-sets it to the begining of the movie and the other plays it again?)
the other is I haven't figured out the placement for adding the goTo URl code..??

farafiro
04-10-2002, 07:07 AM
on(release){
getURL("http://www.actionscript.org")
}

tg
04-10-2002, 04:05 PM
grimm, show us the tweeks, maybe someone can come up with a solution.

grimm
04-10-2002, 06:41 PM
Well tg actually I recieved a fla from a couple different people not all from this forum and chi from ultrashock.com actually supplied me with his own version of code that works absolutly perfectly. i got a fla from 2 people here but those were just a wee bit of, one from bernie x jumped to the URL before the end of the MC. but was right on besides that, no double rollover. and he other from tapafu (sp) worked well but again didn't have the goTo URl code in it but everything else worked great. I posted the FLA that is what I wanted code wise (not my fla) for all to see.

i do want to extend my thanks to everyone, you all were very helpful and went way out of your way to help me. i thank you very much.

:D

JHallam
04-10-2002, 07:36 PM
Okay, I sorted the problem, I think it's what you need anyhow.

Basically, you need to set another varible

so I set another for the URL which is set 4

All you had to do is set another varible, called set 4

and lable the getUrl and set it to the varible

on(press)}
_root.myMovie.set=4;
}

then in myMovie configure the set

} else if (_root.set == 4) {
gotoAndPlay ("URL");
}

I think this is what you wanted.

Thanks

grimm
04-10-2002, 08:37 PM
hey graphix_freak.. yea it works great I don't know how yours differed from the other though (granted I think the zip I uploaded was empty) but none the less it is great...

thanks again...

now i just need to copy it out and paste the code according to my fla.... oh joy... LOL

JHallam
04-10-2002, 08:42 PM
What there ws no FLA?

What's your mail addy?

I'll try again but if still no please reply with your email addy! :D

Bernie X
04-10-2002, 08:43 PM
Grimm,

I gave you an option for the on(release), in the comments of the code, to either immediately jump to a URL or to wait until the MC goes to the last frame, then jump to the URL. The latter (the second) is bad usability -- the user could click the button and quickly rolloff the button before the affected MC gets to the last frame, which would cause the getURL to not be called.

A whole bunch of people probably sent you the same .fla. As stated in my email, I recommend that you pick of some AS references.

BX

Bernie X
04-10-2002, 08:46 PM
GRaPHiX_FReaK,

Check your suggested code. I don't think you're targeting the variable 'set' correctly.

BX

JHallam
04-10-2002, 08:47 PM
No problem now BX, it's sNorted!


Ohhh and No, my code works perfectly ok, tested.

simple varibles, you cannot go wrong BX

Laters

Bernie X
04-10-2002, 09:18 PM
Originally posted by GRaPHiX_FReaK
Okay, I sorted the problem, I think it's what you need anyhow.

Basically, you need to set another varible

so I set another for the URL which is set 4

All you had to do is set another varible, called set 4

and lable the getUrl and set it to the varible

on(press)}
_root.myMovie.set=4;
}

then in myMovie configure the set

} else if (_root.set == 4) {
gotoAndPlay ("URL");
}

I think this is what you wanted.

Thanks

_root.set and _root.myMovie.set are two different variables.

BX

grimm
04-10-2002, 10:12 PM
bernie yea i realize that now... sorry about that... I regret to say i wasn't able to really look at it today, swamped with another 911 project. i will look at it tomorrow. I also will post the fla I find to be closest to what I am looking for, just to clarify things and to see if there is a simpiler or cleaner way. As like many other programs there are so many different styles of doing and accomplishing the same thing. I am looking for the way that uses the least amount of physical memory.

well i gotta run fill you all in tomorrow....

JHallam
04-10-2002, 10:20 PM
Originally posted by Bernie X


_root.set and _root.myMovie.set are two different variables.

BX

YES, but he wants the MC I quote "myMovie" to run and onclick to present a URL.

So this is calling a lable in his MC to get the action.

THis does work, so please don't preach me.

Bernie X
04-11-2002, 06:59 AM
I don't think the alogorithm is code efficient GRaPHiX_FReaK, but hey, if it works - more power to you. Different strokes for different folks, I guess.

Anyway, it seems like there were a lot of approaches for your application Grimm. It would be interesting to see which worked the best.

BX

farafiro
04-11-2002, 07:22 AM
Bernie X and GRaPHiX_FReaK
hold on guys, the problem is solved.... so hold on you were trying to help him and he is done

play friends

JHallam
04-11-2002, 12:34 PM
Originally posted by Bernie X
I don't think the alogorithm is code efficient GRaPHiX_FReaK, but hey, if it works - more power to you. Different strokes for different folks, I guess.

Anyway, it seems like there were a lot of approaches for your application Grimm. It would be interesting to see which worked the best.

BX

LOL Come on BX, you should know others have differential techniques. The main point is that this movie does work and how can it not be effecient. Stop being such a optimist and respect others efforts. Either way the problem is sorted, period.

Finished, and thanks Alfred mate

grimm
04-11-2002, 02:53 PM
Well i got to throw the code in and this is it:

first frame of movie (no visual)

stop();

on the last instance of the movie (last frame with visual)

if (_root.set==1){
gotoAndPlay(2);
}

else if (_root.set==0){
gotoAndStop(1)
}
else if (_root.set==3){
play();
}


the nxt frame:

GetURL ("http://URL" , "_new");
gotoAndStop(1);


this is on the instance of my button on the main stage:

on(rollOver){
_root.set=1;
myMovie.play();
}

on(release){
_root.set=3;

}

on(rollOut){
_root.set=0;

}

it works perfectly (it's a bit odd when pressing the button but I'm not complaining to me it is finite'... the swf is attatched for all to see your results.
thanks again all.


Grimm