
March 9th, 2007, 05:45 PM
|
|
Registered User
|
|
Join Date: Mar 2007
Posts: 1
Time spent in forums: 8 m 20 sec
Reputation Power: 0
|
|
|
LoadMovie problem
Hi, i'm trying to make a dynamic flash that loads news title's, content and a picture, for taht I used a source that loaded the title and content and tried to add the picture load thing. The flash useas a php file to generate an xml file extracting the data from a mysql database, but, the picture blinks, dissapearing and it can only be seen when you change the new's page.
This is the actionscript:
Code:
theNews = new XML();
theNews.ignoreWhite = true;
theNews.load('xml.php'+"?cK="+random(9999)+1);
_root.onEnterFrame = function(){
}
function Article( id, title, mas_info, info_width, info_height, imagen, body){
this.id = id;
this.title = title;
this.body = body;
this.mas_info = mas_info;
this.info_width = info_width;
this.info_height = info_height;
this.imagen = imagen;
};
Article.prototype.putOut = function(titletxt, bodytxt) {
_root[titletxt].text = this.title;
_root[bodytxt].text = this.body;
MyImagesHolder.loadMovie("imagenes/"+this.imagen);
};
function articleOut(xml){
_global.numArts = xml.firstChild.childNodes.length-1;
info = xml.firstChild.childNodes[at].attributes;
body = xml.firstChild.childNodes[at].firstChild.firstChild.nodeValue;
currArticle = new Article(info.id, info.title, info.mas_info, info.info_width, info.info_height, info.imagen, body);
currArticle.putOut("titletxt","bodytxt");
delete currArticle;
delete info;
stop();
}
trace(_root._width);
theNews.onLoad = function(){
articleOut(this);
at = numArts;
articleOut(this);
}
articleOut(theNews);
|