Yes dude, it was an idea... but i think is more convenient having a modified Delegate class than using injection, as in injecting swf's doesn't support assets... thanks Hans for your reply and thanks to all the list!
Flash Coders ROCKS!!!! On 4/12/07, Hans Wichman <[EMAIL PROTECTED]> wrote:
Omar, have you tried what I suggested? greetz JC On 4/11/07, Omar Fouad <[EMAIL PROTECTED]> wrote: > > D. ache i tried it but unfortunately it didn't work..... More ideas??? > > On 4/11/07, dr.ache <[EMAIL PROTECTED]> wrote: > > > > scope problem. try to create the Delegate before applying it to the > > onEnterFrame function like that: > > function new() { > > var del:Funtion = Delegate.create(this,traceIt); > > _root.onEnterFrame = del; > > } > > > > problem arises because you are in _root.onEnterFrame. > > your "this" will point to _root, not on your class instance. > > > > try it out! > > > > > > Note: I had set the "USEMX" option in flash develop to true... > > > > > > import mx.utils.Delegate; > > > class New { > > > > > > function New() { > > > _root.onEnterFrame = Delegate.create(this, traceIt); > > > } > > > private function traceIt() { > > > trace("tracing"); > > > } > > > } > > > > > > well this should trace "tracing" on frame rate, but it doesn't... even > > > if i > > > don't use delegate and i i do: > > > > _______________________________________________ > > [EMAIL PROTECTED] > > 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 > > > > > > -- > Omar Fouad - Digital Emotions... > > Love is always patient and kind. It is never jealous. Love is never > boastful > nor conceited It is never rude or selfish. It does not take offense and is > not resentful. Love takes no pleasure in other people's sins...but > delights > in the truth. It is always ready to excuse, to trust, to hope... and to > endure... whatever comes. > _______________________________________________ > [EMAIL PROTECTED] > 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 > _______________________________________________ [EMAIL PROTECTED] 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
-- Omar Fouad - Digital Emotions... Love is always patient and kind. It is never jealous. Love is never boastful nor conceited It is never rude or selfish. It does not take offense and is not resentful. Love takes no pleasure in other people's sins...but delights in the truth. It is always ready to excuse, to trust, to hope... and to endure... whatever comes. _______________________________________________ [EMAIL PROTECTED] 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