///////////////////////////////////////////////////// // brandon ellis - edeveloper@hotmail.com - 7/2002 // revised - 1/2003 // application: C#/Flash MX dynamic newsfeed // comments: this is it. the flash side of this application // is done entirely using actionscript. This function does not // rely on the server side page being C#. the processing page // could be anything - C#, php, asp, perl or a text file // all that is really necessary is that the data must use this // type of formatting: // theUrls=value1|value2|value3&theTitles=value1|value2|value3 ///////////////////////////////////////////////////// // here it is: ///////////////////////////////////////////////////// function set_gStyles(){ tStyle = new TextFormat(); tStyle.font = "verdana"; tStyle.color = parseInt("ffffff",16); tStyle.leftMargin = 5; } ///////////////////////////////////////////////////// function chk_server_conn(){ _root.createTextField("item_text",0,0,(_root["newsitem_text"]._y)+23,300,16); tStyle.size = 10; _root["item_text"].selectable = false; _root["item_text"].text = "Checking Server Connection"; _root["item_text"].setTextFormat(tStyle); } ///////////////////////////////////////////////////// function showErrMsg(){ tStyle.size = 10; _root["item_text"].text = "Connection Failed"; _root["item_text"].setTextFormat(tStyle); } ///////////////////////////////////////////////////// function make_header(){ _root.createEmptyMovieClip ("headerbg", -1); with (_root["headerbg"]){ beginFill (0x284E75); lineStyle (.5, 0x333333, 100); moveTo (0, 0); lineTo (0, 23); lineTo (450, 23); lineTo (450, 0); endFill(); } _root["headerbg"].createTextField("header",110,0,0,300,16); _root["headerbg"]["header"].text = "Macromedia News"; _root["headerbg"]["header"].type = "static"; _root["headerbg"]["header"].selectable = false; _root["headerbg"]["header"].autoSize = "left"; tStyle.size = 14; _root["headerbg"]["header"].setTextFormat(tStyle); } ///////////////////////////////////////////////////// function make_newsitem(){ _root.createEmptyMovieClip ("news_item", -20); with (_root["news_item"]){ moveTo (0, 10); beginFill (0x336699); moveTo (0, 23); lineTo (0, 40); lineTo (450, 40); lineTo (450, 23); endFill(); } } ///////////////////////////////////////////////////// function makeList(tAry,uAry){ for (var i=0,j=1;i