Skip to main content
Participant
May 11, 2006
Answered

No text on a box

  • May 11, 2006
  • 3 replies
  • 323 views
Hi everybody,
first of all, I'm from Italy, so sorry for my bad english, hope you understand my requests.

I'm experiencing a problem using some simple commands in Actionscript (Flash 8).

I've created a function, "creabox", that paint a box 100 x 25 pixel, light gray at 80% alpha with a white border, and write inside it a text. I pass to this function a reference of where the box must be created (for example, "this"), the text to write, x position, y position and the z level. So, for example, calling
creabox(this, "text", 1, 1, 100)
I'll have a box starting from 1,1 (x,y) with the word "text" inside.

The function works very well called from level0 timetable, try to put it on frame 1 for example, but doesn't work as I want when called from inside another function: in particular, the box pops up, but without text.

You can download a ZIP that contains all what you need to test the script, the FLA and a directory with some images and a .txt file, they need to create the background, see script for more informations, at this URL:
http://www.wwwealtro.it/striscia.zip

Please give me an idea of where is my fault! Thank you ...
This topic has been closed for replies.
Correct answer tonyhigham
ok, I found the problem, but I can't seem to fix it without changing your setup. Your mask in Symbol1 is preventing you from seeing your text. Delete the maschera layer, and your text shows up just fine. Changing the disposizione doesn't seem to change anything......if possible, you could get rid of the mask, and just put a white box over the area you don't want to see......hope this helps

3 replies

Inspiring
May 11, 2006
tonyhighamCorrect answer
Inspiring
May 11, 2006
ok, I found the problem, but I can't seem to fix it without changing your setup. Your mask in Symbol1 is preventing you from seeing your text. Delete the maschera layer, and your text shows up just fine. Changing the disposizione doesn't seem to change anything......if possible, you could get rid of the mask, and just put a white box over the area you don't want to see......hope this helps
bullettaAuthor
Participant
May 11, 2006
GREEAAAT! I can't believe it, you solved the problem

I have no words: thank you very much!
Inspiring
May 11, 2006
I played around with your source file, and the only thing I could determine was that the probelm is not where it is being called from, but the object reference. For example, on your rollover function, if you change it to:
creabox(_root, this.jpg.over.text, this._xmouse, this._ymouse, totfoto+50);
the text displays fine, although of course the box is in the wrong place. I can't for the life of me figure out why the textfield isn't visible if you pass 'this' as an argument. Moving all of code from the creabox function directly to the rollover function produced the same result. Sorry I couldn't be of more help...

by the way, i haven't seen that much Italian since college, lol