Welcome, Guest
  • Author Topic: XML - Fonts - and how to place it in the movie  (Read 5734 times)

    FlashBody

    • Server what's that
    • *
    • Posts: 7
      • View Profile
      • Email
    hey guys

    i have 2 questions !

    1

    i cannot stand the blur fonts displyed by flash. i tried manu things but it hasnt work out as good as i wanted yet. if i load dynamic text it is displayed differently! how can i get the same CLEAR fonts displayed as used in the flash-db.com flash site ?

    2

    i get the data loaded out of the xml  ::) more or less but the problem is i am not using it because i do not know how to break the text into smaller pieces in the flash ? it is all just one big piece of  text but i want headline/breaks and so on.

    could anybody help please !?

    Thx  8)

    flashswami

    • Jr. Programmer
    • **
    • Posts: 55
    • vene vidi vector
      • View Profile
      • Flashswami
    Re:XML - Fonts - and how to place it in the movie
    « Reply #1 on: 03/12/02, 13:13 »
    Crisp text is achieved by using a standard font (such as sans) in a dynamic text box.

    As far as getting data out of XML and into Flash, that really depends on the methodology you use to access the XML- I would assume you are putting the node/attribute values into arrays? If so, then looping through the arrays using the array length (the number of items in it) and outputting into duplicated mc's is the best way. See the topic below called 'XML, WDDX and Flash for an insight into what I'm talking about.

    Flash-db

    • Administrator
    • Systems Administrator
    • *****
    • Posts: 1876
      • View Profile
      • Flash-db.com
    Re:XML - Fonts - and how to place it in the movie
    « Reply #2 on: 03/12/02, 13:27 »
    I think their might be an easier way then using XML for what your trying to do:

    You can use 1 text file or multiple text files.

    Just format the text file like this:

    News=<b>3/12/2002</b><br><br>This is your Daily News area

    Name a dynamic Text area "News" within your site (make sure to check the 'HTML' option).  Then just load the text file that contains the above text with something like this  loadVariablesNum("News.txt",0);

    After this is loaded the Text box named "News" will contain the Date in Bold then 2 line breaks - then the message.

    You can put all of your different Text files into one text file if you want - name it something like SiteInfo.txt.  Then to combine them you can use something like this:

    News=<b>3/12/2002</b><br><br>This is your Daily News area&About=<b>About heading</b><br><br>This is your About section

    Then create two dynamic text area's named 'News' and 'About' when you load 'SiteInfo.txt' both of these area's will be filled up with the values specified in the text file.

    When combining different variables the most important thing to remember is the ampersand  '&' this seperates variable/value combinations.
    Flash-DB

    FlashBody

    • Server what's that
    • *
    • Posts: 7
      • View Profile
      • Email
    Re:XML - Fonts - and how to place it in the movie
    « Reply #3 on: 03/12/02, 18:19 »
     :) allright thx - give me day to try and i post my results  ::) later !
    i am gonna try that array.length method :-) !

    Flash-db

    • Administrator
    • Systems Administrator
    • *****
    • Posts: 1876
      • View Profile
      • Flash-db.com
    Re:XML - Fonts - and how to place it in the movie
    « Reply #4 on: 03/12/02, 18:32 »
    Flash-DB

    FlashBody

    • Server what's that
    • *
    • Posts: 7
      • View Profile
      • Email
    Re:XML - Fonts - and how to place it in the movie
    « Reply #5 on: 03/14/02, 03:31 »
    ok here again one more problem !

    tried that method with array's ! that problem is that i do not know much about it yet.
    i have one flash tutorial that works just the way i need it ! the problem is i am loading the clip into an other clip so tha data does not gte displayed right !

    1. the xml is loaded correctly ! thats for sure !

    2. i have problems with these lines of code especially the one marked cause it do not know what the newsArray.length means !


    currentNews = -1;
    newEntry(+1);
    function newEntry (dir) {
       currentNews = currentNews+dir;
       setProperty ("PrevBut", _visible, true);
       setProperty ("NextBut", _visible, true);
       if (currentNews+1>=_root.content.newsArray.length) {
           setProperty ("NextBut", _visible, false);
       }
       if (currentNews-1<0) {
           setProperty ("PrevBut", _visible, false);
       }

       setNews(currentNews);
    }
    function setNews (number) {
       date = _root.content.newsArray[number].date;
       headline = _root.content.newsArray[number].headline;
       content = _root.content.newsArray[number].content;
       PrevBut.entries = currentNews;
       NextBut.entries = _root.content.newsArray.length - currentNews -1;
    }


    any kind of help would reduce my headache !

    the pale e

    • Server what's that
    • *
    • Posts: 39
    • We are gathered here together....
      • MSN Messenger - paleemediafanatics@hotmail.com
      • View Profile
      • the pale e media fanatics
      • Email
    Itr's not quite perfect....
    « Reply #6 on: 03/15/02, 14:51 »
    But it helps lot's to ensure that your txt fields are at whole numbers for X and Y.  That blurring (anti-aliasing) is kinda stopped then.  

    Hope that helps!

    Thx,
    the pale e
    Web visionaries UNITE!!!

    Ascanio

    • Server what's that
    • *
    • Posts: 16
    • Just Eat What's On Your Plate!
      • View Profile
      • DevLab.K1
      • Email
    Re:XML - Fonts - and how to place it in the movie
    « Reply #7 on: 04/10/02, 21:14 »
    well, I don't want to get into the array issue, coz I've just started playing with them.

    I'll tell you two things:

    1) myArray.length = number of items, or childs, in the array. Remember to always set the incremental variables as temporary variables, so that they exist only within the function ( ... for(var i=0; i<myArray.length; i++) {...} ... ). This way you will avoid variable corruption between different functions.

    2) for the text issue: unfortunatelly FlashMX has NOT solved the antialiassing problem. To achieve a nicely antialiassed text you MUST try-out the floating point values on both _x and _y properties. ARIAL text usually goes well on xxx.2 and yyy.5 values. If you leave it on xxx.0 and yyy.0 you will get it heavily blurred.


    ON STATIC TEXT you can activate the USE DEVICE FONTS option, this will render fonts as fonts, and not as graphical objects (...so without antialiassing).
    BUT remember that to use device fonts, such fonts must be installed on the user's computer, and EACH OPERATING SYSTEM HAS IT'S OWN DEFAULT FONTS.
    If you use TAHOMA on your site, with a simple high-tech look, on an APPLE computer you will see your site stuffed with old scratchy fonts that look like TIMES NEW ROMAN.

    ON DYNAMIC TEXT (or input text) you can activate the EMBED FONTS option, under CHARACTER... in the property inspector. Remember that font embedding takes up space, so if you'r working at a serious site, and you're keeping track of any Kb that adds to your published swf movie, you'll have to decide to use or not embedded fonts.....


    Hope this lecture helped you.
    There are some extreemely simple issues that so few people really know.
    (one of them is the DPI thing.....I hate it, everybody is used to measure the dimensions of an image in DPI....nothing worse, as it's simply a ratio property, between the fisical resolution of the image and the dimension of the printed area.
    .....so many times I see people sure about it and then get confused...it's all Photoshop's fault..... well, ok, this is not the right place.....)

    have a great time, all of you! I love the Flash community!
    Industrial Design: it is not a fairy tail.