This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > February 2004 > Newbie Needs a Little Help with Somethin'





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Newbie Needs a Little Help with Somethin'
Wonderflex

2004-02-13, 2:28 am

Oaky so I'm pretty new to this whole FlashMX stuff...I dabbled around with
Flash 4 back in the day, but never more than dabbling. I need some help
though. I want to make a button in the navbar (left side) change what the text
says on the right side. How do I do this? Here is what I've made so far so
you can see what I'm talking about

http://www.geocities.com/camronearl/Untitled3.sw

I want like the "home" button to load up the home movie clip that I have the
text in on the right side. Then I want the "about me" button to load up a new
movie clip that would contain the text about me in it. How do I do this in the
simplist way possible

Thank you all for the help you may provide

Camro


Xutai

2004-02-13, 9:28 am

Creat new sceens for each button. Each button should target an individual sceen. For example you "home"button would target the first frame of the "home" sceen

MINGUITO

2004-02-13, 12:29 pm

U can also use the attachMovieClip method, targeting the place where u want the movieclip to appear......


Take care and God Bless....
www.ymisitio.com

swingb13

2004-02-13, 12:29 pm

Camron,
What Xutai suggested will work very well but just so you know there
is a different way to accomplish this same goal using simple action script.
You've already got the guts in place on your link so adding this change is very
easy. Since you're just dealing with simple text you should consider using a
dynamic text box that is populated by Mouse events.

1. Convert your current text box from (I'm guessing) a static text box to a
dynamic text box in your properties panel
2. Assign your dynamic text box the name 'content'
3. Give each of your navigation buttons distinct instance names (EX: home,
about, friends)
4. Add this actionscript to the main timeline. (Create a new layer, name it
actions, open your actionscript panel in Expert mode and copy and paste

home.onPress = function()
content.text = "the content I want to display"

about.onPress = function()
content.text = "the content about me to show the masses"+newline+"and
newline forces a carriage return"


Now if you've followed these steps you should see each time you press either
about or home your text box changes. The advantage of this over using loaded
movie clips of multiple key frames is twofold. One, you file size is smaller
and your load times are shorter, and two, this makes editing and updating a
snap.
Another approach would be to load the text files using the loadVars
method. Depending on how deep you want to get into this project you should also
consider using the scrollbar component packaged with MX for text that exceeds
your alloted space (read the help files to learn more about using components)
As with most things in Flash there is neither a clear right nor a wrong
way to achieve your goal, that's the greatest aspect of Flashs' flexibility, so
finding a way you're comfortable to work is important

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews