Share » Forums » Developer » XML Driven Flash

XML Driven Flash

XML Driven Flash

Tuesday 25 May 2010 8:24:01 am - 2 replies

Author Message

Matthieu Sévère

Tuesday 25 May 2010 8:35:15 am

Hello,

You really should use flashVars and give your file path through them in the template.

(the name of uploaded file will change for every upload)

--
eZ certified developer: http://ez.no/certification/verify/346216

Anaya P

Wednesday 26 May 2010 7:29:59 am

Thanks for your quick reply.

As you suggested I have tried to pass flashvars through html to swf file. But it is not working properly.

I am not flash expert, so may be have missed any step.

I have followed below steps -

1. created a variable of type string

2. in html passed value as a name of xml file.

In flash actionscript have below code -

function loadXML(loaded) {
if (loaded) {
_root.booth = this.firstChild.childNodes[62].childNodes[0].firstChild.nodeValue;
_root.area = this.firstChild.childNodes[62].childNodes[1].firstChild.nodeValue;
_root.price = this.firstChild.childNodes[62].childNodes[2].firstChild.nodeValue;
_root.company = this.firstChild.childNodes[62].childNodes[3].firstChild.nodeValue;
_root.website = this.firstChild.childNodes[62].childNodes[4].firstChild.nodeValue;
booth_txt.text = _root.booth;
area_txt.text = _root.area;
price_txt.text = _root.price;
company_txt.text = _root.company;
website_txt.text = _root.website;
} else {
trace(" file not loaded! " );
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(" myFlashVar " ) ;

value to myFlashVar is passed using flashvars syntax in html embed and object tag.

Can you please let me know what wrong i am doing here.

Regards

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu