PDA

View Full Version : problem with dynamic textfield, mask and textFormat


xxlm
02-11-2004, 07:36 PM
Hi guys.

I'm dealing with some stuff that make me crazy.

Ok this is it. Do this:
create a new mc
inside this mc add a dynamic textfield.
add a layer for background.
in the _root, add a new mask layer masking the clip containing the textfield.

then in action layer apply a new textFormat to the mc.yourtextfield with bold to true. The text will DISAPPEAR!
WHYYYYYYYYYYY

if you are changing the size it works fine. but when putting bold to true it doesn't work....
Grrrrrrrrrrrrrrrrr

hope you can help me...
Thx mates

farafiro
02-12-2004, 03:39 AM
even after embeding the font??

Stimpson
02-12-2004, 09:30 AM
Only thing I can think of is what farafiro said, the text will dissapear if the bold font is not embedded (and you set embedded to true offcourse) :).

xxlm
02-12-2004, 05:41 PM
Yeah I set it to true of course...
Did you try?
It's really fast to make a sample...
Can you try mate, perhaps you'll have more luck than me

xxlm
02-12-2004, 05:42 PM
PS: Btw to use mask i'm oblige to embeded fonts... so...

xxlm
02-13-2004, 12:08 AM
SO plssssssssss
mate...
Did you have a look?

ARRRRGGGGGGGGGGGG

Stimpson
02-13-2004, 03:46 AM
Geezzzzzz, just woke up here ;) :p.

Yep, had the same thing, it has to do with not embedding the bold font. When you change the text type, it switches to an font type (bold), which isn't embedded at the moment. Try it with a dummy textfield besides the normal one in which you embed the bold fony , that did it for me :).

xxlm
02-13-2004, 08:51 PM
OK...
So there is no "untricky" way to do it...
Thx for the answer, but I don't erally see what you mean.
Put a bold static text behind and make it visible when I want it?
This is it?

farafiro
02-15-2004, 03:28 AM
xxlm, u r right
but I've tried to do it dynamically (the mak), and it worked out right_level0.text_mc.setMask(_level0.mask_mc);
//
var theFormat:TextFormat = new TextFormat();
theFormat.font = "_serif";
theFormat.size = 20;
theFormat.color = 0xBED2EA;
_level0.text_mc.my_txt.setTextFormat(theFormat);
//
_level0.b_btn.onPress = function() {
theFormat.bold = true;
};
_level0.b_btn.onRelease = function() {
_level0.text_mc.my_txt.setTextFormat(theFormat);
};

Ruben
02-15-2004, 09:23 AM
Would it help if you'd enable the html-property of the textfield and set "<b>whateveryourtextwille</b>" as the value of the textfield...

- Ruben

xxlm
02-16-2004, 05:09 PM
thx faffy, but I am not able to make it dynamically for my case... ;)

Else, yeah I know the <b> and htmltext, but I thought we can use textformat... But thx anyway rubben... :)

I think I will start a new thread like: "BUGS IN FMX 2004" :)

Ruben
02-16-2004, 05:14 PM
Haha, one for the bug's-thread:

I've got the idea that in FMX2004 smooth/inkt/straight drawing are not functioning properly.

I'll post it as soon as you've started the thread...

- Ruben

xxlm
02-16-2004, 10:56 PM
OK will open the thread (are we lazy?)

xxlm
02-16-2004, 11:12 PM
Thread Online on as2>Bugs in Fmx 2004

C ya... ;)

farafiro
02-17-2004, 02:20 AM
okey xxlm
here is the solution

u should make/create a new font in the library, linkage it
then use it for your text field b4 embeding the font
all will work fine then

xxlm
02-17-2004, 09:33 PM
OK will try...
Thx million time!!!!!!!!!!!!!!!!!!!!!!!!!!

xxlm
02-18-2004, 10:03 PM
Hey Faffy. Could you make a simple sample and post it here.
Cause I'm not able to make it work...

Thx mate....

farafiro
02-19-2004, 01:45 AM
okey mate
here ya go

farafiro
02-19-2004, 01:49 AM
sorry, the source

xxlm
02-19-2004, 11:21 PM
Sorry, but I can't make it work, even with your solution.
In your sample you don't set bold to true.
If you do it, then - hmmmm- nothings happen.

I mean the font not become bold.

I attached a fla. You can see on it that I do the same thing than you.
I put on the onRelease event of the button a code making a new textFormat and applying it to the textfield. It's working for ALL EXCEPT THE BOLD... !!!

Grrrrrrrrrrrrr

HELP !!!!

xxlm
02-19-2004, 11:22 PM
But thx anyway for the time you took to make this sample... ;) ;)

xxlm
02-19-2004, 11:23 PM
Oh ... I get 2017 post... I'm a 2000 old post member..
Yahoooooooo

farafiro
02-22-2004, 01:51 AM
I donno why it don't work in yours
I've tried a lotta ways
let me try again and I will tell ya if anything happened

xxlm
02-22-2004, 07:02 PM
Thx faffy. :) :)

farafiro
03-01-2004, 07:13 AM
this is what I've got 'till now, it's from using Flash.pdfAbout masking device fonts

You can use a movie clip to mask text that is set in a device font and converted into a movie clip.
For a movie clip mask on a device font to function, the user must have Flash Player 6 r40 or later.
When you use a movie clip to mask text set in a device font, the rectangular bounding box of the
mask is used as the masking shape. That is, if you create a nonrectangular movie clip mask for
device font text in the Flash authoring environment, the mask that appears in the SWF file takes
the shape of the rectangular bounding box of the mask, not the shape of the mask itself.
You can mask device fonts only by using a movie clip as a mask. You cannot mask device fonts by
using a mask layer on the Stage.
For more information on using a movie clip as a mask, see “Using movie clips as masks” in
ActionScript Reference Guide Help.

xxlm
03-01-2004, 08:23 AM
You can mask device fonts only by using a movie clip as a mask.Thx faffy I think it's that... I will try tomorrow morning cause it's half past midnight here...
You're my hero... LOL
Really a BIG THX if it's ok and even if it's not ;)
C ya mate...

farafiro
03-01-2004, 09:14 AM
Originally posted by xxlm
Really a BIG THX if it's ok and even if it's not ;)
so, what can i say ,,,,,,
:rolleyes: :D

xxlm
03-01-2004, 04:09 PM
No luck mate...
It's not working... Still the same stuff. My text dissapear as soon as I apply a textFormat on it with bold set to true.

Grrrrrrrrrrrrrrrr

Ruben
03-01-2004, 04:51 PM
OK, this might sound a bit like it's something they used to do in the dark ages. But if you REALLY can't find any other way to do it you might wanna do it.

1. Just create the textformat, but without the bold-thing set to true;
2. Create a layer with the textfield on it.
3. Duplicate the layer and increase the _x of the textfield on the duplicated layer with 1px.

It's not the EXACT effect. But I guess it should look like it [haven't tried it myself though]

Anyways, I hope you'll find another solution since this one kinda sucks :p

- Ruben

xxlm
03-01-2004, 06:25 PM
Thx for the tricks, but I will complain to MM and say that they sucks... Need a patch for this... GRRRRRRRRRRR

Ruben
03-02-2004, 08:23 AM
WHAHAHAHAHA. Yeah, really piss them off...:D

- Ruben

farafiro
03-02-2004, 08:52 AM
lol
maybe u should try to, but can u do this to them??
*******
try to change the font man, use Tahoma or Arial

xxlm
03-02-2004, 03:22 PM
Yeah...
Same stuff even if I change the font...
Grrrrrrrrr

I sent a Bug mail to MM telling that I think there is a bug. We will see...