PDA

View Full Version : Unclear on loading MC into empty MC


TBoyB
07-19-2001, 06:53 PM
Hi All, hope you summers been good so far.

Have a series of buttons that on release load different MCs. Want to be able to load them into the same "empty" MC so that each new release replaces the previous MC with a new one. Don't understand how to do this in conjunction with TellTarget.

Here's the code

on (rollOver) {
TextMenus = "MENUS";
}
on (rollOut) {
TextMenus = "";
}
on (release) {
tellTarget ("mc-vis-menu") {
gotoAndPlay ("vis-menu");
}
}


Here's the Link

http://www.giovannis-restaurant.com

So far the MCs for buttons just have a stop in blank frames at start and finish, so they effectively dissapear. I'm sure you will understand the effect I wish to create once you view the site.

Thanks in Advance!

acmewebtv
07-20-2001, 03:07 AM
looked into it and seems to be doing what you said, so what is the problem?

defrex
07-20-2001, 03:35 AM
thats what i was thinking.......

TBoyB
07-20-2001, 07:38 AM
If my questions are not clear, please let me know, maybe I phrase them wrong.

The MCs in question that you both have assumed are correct because they do function properly and load in the same location, do not acheive the result I am looking for!

If you click on each button one after the other, the corresponding MCs will load one ontop of the other and all be dissplayed at the same time. That's not what I want here!

Please re-read the questions, and take some time to understand them.

Thanks again for your help, but either I am not wording my questions correctly, or you are assuming the question I am asking.

Jesse
07-20-2001, 09:07 AM
If your loading all 4 sections into the same MovieClip the previous content should automatically unload when you execute another loadMovie command. What code are you actaully using?

TBoyB
07-20-2001, 01:58 PM
Hi Jesse.

The code I have so far is in the first part of this post. But my point is I don't know how to load my MCs into an empty MC.

While using TellTarget to actually launch the MC for each button, how do i get it to load into an empty MC?

TBoyB
07-20-2001, 02:55 PM
I can't seem to get this to work! I want whatever MC I load into the "empty MC" to replace what is there regardless if the currently loaded MC is done playing or not. Is this possible?

Once again, here is the code

on (rollOver) {
TextMenus = "MENUS";
}
on (rollOut) {
TextMenus = "";
}
on (release) {
tellTarget ("mc-vis-menu") {
gotoAndPlay ("vis-menu", "_root.emptymc");
}
}


Am I indicating the "_root.emptymc" in the right place? Because as of now, the different clips just load one ontop of the other, so they all play at once. I don't want that.

defrex
07-21-2001, 03:50 AM
sorry bout that. i didn't click on them fast enough to see them load one on top of the other.

Jesse
07-21-2001, 09:57 AM
where are the load commands? You're speaking of 'loading' but I see no loadmovie commands... is that all the code you're using?

matt poole
07-21-2001, 12:20 PM
you could get over this by simply putting each instance of the under construction mc's into different individual frames on the main timeline, with a stop on each frame.
Then use the button to go the relevent frame:

on (release) {
tellTarget (_root){
gotoAndStop ("frame number");
}
}

... as long as your background images and only the relevent clip is in that frame, that clip and only that clip will play.

p.s. dont stress! your questions made sense, its just you managed to time the mc's to end in perfect time to stop reading them and move on to the next button. I doubt anyone would have noticed...

TBoyB
07-21-2001, 07:36 PM
Thanks Matt & Jesse, but the "Under Construction" stuff is obviously just temporary. There will eventually be MCs that correspond to those buttons that will have content and imbeded MCs within them. So, to launch those MCs into empty MC and target the 2nd frame -since 1st has a stop- would the code be;

on (rollOver) {
TextMenus = "MENUS";
}
on (rollOut) {
TextMenus = "";
}
on (release) {
loadMovie ("mc-vis-menu", "emptymc");
tellTarget ("mc-vis-menu") {
gotoAndPlay ("vis-menu");
}
}

The above code is what I just tried. It does not work like I want it to. I want one MC to replace the other regardless of if it is finished playing or not. I thought that by loading the different MCs into an empty MC this would work. I'm obviously missing something here, cause it doesn't.

matt poole
07-25-2001, 03:53 PM
Doing what I suggested would work for any MC, its not the most techincal of solutions but its functional...

TBoyB
07-26-2001, 05:27 AM
I understand Matt, and it may be the way I have to go, since no other solution seems to be presenting itself. I have searched & searched the forum and nothing seems to be quite specific in terms of what I'm looking for. It also seems to me that the ones in the "know", assume that we "newbies" understand more than we do. Teaching to someone who knows Nothing or Little is difficult when You understand way more than they do. What is very simple and clear to one person is not necessarily to another.

Your solution may prove to be the best and simplest really, but I was hoping to learn something here too. The syntax has me a bit confused.

Thanks again Matt, and to anyone who might know what I'm after in the way I would Like to do it, please don't hesitate to respond. When one more of us learns we further the medium.

Flash is way cool. It's the best way to do a web page, or web anything as far as I'm concerned. For the little of it that I DO understand. :)

matt poole
07-26-2001, 05:36 PM
Well with more people with an attitude like yours and many others in the flash community, we might just get there. Keep going, I intend to be up there with the best of them! *dramatic music* :o}

P.S.
I've just recieved colin moocks; "Action script:the definitive guide." from Amazon.com. Its excellently paced for the new flash programmer. I'd thoroughly recommend it to any newbie who has a desire to understand it all, Jesse says he often uses it even now, such is its value to even the most hardened of scripters. A glowing recommendation in my opinion...