FORUMS: list search recent posts

Newbie question about buttons and text

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
marshallamey
Newbie question about buttons and text
on Oct 9, 2006 at 4:25:04 am

I am slowly figuring this program out, but I've reached a standstill.

I configured my website with 5 buttons. When a user clicks each button, I want the corresponding text to be displayed in a text field on the same page...much like the menu on the left of this site.

ActionScript is still pretty confusing so try to respond appropriately...thanks a million.



Return to posts index

RobotHero
Re: Newbie question about buttons and text
on Oct 9, 2006 at 10:23:01 pm

One approach to this is dynamic text.

Go to the "Text Options" window and select the text you want to change. It will probably be "Static Text" right now. Change it to "Dynamic Text." This will now have an input for "Variable." Put _root.menutext in there.

Then with the corresponding buttons, put

on (release) {
_root.menutext = "Example 1";
}

And change "Example 1" for the label of each different button.


Another approach would be to make the text a movie with one frame for each possible value, and then use gotoAndStop() in your on (release)

The latter approach will make it easier if you want to control the positioning or colour of the text individually, the former if you want to control them all at once.


Return to posts index

marshallamey
Re: Newbie question about buttons and text
on Oct 11, 2006 at 4:54:57 am

Thanks so much for your help...I'm a little bit closer to understanding.

I used the onrelease method for each of the buttons, placing each of the commands all into one frame of an actions layer.

This is what I placed in frame 20, after the opening transition is finished:

stop();
phil_btn.onRelease = function() {
gotoAndStop(21);
};
vis_btn.onRelease = function() {
gotoAndStop(22);
};
prog_btn.onRelease = function() {
gotoAndStop(23);
};
help_btn.onRelease = function() {
gotoAndStop(24);
};


The first two buttons work great and I can go back and forth between the two just like I want. But the last two still don't work. I've checked many times and everything looks exactly the same as the first two but when I test it, they just won't work.

I tried...
*placing the script into different frames

*changing the instance names of the buttons

I'm clueless as to how to remedy this. Any ideas?!



Return to posts index


RobotHero
Re: Newbie question about buttons and text
on Oct 12, 2006 at 11:19:47 pm

Do you still get the roll-over actions on the buttons that don't work? If not, check your hit area.

Then try switching the buttons around, like this:

stop();
phil_btn.onRelease = function() {
gotoAndStop(24);
};
vis_btn.onRelease = function() {
gotoAndStop(23);
};
prog_btn.onRelease = function() {
gotoAndStop(22);
};
help_btn.onRelease = function() {
gotoAndStop(21);
};

Then you can tell if the problem is caused by the buttons, or by the frames they are going to.



Return to posts index

marshallamey
Re: Newbie question about buttons and text
on Oct 13, 2006 at 6:48:48 am

It must be the buttons....I switched it around and the last two buttons still don't work.

Checked the hit area...the mouse recognizes the buttons but nothing happens when I push them.

I'm so confused, my brain hurts.



Return to posts index

RobotHero
Re: Newbie question about buttons and text
on Oct 15, 2006 at 8:01:31 pm

Do all of the buttons exist during the definition frame on the timeline?

Are any of the buttons contained within another object?

And you're really really sure you've got the instance names right?

I'm running low on ideas.


Return to posts index


marshallamey
Re: Newbie question about buttons and text
on Oct 21, 2006 at 4:12:18 am

I DID IT!!!

Finally got it to work. I ended up just duplicating the buttons that were working, deleting the ones that weren't and going from there. It's almost done now. Thanks so much for all your help, I'm determined to understand this.

Another question, though: On the stage, the text I'm using is very clear and pretty. Anti-alias for readability is checked in properties. But when I test the movie those effects can't be seen and the text is of the lower quality. Will this be fixed during publishing?



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]