Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

Masking question

I am masking a clip that is created on design time, and creating under it clips using createEmptyMovieClip().
I then create a couple of clips under it, again, using createEmptyMovieClip().
Up to here all works just fine :-)

Problem starts whe I use CreateEmptyTextField(), the text field just disappears, and does'n show within or outside the mask.

If I don't mask, everything looks just OK.

Yours,
<><
Dancer
0
Dancer
Asked:
Dancer
1 Solution
 
ZefferCommented:
if that's the syntax..CreateEmptyTextField()..you are using
it is not correct..it should be..
MovieClip.createTextField()

Z
0
 
henrywwCommented:
yo dancer,

u can't have dynamic text under mask ...
unless, embedFont = true

create a font object in ur library, export it (linkage) say call it "font1"...

_root.createEmptyTextField("myText", ..etc.. etc)

myText.text="Hello World";
myText.embedFonts = true;

myFormat = new TextFormat();
myFormat.font = "font1";

myText.setTextFormat(myFormat);


// it will be there.
cheers
0
 
gemgirlCommented:
Hiya, all.  I found that if I create an empty movie clip, create a text field, and set the mask all dynamically but *without* creating the font object, then the text would only display when embedFonts was false (presumably because there were no font outlines there for it to use).  

I know there is plenty of documentation saying that you cannot display fonts under a mask without embedding the font outlines.... does this depend on the player version?  Does anyone know what is going on there?

gemgirl
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
henrywwCommented:
that's right gemgirl, but as soon as u do "things" with the textfield then it disappear ...

try rotate it :)
0
 
DancerAuthor Commented:
once I set embededFonts to true, it desn't show at all (not even when not masked)...

In the meantime I am masking it using an overlaying layer, but that isn't a really elegant solution...

How do I use embeded fonts properly?
0
 
henrywwCommented:
do u have a font object in ur library??
and make sure u have export font call "font1" for action script so u can use
myFormat.font = "font1";

..... cheers
0
 
DancerAuthor Commented:
once I set embededFonts to true, it desn't show at all (not even when not masked)...

In the meantime I am masking it using an overlaying layer, but that isn't a really elegant solution...

How do I use embeded fonts properly?
0
 
DancerAuthor Commented:
font1 is an object in my library (It is Times New Roman Bold)
this is my code:

var myFormat = new TextFormat();
myFormat.font = "font1";
ar s = hh/3;
if (s<8)
   s = 8;
myFormat.size = s;

while (cDate.getMonth() == Month)
{
     nDOW = cDate.getDay();
     CalM.Numbers.createTextField ("TXT"+String(cDate.getDate()), 100+cDate.getDate(), xx, yy, ww, hh);
     var txt = eval ("CalM.Numbers.TXT"+String(cDate.getDate()));
     txt.text = String(cDate.getDate());
     txt.selectable = false;
     txt.embedFonts = true;
     txt.setTextFormat(myFormat);
      .
      .
      .
      Do other stuff like updating xx, yy ...
      .
      .
      .
     cDate.setDate(cDate.getDate()+1);
}
0
 
henrywwCommented:
well, that's exactly right ...

i don't know where is ur CalM & Numbers and how it is masked...

i had copied ur code and did something similar ... it works fine.

here's fla for u to see
http://www.smartclever.net/example/flash/fontMasked/fontmasked.zip

try change the code and remove the embedFonts it won't show.

cheers
0
 
DancerAuthor Commented:
Thanks, Works great, what I missed was expoting linkage to actionscript :-)

Yours,
<><
Dancer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now