RE: [Flashcoders] Calling functions in sequence
You can also store references to functions in an array and call them from the array. FuncArr= [] FuncArr[0]=func0 FuncArr[1]=func1 // call func 1 FuncArr[1]() // call a load of funcs in sequence Var len=FuncArr.length For(var i=0; i -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Andreas Rønning > Sent: 09 August 2006 15:11 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] Calling functions in sequence > > I might be mistaken, but: > > function doAll(){ > func1(); > func2(); > func3(); > func4(); > } > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Calling functions in sequence
I might be mistaken, but: function doAll(){ func1(); func2(); func3(); func4(); } func2 is called once func1 is done, not before or during. In this way, happily start loading your flv and xml file "at the same time". If you want the xml file to load once the flv file has buffered or completed playing, that's a different deal but not necessarily more complicated if you look into the xml/netstream class event handlers. - A Mick G wrote: You could call the second function from the first (and have a paramater so it only runs the second function if you send the paramater). function funct1(runNext){ //do something if(runNext){ funct2(); } } function funct2(){ //do whatever } to call only the first function: funct1(); to call both: funct1(true); On 8/9/06, Matt Comstock <[EMAIL PROTECTED]> wrote: Thank you. What would I have to change to make is AS2 compatible? On 8/9/06, eric dolecki <[EMAIL PROTECTED]> wrote: > > this is AS3: > > http://www.senocular.com/flash/actionscript.php?file=ActionScript_3.0/com/senocular/events/Sequence.as > > > On 8/9/06, Matt Comstock <[EMAIL PROTECTED]> wrote: > > > > I am a newbie to flash and I did search flashcoders prior to asking this > > question. My issue is that I have two function that I am trying to call > > when a user selects a cell in a datagrid. One function loads a flv file > > and > > the other loads an associated XML file. These functions work perfectly > if > > I > > create two separate buttons to execute the function in the UI. I would > > like > > to be able to have the user select a value in a datagrid and after they > > select/cellpress the value execute function one, then after function one > > complete execute function two. > > > > Any help is greatly appreciated. > > > > Matt > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com > > http://training.figleaf.com > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- - Andreas Rønning --- Flash guy Rayon Visual Concepts, Oslo, Norway --- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Calling functions in sequence
You could call the second function from the first (and have a paramater so it only runs the second function if you send the paramater). function funct1(runNext){ //do something if(runNext){ funct2(); } } function funct2(){ //do whatever } to call only the first function: funct1(); to call both: funct1(true); On 8/9/06, Matt Comstock <[EMAIL PROTECTED]> wrote: Thank you. What would I have to change to make is AS2 compatible? On 8/9/06, eric dolecki <[EMAIL PROTECTED]> wrote: > > this is AS3: > > http://www.senocular.com/flash/actionscript.php?file=ActionScript_3.0/com/senocular/events/Sequence.as > > > On 8/9/06, Matt Comstock <[EMAIL PROTECTED]> wrote: > > > > I am a newbie to flash and I did search flashcoders prior to asking this > > question. My issue is that I have two function that I am trying to call > > when a user selects a cell in a datagrid. One function loads a flv file > > and > > the other loads an associated XML file. These functions work perfectly > if > > I > > create two separate buttons to execute the function in the UI. I would > > like > > to be able to have the user select a value in a datagrid and after they > > select/cellpress the value execute function one, then after function one > > complete execute function two. > > > > Any help is greatly appreciated. > > > > Matt > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com > > http://training.figleaf.com > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: Re: [Flashcoders] Calling functions in sequence
Well, take it out of the package declaration, and then rewrite the class a bit using the AS2 EventDispatcher, etc. If you need help with that, I might be around later today. On 8/9/06, Matt Comstock <[EMAIL PROTECTED]> wrote: Thank you. What would I have to change to make is AS2 compatible? On 8/9/06, eric dolecki <[EMAIL PROTECTED]> wrote: > > this is AS3: > > http://www.senocular.com/flash/actionscript.php?file=ActionScript_3.0/com/senocular/events/Sequence.as > > > On 8/9/06, Matt Comstock <[EMAIL PROTECTED]> wrote: > > > > I am a newbie to flash and I did search flashcoders prior to asking this > > question. My issue is that I have two function that I am trying to call > > when a user selects a cell in a datagrid. One function loads a flv file > > and > > the other loads an associated XML file. These functions work perfectly > if > > I > > create two separate buttons to execute the function in the UI. I would > > like > > to be able to have the user select a value in a datagrid and after they > > select/cellpress the value execute function one, then after function one > > complete execute function two. > > > > Any help is greatly appreciated. > > > > Matt > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com > > http://training.figleaf.com > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Calling functions in sequence
Thank you. What would I have to change to make is AS2 compatible? On 8/9/06, eric dolecki <[EMAIL PROTECTED]> wrote: this is AS3: http://www.senocular.com/flash/actionscript.php?file=ActionScript_3.0/com/senocular/events/Sequence.as On 8/9/06, Matt Comstock <[EMAIL PROTECTED]> wrote: > > I am a newbie to flash and I did search flashcoders prior to asking this > question. My issue is that I have two function that I am trying to call > when a user selects a cell in a datagrid. One function loads a flv file > and > the other loads an associated XML file. These functions work perfectly if > I > create two separate buttons to execute the function in the UI. I would > like > to be able to have the user select a value in a datagrid and after they > select/cellpress the value execute function one, then after function one > complete execute function two. > > Any help is greatly appreciated. > > Matt > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Calling functions in sequence
this is AS3: http://www.senocular.com/flash/actionscript.php?file=ActionScript_3.0/com/senocular/events/Sequence.as On 8/9/06, Matt Comstock <[EMAIL PROTECTED]> wrote: I am a newbie to flash and I did search flashcoders prior to asking this question. My issue is that I have two function that I am trying to call when a user selects a cell in a datagrid. One function loads a flv file and the other loads an associated XML file. These functions work perfectly if I create two separate buttons to execute the function in the UI. I would like to be able to have the user select a value in a datagrid and after they select/cellpress the value execute function one, then after function one complete execute function two. Any help is greatly appreciated. Matt ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com