PC Anybody Know Flash? (Read 105 times)

  • Avatar of Mama Luigi
  • Wind of Peace
  • PipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Jun 16, 2004
  • Posts: 1282
I've got this problem with a little thumbnail viewer I made in Flash. I want it so that when you rollover one of the buttons, it shows some text associated with that button. Here's what I have so far:


I know... it looks like I'm a pro or something. I just followed some tutorial on the internet to get it this far though. I don't even know how to make a loading screen! Would someone kindly help me figure this out? I tried to make some dynamic text with the var dyntxt, and then I added this code to the actions of one of the buttons:

on (rollOver) {
dyntxt = "Project by: Mr. Smith";
}
on (rollOut) {
dyntxt = "Rollover one of the above projects for more information";
}

That doesn't work! Perhaps my actions layer is screwing everything up, but I need that. Perhaps someone could amend my actions layer... or just give me some direction here.

Here's my source stuff (might take a bit to download).
  • Avatar of dada
  • VILLAIN
  • PipPipPipPipPipPipPipPip
  • Group: Administrator
  • Joined: Dec 27, 2002
  • Posts: 5533
Did you give your text field an instance name? You need to refer to it correctly. Try the following:

on (rollOver) {
_root.dyntxt.text = "Project by: Mr. Smith";
}

What you're doing right now is saying "this movie clip is the following string", which doesn't make sense. In my example, I say "this movie clip's text contents is the following string".
  • Avatar of Mama Luigi
  • Wind of Peace
  • PipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Jun 16, 2004
  • Posts: 1282
Ahh! Thank you, that worked perfectly!
  • Avatar of Mama Luigi
  • Wind of Peace
  • PipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Jun 16, 2004
  • Posts: 1282
Why is it when I set the text to something, I cannot change it again?
  • Avatar of dada
  • VILLAIN
  • PipPipPipPipPipPipPipPip
  • Group: Administrator
  • Joined: Dec 27, 2002
  • Posts: 5533
Sure you can. Make sure that your text field isn't set to some variable. Just give it an instance name and change its "text" variable whenever you want it to say something else.

You're going to have to provide some code if you're going to claim that "things aren't working"!
  • Avatar of Mama Luigi
  • Wind of Peace
  • PipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Jun 16, 2004
  • Posts: 1282
Doh! Thanks for pointing out that my instance name can't have a variable! That was the problem *feels like an idiot noob*.