Sajid, "But at the successful loading of xmlloaded() I would like to go to a specific function based on which XML has loaded."
You sorta solved your own question issue here. Just place an indicator in the XML source data, some sort of an element/attribute you could read and in the processing logic just switch() on the value accordingly... Hope this helps... -- Dok Skyymap Inc. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sajid Saiyed Sent: Saturday, November 26, 2005 10:02 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Dynamic Function problem Hi Hans, I tried var current:Function; Its still not working. Sure I would like to rethink the design. Any suggestion on how I can make this better? I will tell you my problem. I am usinf XPATH to load XML files. The init() and xmlloaded() functions are common for each call. But at the successful loading of xmlloaded() I would like to go to a specific function based on which XML has loaded. Can you suggest some good alternative? Thanks On 11/26/05, Hans Wichman <[EMAIL PROTECTED]> wrote: > Hi, > leaving the is-this-really-the-design-that-u-want discussions out of > the equation, var _root.current is not going to work, it should be var > current:Function; > > I tried it, and it works that way. > > Like I said though, you might want to rethink this design. > > greetz > Hans > > At 03:38 PM 11/26/2005, you wrote: > >Hi, > >I have many functions in my movie. > > > >On press of different buttons, I would like to cal different functions. > > > >BUT > > > >I am not calling them directly. > > > >Each button press goes through a couple of common functions and then > >at the each of it, it needs to call a specif function based on the > >button which was clicked. > > > >So I tried creating a var like this: > > > >var _root.current:Function; > > > >Then on press of the button, I would update the value like this: > > > >on(release){ > >_root.current = someNewName; > >_root.callToSomeFunction(); > >} > > > >//------------------------------ > > > >function callToSomeFunction(){ > >current(); > >} > > > >function someNewName(){ > >trace("OK"); > >} > > > >This does not work. > > > >Does the value _root.current gets stored as a function? > > > >Am i doing it right? > >_______________________________________________ > >Flashcoders mailing list > >[email protected] > >http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

