|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
preloader for data from xml
Hi all,
got a problem that's making me pull my hair out!! frame 1: Loading data from a xml file: slides_xml = new XML(); slides_xml.onLoad = startSlideShow; slides_xml.load("gallery.pop.xml.inc.php"); slides_xml.ignoreWhite = true; function startSlideShow(success) { if (success == true) { rootNode = slides_xml.firstChild; totalSlides = rootNode.childNodes.length; firstSlideNode = rootNode.firstChild; currentSlideNode = firstSlideNode; currentIndex = 1; updateSlide(firstSlideNode); } } All's sweet, then [still in frame 1]: function updateSlide(newSlideNode) { imagePath = newSlideNode.attributes.jpegURL; loadMovie(imagePath, targetClip); } ok, got the jpeg to be loaded into 'targetClip', but how can I do a preloaded for the image? Have tried: Frame 1: iStatus=0; setProperty("pBar",_xscale,0); Frame 2: iBytesTotal = _root.getBytesTotal(); iBytesLoaded = _root.getBytesLoaded(); iBytes = (iBytesLoaded/iBytesTotal)*100; setProperty("pBar", _xscale, iBytes); sStatus=iBytes add "%"; Frame 3: if (iBytes<100) { gotoAndPlay(2); } else { gotoAndPlay(4); } All the above does is create a loading bar for the actual movie, NOT the image 'targetClip'. How do I find out how much of the 'targetClip' has loaded? Doing my head in... Thanks in advance |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > preloader for data from xml |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|