Thanks very much! Greatly appreciated!!

Quote Originally Posted by fruitbeard View Post
Hi,

Ok, it does output, but it is traced, so you will not see it in the created swf file.

If you make a multiline text field, selectable ( so you can scroll it), and embed the font (any font), give the text field a name of"myText" and swap your code for this, or add the line i have added, it is commented
PHP Code:
var teamArr:Array = new Array("New York Jets""Washington Redskins""New York Yankees""Dallas Cowboys""LA Raiders");
function 
createFixtures(teamArr:Array, shuffle:Boolean)
{
    if (
shuffle)
    {
        
teamArr.sort(function ()
        {
        return 
Math.round(Math.random());
        });
    }
    var 
teams:Number teamArr.length;
    if (
teams != 0)
    {
        
teams++;
        
teamArr.push("Bye");
    }
    var 
totalRounds:Number teams 1;
    var 
matchesPerRound:Number teams 2;
    var 
fixtureArr:Array = new Array(totalRounds);
    for (var 
round:Number 0round totalRoundsround++)
    {
        
fixtureArr[round] = new Array(matchesPerRound);
        for (var 
match:Number 0match matchesPerRoundmatch++)
        {
            var 
home:String teamArr[(round match) % (teams 1)];
            var 
away:String teamArr[(teams match round) % (teams 1)];
            if (
match == 0)
            {
                
away teamArr[teams 1];
            }
            
fixtureArr[round][match] = home " v " away;
        }
    }
    var 
tempArr:Array = new Array(totalRounds);
    for (var 
round:Number 0round totalRoundsround++)
    {
        
tempArr[round] = new Array(matchesPerRound);
    }
    var 
even:Number 0;
    var 
odd:Number = (teams 2);
    for (var 
i:Number 0fixtureArr.lengthi++)
    {
        if (
== 0)
        {
            
tempArr[i] = fixtureArr[even++];
        }
        else
        {
            
tempArr[i] = fixtureArr[odd++];
        }
    }
    
fixtureArr tempArr;
    for (var 
round:Number 0round fixtureArr.lengthround++)
    {
        if (
round == 1)
        {
            
fixtureArr[round][0] = swap(fixtureArr[round][0]);
        }
    }
    
// second half of season - comment out if not required
    
var rounds fixtureArr.length;
    for (var 
i:Number roundsrounds 2i++)
    {
        
fixtureArr[i] = new Array(matchesPerRound);
        for (var 
match:Number 0match matchesPerRoundmatch++)
        {
            
fixtureArr[i][match] = swap(tempArr[rounds][match]);
        }
    }
    
// 
    
function swap(arg)
    {
        var 
components:Array = arg.split(" v ");
        return 
components[1] + " v " components[0];
    }
    
// send fixture list to Output Panel
    
var fixtureList:String "";
    for (var 
i:Number 0fixtureArr.lengthi++)
    {
        
fixtureList "Round " + (1) + newline;
        for (var 
match:Number 0match matchesPerRoundmatch++)
        {
            
fixtureList += fixtureArr[i][match];
            
fixtureList += newline;
        }
        
trace(fixtureList);
        
myText.text += fixtureList "\n";// ADDDED THIS LINE HERE
    
}
    
//return fixtureList;
}

createFixtures(teamArr,true);