?
Solved

Masking question

Posted on 2003-03-02
10
Medium Priority
?
409 Views
Last Modified: 2007-12-19
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
Comment
Question by:Dancer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 8053061
if that's the syntax..CreateEmptyTextField()..you are using
it is not correct..it should be..
MovieClip.createTextField()

Z
0
 
LVL 6

Accepted Solution

by:
henryww earned 400 total points
ID: 8053509
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
 

Expert Comment

by:gemgirl
ID: 8053663
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
Independent Software Vendors: 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!

 
LVL 6

Expert Comment

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

try rotate it :)
0
 

Author Comment

by:Dancer
ID: 8057315
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
 
LVL 6

Expert Comment

by:henryww
ID: 8057620
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
 

Author Comment

by:Dancer
ID: 8057631
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
 

Author Comment

by:Dancer
ID: 8057669
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
 
LVL 6

Expert Comment

by:henryww
ID: 8058168
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
 

Author Comment

by:Dancer
ID: 8060078
Thanks, Works great, what I missed was expoting linkage to actionscript :-)

Yours,
<><
Dancer
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question