XML Flash player -



XML Flash player -

id set flash image gallery reads xml , displays relevant images on website, id able programatically @ slideshow in xml using id. example, xml has x number of slideshows(i've copied , pasted slideshows , changed id). illustration id @ slideshow elements id 2. if using xpath in xslt "location/image_gallery/slideshow[@id = 2]".

<location> <image_gallary> <slideshow id="1" width="230" height="145" speed="2"> <image url="graphics/chesterfield.jpg" title="market walk" href="htle.co.uk/" /> <image url="graphics/cranley.jpg" title="history" href="http://www.google.co.uk/" /> </slideshow> <slideshow id="3" width="230" height="145" speed="4"> <image url="graphics/chesterfield.jpg" title="rket walk" href="http://www.google.co.uk/" /> <image url="graphics/cranley.jpg" title="history" href="http://www.google.co.uk/" /> </slideshow> <slideshow id="2" width="230" height="145" speed="3"> <image url="graphics/chesterfield.jpg" title="rket walk" href="http://www.google.co.uk/" /> <image url="graphics/cranley.jpg" title="history" href="http://www.google.co.uk/" /> </slideshow> </image_gallery> </location> *note id's can in order, can hard code actionscript particular slideshow, id able programatically utilize id , phone call in xslt. help appreciated. im using actionscript 2.0. here have import mx.transitions.tween; import mx.transitions.easing.*; var myshowxml = new xml(); myshowxml.ignorewhite = true; myshowxml.load("xml/london_gb.xml"); myshowxml.onload = function() { _root.mywidth = myshowxml.firstchild.childnodes[0].firstchild.attributes.width; _root.myheight = myshowxml.firstchild.childnodes[0].firstchild.attributes.height; _root.myspeed = myshowxml.firstchild.childnodes[0].firstchild.attributes.speed; _root.myimages = myshowxml.firstchild.firstchild.firstchild.childnodes; _root.myimagesno = myimages.length; trace(myimages.length); createcontainer(); callimages(); }; function createcontainer() { _root.createemptymovieclip("mycontainer_mc",_root.getnexthighestdepth()); mycontainer_mc.lineto(_root.mywidth,0); mycontainer_mc.lineto(_root.mywidth,_root.myheight); mycontainer_mc.lineto(0,_root.myheight); mycontainer_mc.lineto(0,0); mycontainer_mc._x = (stage.width-mycontainer_mc._width)/2; mycontainer_mc._y = (stage.height-mycontainer_mc._height)/2; }; function callimages() { _root.mymcl = new moviecliploader(); _root.mypreloader = new object(); _root.mymcl.addlistener(_root.mypreloader); _root.myclips_array = []; _root.mypreloader.onloadcomplete = function(target) { _root.myclips_array.push(target); target._alpha=0; if (_root.myclips_array.length == _root.myimagesno) { moveslide(); myshowint = setinterval(moveslide, (_root.myspeed*1000)+1000); } } (i=0; i<_root.myimagesno; i++) { temp_url = _root.myimages[i].attributes.url; temp_mc = mycontainer_mc.createemptymovieclip(i, mycontainer_mc.getnexthighestdepth()); _root.mymcl.loadclip(temp_url,temp_mc); } }; function moveslide (){ current_mc = _root.myclips_array[_root.target_mc]; new tween(current_mc, "_alpha", strong.easeout, 100, 0, 1, true); _root.target_mc++; if (_root.target_mc >= _root.myimagesno){ _root.target_mc = 0; } next_mc = _root.myclips_array[_root.target_mc]; new tween(next_mc, "_alpha", strong.easeout, 0, 100, 1, true); };

_xmlcontainer.imagegallary.slideshow.@id[0];

try one.

xml flash actionscript-2

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -