View Full Version : Struggling with MC's and linking
02-18-2007, 10:04 AM
I am new to flash and am having troubles. I basically have a main page with 5mc's (animated buttons) but i cannot make them link to well anything, but most importantly another frame/layer when clicked. I can get this to work when i change the mc's to buttons but then i lose the animation effect so i kinda want the animation to still be there... any help would be great thanks.
02-18-2007, 03:22 PM
Which version of Flash are you using?
If you are using older versions you will have a tough time. For the newer ones remember this:
MCs can have and use button attributes, but buttons can not have MC attributes.
Another option though, is to make your button, have it do what you want it to do, and on the over/down state (which ever works best for you) drag an instance of the animated MC so you have the MC inside the button, which of course has it's AS on it.
It could also be a problem with your AS, you can post that and I can take a look at it :D
02-18-2007, 05:54 PM
I am using Flash 8 professional. I used a online tutorial for making animated buttons right, but it doesnt say how too link anything. im not even sure what action script i should be doing. I actually tried using some AS that you posted for someone else to try, but i couldnt get it to work....
is what i used.... the MC i want to go to something is button_mission, and the page i want it to go to is on a layer called writeup. on the write up layer i have 5 keyframes each with different things i wanted the MC's to link to. maybe these need to be on their own layers?
02-18-2007, 08:17 PM
That is of course if I understand you correctly and your "writeup" layer is on an MC INSIDE the button_mission MC
02-18-2007, 10:16 PM
where i want to link to is set on the main page, and how do u put it into the button_mission mc, and the other buttons
02-19-2007, 02:58 AM
Okay this is going to take one of us showing the way :D Either you can zip up your .fla and attach it here and I will look and see what you are talking about, or I can make a very basic example and continue to tweak and repost until it matches what you want...
Let me know which you want to do and I will get started.
02-19-2007, 03:25 AM
thanks so much for the help i will zip the fla for u to take a look at
02-19-2007, 03:37 AM
also a quick question about how to make back buttons to the main menu from each page... not sure how to go about this, but i guess its similar coding to what im already asking.
02-19-2007, 03:49 AM
Okay I will take a look, be back in a few :D
02-19-2007, 06:09 AM
Okay. I apologize for the wait. I started looking and found a few errors and started out on helping you fix them. Then my daughter had an Instant messenger issue with her boyfriend, which apparently needed my immediate attention.
Anyway, I have it all done. I didn't "do the work for you" I just re arranged some things.
Your objective now is to see what I did compared to the one you sent me and notice the little differences.
First, make sure if you are going to use layers for the separate items (writeup, sparkle, etc) that you actually use those layers for that. You had Action Script on the sparkle layer, and text and images in the labels layer, and so on.
Also, open the movie, click on Windows >> Align this will bring up the alignment menu. attach it to your right side bar and learn to love it :) click the "To Stage" button on this menu and every time you place an item on the stage use these buttons to align it (center works very well) It also helps to line up items for animation inside a Movie Clip)
Next the text, you had all but one of your text boxes as Dynamic text, which is not needed unless you are going to update these with XML. I changed them to static text boxes.
Then when you write your text and it is on the stage, click on it once and bring up the properties menu. You will see a drop down menu under the font color box and font size drop down. When you are using text that is a hard color (and almost always for static text) select the "Anti-alias for readability" option. This will embed your font, as well as cleaning up the edges and making it more crisp and easier to read. Now you can use any font and it will show up even if the viewer doesn't have that font installed on their computer.
So basically that is what I did, cleaned up your text, aligned all your MCs on the stage, and cleaned up your time line. (oh, and they are Frames, not pages ;) )
I also added a link on your links section so you can see how that is done. You do NOT have to keep it up there. It is just an example.
Now for you menu. Now that I see what you are trying to do it made it very simple. I put the whole menu in an MC to make portability easier. This MC is called menu_All. Double click this to enter edit mode on that MC (unlock the layer first) The first thing you should notice is that I have made separate text for those buttons. If they aren't changing there is no need to make them all the same and try to change them with AS. Just do it by hand. Now, click on any of the buttons once. Open your Actions panel and take a look at the code. It is very simple and pretty self explanatory. Now, double click on one of them to enter your animations part of the buttons. Click on the actions layer in the last frame and see how I told it to go to the correct frame when it is done being animated.
Really that is it. I didn't do much, over all redoing the whole thing took about 15 minutes. Keep that alignment part in mind and your movies will look a lot better.
For future suggestions.... The text could be larger, and you don't really need different text boxes for each part (like on the profiles frame) You could do all of that in one text box, enter and space bar are your friend for alignment and layout of the text there. Also make your picture larger. It is a very nice picture ( :D ) be proud of it.
The twinkling stars... they are a nice touch. You animated them well, I would suggest making 3 or 4 different ones. You can use the same images, just put them in a different order. This way they will "blink" at different intervals.
Anyway, thats about it. Hope it all makes sense. If not just ask and I will explain better. :D
02-19-2007, 06:44 AM
ur freaking amazing, that is amazing, i do notice the differences. Honestly that took me like 20 hours to figure out that stuff, my teacher is useless lol, well serisouly he is useless. I cant tell u how much I appreciate your help.
LAST question how did u get the background to lock or whatever it is when I adjust the size of the playing movie all the text moves too?
02-19-2007, 06:48 AM
Depends on exactly what you mean?
The "background" as I see it is the stars and moon image, and can include the twinkling stars. But I don't know what you mean by the "text moves too"
02-19-2007, 07:01 AM
sorry what i mean is that when i do "play movie" and i change the window size the text, moon, stars move when changing the window size.
OK I see that when I am changing the window size everything tries to stay centred as the window gets smaller or larger.
But what my teacher wants is that if i make the play window smaller or bigger, everything adjusts its size to fit in the window when changing the window size.
02-19-2007, 07:10 AM
Yes, the swf is a fixed size. Manually changing your window in test mode will just expand those sizes. When you have it on the web, the whole movie will remain the same size and the rest of the page will expand.
02-19-2007, 07:30 AM
OOH ok learning more and more by the second!
02-19-2007, 02:39 PM
See, that's why he's the GURU of ActionScript.
02-19-2007, 07:55 PM
HAHAHA.. I wish! I am still learning too! I wish I could take a class on Flash... instead I just build things, write tons of lines of code and teach myself..
it takes longer, but I am getting there :D
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.