all groups > flash data integration > may 2007 >
You're in the

flash data integration

group:

Please help!!


Please help!! onelotusguy
5/4/2007 12:23:09 AM
flash data integration:
onClipEvent (load) {
info4 = new LoadVars()
lv = new LoadVars();
lv.onLoad = function() {
info4=this.info4;
txt4 = info4.split(",");
format = new TextFormat();
format.bold = bold;
format.italic = italic;
format.bullet = bullet;
format.color = colorinfo;
format.font = fontinfo;
format.indent = indentinfo;
format.leading = leadinginfo;
format.size = sizeinfo;
format.rightMargin = rightMargininfo;
format.leftMargin = leftMargininfo;
tfield4.setTextFormat(format);

};

//assuming you have a personal web server and PHP installed locally
lv.load("http://www.guyswebdesigns.com/PHPfolder/info4.php" ,this,"GET");
//bold
info2 = new LoadVars()
lv2 = new LoadVars();
lv2.onLoad = function() {
trace(lv2);
trace(bold);
boldinfo = this.bold;
//boldinfo = this.bold;

trace(boldinfo);
//dddd=this.bold;
//dddd=this.italic;

trace("before the if ");

if (boldinfo = "f") {
trace("after the if ");
bold = false;
}else{
bold = true;
}




};
lv2.load("http://www.guyswebdesigns.com/PHPfolder/colortxt.php" ,this,"GET");

//italic
lv3 = new LoadVars();
lv3.onLoad = function() {
trace(lv3);
trace(bold);
italicinfo = this.italic;
//boldinfo = this.bold;

trace(italicinfo);
//dddd=this.bold;
//dddd=this.italic;

trace("before the italic ");

if (italicinfo = "f") {
trace("after the italic ");
italic = false;
}else{
italic = true;
}





};
lv3.load("http://www.guyswebdesigns.com/PHPfolder/colortxt2.php" ,this,"GET");
//bullet
lv4 = new LoadVars();
lv4.onLoad = function() {
trace(lv4);
trace(bullet);
bulletinfo = this.bullet;
//boldinfo = this.bold;

trace(bulletinfo);
//dddd=this.bold;
//dddd=this.italic;

trace("before the italic ");

if (bulletinfo = "f") {
trace("after the italic ");
bullet = false;
}else{
bullet = true;
}





};
lv4.load("http://www.guyswebdesigns.com/PHPfolder/colortxt3.php" ,this,"GET");
//color
lv5 = new LoadVars();
lv5.onLoad = function() {
trace(lv5);
trace(bullet);
colorinfo = this.color;
//boldinfo = this.bold;

trace(colorinfo);



};
lv5.load("http://www.guyswebdesigns.com/PHPfolder/colortxt4.php" ,this,"GET");
//font
lv6 = new LoadVars();
lv6.onLoad = function() {
trace(lv6);
trace(font);
fontinfo = this.font;
//boldinfo = this.bold;

trace(fontinfo);



};
lv6.load("http://www.guyswebdesigns.com/PHPfolder/colortxt5.php" ,this,"GET");
//indent
lv7 = new LoadVars();
lv7.onLoad = function() {
trace(lv7);
trace(indent);
indentinfo = this.indent;
//boldinfo = this.bold;




};
lv7.load("http://www.guyswebdesigns.com/PHPfolder/colortxt6.php" ,this,"GET");
//leading
lv8 = new LoadVars();
lv8.onLoad = function() {
trace(lv8);
trace(leading);
leadinginfo = this.leading;
//boldinfo = this.bold;

trace(leadinginfo);



};
lv8.load("http://www.guyswebdesigns.com/PHPfolder/colortxt7.php" ,this,"GET");
//size
lv9 = new LoadVars();
lv9.onLoad = function() {
trace(lv9);
trace(size);
sizeinfo = this.size;
//boldinfo = this.bold;
trace("I am in the size");
trace(sizeinfo);



};
lv9.load("http://www.guyswebdesigns.com/PHPfolder/colortxt8.php" ,this,"GET");
//Right margine
lv10 = new LoadVars();
lv10.onLoad = function() {
trace(lv10);
trace(rightMargin);
rightMargininfo = this.rightMargin;
//boldinfo = this.bold;



};
lv10.load("http://www.guyswebdesigns.com/PHPfolder/colortxt9.php"
,this,"GET");
//LeftleftMargin
lv11 = new LoadVars();
lv11.onLoad = function() {
trace(lv11);
trace(leftMargin);
leftMargininfo = this.rightMargin;
//boldinfo = this.bold;
trace("I am in the size");
trace(leftMargininfo);



};
lv11.load("http://www.guyswebdesigns.com/PHPfolder/colortxt10.php"
,this,"GET");


}

I no this is alot Please help!!!!
The onclip is the ony way I have found that work good, in bringing in text
from a database.
As you can tell from above that all I can do.

I am trying to set text color, and size, but cannot get this part to work.

Did I code this right?

Guy
Re: Please help!! MotionMaker
5/7/2007 7:31:20 PM
Yes it is a lot of code to swallow and it is unclear what you need to do. But
here is a shot at it.

From a summary review of code only you may be a timing issue. You cannot be
setting anything in an externally loaded Flash movie until you are sure it is
loaded. onClipEvent (load) does not do that for you.

Assuming it is a timing issue, use
MovieClipLoader.http://livedocs.macromedia.com/flash/8/main/00002545.html to
handle addressing an externally loaded Movie.
AddThis Social Bookmark Button