and I repeat myself: Macromedia should have come up with such solution ...
no new thing, just the same as the inventor but on the smart side ...

Cedric

I managed to roughly understand it and am using it successfully - so cheers for that =D

I don't really understand how it is forced to include the font.
Just make sure ForceShared Library item Link value - Url is set to the .swf file of itself - the Url field will appear to disappear if you look at again, but this seems to be the key.
(If anyone wants to explain why that would be great)

Sencillo means Easy, use the example in that folder - just replicate the way it works and it works lovely.

I'm very lucky that I am working with a few Spaniards as the site is global I am working on =D

<<<<<<<   Issue  >>>>>>>

There is a small issue with it though.
I have a site which uses lots of fonts - so this is why I am using this technique.

However the main .swf contains AvantGarde and a shared font library loaded in also has AvantGarde in it. The AvantGarde in the main movie overrides the shared library brought in, so if you only have static text fields generated in the authoring environment (on the timeline) in the main movie only the characters included in those will appear in any subsequently created dynamic text fields.

In my case I have hacked the main movie clip by making one of the static text fields dynamic and embedding the characters I need there.

There is a better solution, but for now 14k in a 200k+ file does not seem too bad - especially as we need the app to go live as a Beta sooner rather than later - so it starts to make money.

>>>>>>>>>>>>>>>>>>>>>

This technique is a massive step forward ( I've tried to do this for ages - and was so close )

Regards

gingerman

( flashcoders is brilliance - I am glad to see it back )






On 15 Nov 2005, at 17:08, Martin Baltzer wrote:

Hi All,

I tried to get trough the translated version of www.zarate.tv and I didn't understand that much :)

But as far as I understood the following issues where unsolved - correct?

- "It cannot have in the film created text fields from the IDE (not even static) with the same source that the one that is going away to load..."

- It is not possible to use Bold or Italic styles

I just wonder since I have just found the solution for those issues...so I guess the question is if this is common knowledge or do people still think its unsolveable?

If anyone is interested in the solution just say so and I'll explain:)

Cheers
Martin Baltzer




________________________________

Fra: [EMAIL PROTECTED] på vegne af Zárate
Sendt: ti 15-11-2005 14:47
Til: Flashcoders mailing list
Emne: Re: [Flashcoders] get, setTextFormat(),shared fonts and dynamic text fields



Hi!

Thanks Cedric! I've to say that Martin Klasson has found some problems
with the hack of one single file per font[1], and i haven't had time
enough to check it. Hope i will soon.

Anyway, i think it still can be usefull.

Bye!

[1] - http://chattyfig.figleaf.com/pipermail/flashcoders/2005-November/ 153136.html

On 11/15/05, Cedric Muller <[EMAIL PROTECTED]> wrote:
take a look here & mind the wrap! (this is babelfish translated from
spanish to english, so please be imaginative)
http://babelfish.altavista.com/babelfish/trurl_pagecontent?
lp=es_en&url=http%3A%2F%2Fwww.zarate.tv%2Farticulos%2Fshared_fonts%2F ind
ex.php
read the small text and look at the ZIP file

Description:
You can share fonts (or other assets) through SWFs *without* ever
linking anything in the FLAs

This is the solution Macromedia should have come up with!
Funny thing is that it is already here, even Macromedia didn't think of
it ;)

Thanks again to Zarate!
Cedrci


Hi guys,

I'm trying to solve the shared library, dynamic fonts thing.

I have a shared library with some fonts contained in MovieClips.
Everything has instance names. Everything is set with linkage
identifiers and set to export.

In my other FLA I bring the shared library in and access the text
format of the text brought in.
I then create a text field dynamically and try to set the format
gained earlier onto the new field.

But guess what - it does not work.

Any ideas?

(It works if you use the shared library 'properly' eg using File>>
Import >> Open External Library,
but I do not want to do that - I only want to bring in the fonts as
and when required.)

The text has the rough format apart from the font is incorrect. =(

Here's my code. (I've left in all my other attempts)

I've tried to embed and not to embed

Regards

Steve


/////////////////////// CODE //////////////////////////


// import a .swf containing movie clips with dynamic text fields in
them with embedded fonts
// the mcs in the Library are set to have;
//  - linkage identifiers
// - export for runtime sharing selected
// - export in first frame seleced



// BASIC LOADING OF EXTERNAL .swf FONT CONTAINING FILE /////////
var container:MovieClip = createEmptyMovieClip("container",
getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip("designer_fonts.swf", container);

function onLoadInit(mc:MovieClip) {
    trace("onLoadInit: " + mc);
      // wait - just in case it's as not fully loaded timing issue
      makeText_INT = setInterval(maketext, 1000)
      changethetext();
}
//////////////////////////////////////////// END OF LOADING /



///////////////////////////////////////////////////////// the guts of
it
function maketext(){
      clearInterval(makeText_INT);
      //_level0.attachMovie("ag_medium", "newtext", 150 );
      //trace( "newtext1 = " + _level0.newtext1 );
      _level0.createTextField("newtext", 1, 150, 150, 200, 200 );

      // tf = new TextFormat();

      // get the format off of the shared text fields
      //var tf:TextFormat = container.ag_book.book.getTextFormat();
      var tf:TextFormat = container.ag_book.book.getTextFormat();
      tf.size = 50;
      //tf.font = "AvantGarde Bk BT";


      trace("tf.font = "+tf.font);
      // set the format saved onto the 'vv' text
      // newtext.setTextFormat(tf);
      newtext.autoSize = true;

      newtext.text = "a dynamic field";
      //newtext.embedFonts = true;
      newtext.setTextFormat(tf);
      //newtext.setNewTextFormat(tf);
for ( var props in tf ) { trace( props + " = " + tf[props]); };

}
/*

this is the trace

onLoadInit: _level0.container
tf.font = AvantGarde Bk BT
letterSpacing = 0
kerning = false
display = block
bullet = false
tabStops =
blockIndent = 0
leading = 2
indent = 0
rightMargin = 0
leftMargin = 0
align = left
underline = false
italic = false
bold = false
target =
url =
color = 0
size = 50
font = AvantGarde Bk BT
getTextExtent = undefined
*/
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Zárate
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to