Link to home
Start Free TrialLog in
Avatar of sealview
sealviewFlag for Romania

asked on

Load XML nextChild dynamicaly in flash

hi guys,

I have a small flash that has to load XML data and transform it to a slide by slide presentation.
I cannot call the next firstChild dynamically, i don't know how.
I have attached the flash and xml
http://alphamd.ro/images.zip

What I'm doing wrong?
Avatar of blue-genie
blue-genie
Flag of South Africa image

Hi, what you're doing seems correct.
you'll access each next slide as you have

var imageImage = myImage[_root.s].childNodes[0].childNodes[0].nodeValue;

where myImage[0] will be the first slide
myImage[1] will be the second etc.

so - i don't know where or how you're incrementing your s value - but if you're using a next/back button and incrementing that value with each slide it should be fine.
Avatar of sealview

ASKER

I, probably, wasn't coherent, I need to make the slides go auto each after the other, but in the same time if a user interact and needs to go to a specific Node to interrupt the automation and proceed to the user Node call.
I was thinking of something like declaring _root.s default value to 0 goes to the first note, and after first slide reach the 10 seconds of exposure, this first slide call the nest slide by incrementing the default value of _root.s plus 1 value, this making the value of the next slide/Node in the XML.
 My issue is that I don't know where to declare the NEXT value of "s", counting the fact that each slide load in a _mc that has the equivalent of 10 seconds frames, I tried to put it at the end of the slide_mc : onEnterFrame { _root.s = _root.s +1;}, but it didn't loads the value.

Thank you very much!
ASKER CERTIFIED SOLUTION
Avatar of blue-genie
blue-genie
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you very much!
I have asked the AS to duplicate the slide container in a single _mc so each slide reside by the previous one and I have used the move.prototype to automate the sliding by passing a new _x coordinate to the _mc for each next slide. And the user interaction will use the move.prototype too, only that will have just a button for each slide to go to it coordinate, no Next/Prev buttons.
The result can be seen in action here http://alphamd.ro/x/cl/ 

Thank you again blue-genie!
so you're sorted. if so pls close the question.
thanks.