LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 


Prev Previous Post   Next Post Next
  #1  
Old 07-14-2004, 10:39 AM
FLASHIMODO FLASHIMODO is offline
Registered User
 
Join Date: Jun 2004
Location: CHICAGO
Posts: 148
Rep Power: 9
FLASHIMODO is on a distinguished road
font

How do I change font size and type(to Fixedsys) in this code?

Actionscript:
// set initialization variables
var speedBetweenLetters = 500;
var speedBetweenWords = 5000;
var j = 0;

// create array that contains the words we want to animate in
var words_array = new Array("Welcome", "Home");

// function that sets the way for a word
function createWord() {
   
   // clear any previous interval
   clearInterval(wordID);
   
   // create empty clip to place each letter clip into
   _root.createEmptyMovieClip("PH_mc", 0);
   
   // get specified word from 'words_array' and use split method for arrays
   // to stick each letter as an element in the 'message_array'
   var message_str = words_array[j];
   var message_array = message_str.split("");
   
   // initialize 'i'
   i = 0;
   
   // get the interval going that creates each letter
   letterID = setInterval(createLetter, speedBetweenLetters, message_array);
   
   // if 'j' is at the end of the array, then reset it, otherwise add one to 'j'
   if (j >= words_array.length - 1) {
      j = 0;
   } else {
      j++;
   }
}

// function that sets the way for each letter
function createLetter(array) {
   
   // create text field for each letter
   var n = "text_" + i;
   var c = PH_mc.createEmptyMovieClip(n, i);
   c.createTextField("my_txt", 0, 0, 0, 0, 0);
   with (c.my_txt) {
      autoSize = "center";
      text = array[i];
      _y = i * c._height;
   }
   
   // iterate 'i' by one
   i++;
   
   // if 'i' is at the end of the word (last letter), then clear the 'letterID'
   // interval and start the interval for the next word
   if (i >= array.length) {
      clearInterval(letterID);
      clearInterval(wordID);
      wordID = setInterval(createWord, speedBetweenWords);
   }
}

// initialize the first word
createWord();
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font in actionscript, Help pls! uberquin Flash MX ActionScript 2 02-03-2009 12:43 PM
flash xml font embedding help tsegg Flash MX 3 01-21-2008 10:06 PM
Font usage question (Chinese font advice) d0dge General Flash 1 12-11-2006 03:02 PM
Advanced Font Viewer - A Lever That Strengthens Your Creative Effort Alexander New Softwares 0 03-10-2006 07:42 AM
XML and flash, font problem petetheswede Flash MX 3 10-21-2004 08:07 PM




All times are GMT. The time now is 03:36 AM.