Re: [Flashcoders] Problem: Safari and dynamic loading?
Sorry for the late reply! Many thanks for the suggestions - I think a load manager class is the way to go and I'll send Jamie a mail and take up the kind offer. Cheers, Dan On 22 nov 2006, at 16.36, Jamie S wrote: I the only way I was able to put the problem to bed for sure was to build a load manager class that would make sure everything loaded up one at a time. So all of the stuff that needed to be loaded would be put into a queue and the class would go through and load stuff, making sure not to load the next thing in the queue until the previous thing had finished. ___ 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] onMouseup bug?
Thanks for the replies! My apologies for not checking how the mouseup event is handled. Coming from many, many years of Director/Lingo work, I simply assumed mouseup to work in a similar manner :) Cheers, Dan On 20 okt 2006, at 17.02, Dave Mennenoh wrote: You don't need to use hitTest - you can just assign a function to the onRelease event within the constructor: class com.blurredistinction.Mtest extends MovieClip { function Mtest(){ this.onRelease = function(){ trace(this); } } } Dave - Head Developer www.blurredistinction.com Adobe Community Expert http://www.adobe.com/communities/experts/ ___ 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] onMouseup bug?
Hi all! I've stumbled upon something quite weird, and have searched for an explanation without any success. Consider the following Movieclip hiearchy: Contentclip (with a few images and text fields dynamically attached) - > buttonclip I have created a class which when instanced will: - attach a new instance of contentclip to level0 - attach onRollOver,onRollOut,onMouseUp functions to the child buttonclip When the movie runs, a rollover/rollout of one of the buttonclips will alert ONLY the object (class instance) that created it. However, when clicking on one of the buttonclips and capturing the event with onMouseUp, ALL the objects linked to contentclips will be called. Ie, if I have a function that create 4 objects that in turn each create one contentclip, one click on one button will result in 4 separate calls to each one of the 4 instance objects. Now for the weird part which makes me strongly suspect it's a bug rather than poor programming on my part: If I swap the onMouseUp event for an onPress event, the problem goes away. I get one call to the "parent" object which attached the onPress function - as I would have expected all along. I apologize for the poor description, I hope it makes sense and that someone can explain what's going on to me. :-) Many thanks in advance! Dan ___ 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] Movieclip event hook back to class instance?
On 6 okt 2006, at 19.15, slangeberg wrote: My problem is finding a way for the preloader class instance to tell when the movieclip reaches a certain frame or frame label Actually, I prefer to set things up in an event-based model. I don't have the code in front of me, but if you look at the EventDispatcher class, you can have whatever movie is doing the loading to add listeners to that which was loaded: myClip.addEventListener( "complete", Delegate.create( this, onComplete ) ); and inside of myClip, you'll need to: this.dispatchEvent( {type:"complete", target:this} ); Unfortunately this behavior is not built into MovieClip... Just some ideas... Scott Thanks for the suggestions everyone! I ended up setting up my own event handler without using listener functionality. It tags movieclips with an ID, which is passed to a central content manager, which in turn passes it to the correct class instance. Very simple and efficient with few lines of code. Perhaps not very elegant, but it works. :-) Cheers, Dan ___ 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] Movieclip event hook back to class instance?
Hi all! I have a (hopefully not too ignorant) question relating to movieclips created on the fly. Basically, I have a preloader class that is generic and reusable. It's called from whatever object that does dynamic loading of content and then in turn invokes a movieclip from a passed symbol name(can be anything, as long as a basic movieclip structure is followed). It all works great. However, when the loading is done I want the dynamically created mc to play an "outro" animation that is preanimated in the movieclip (as opposed to animated via AS, that would be easy ;) ). My problem is finding a way for the preloader class instance to tell when the movieclip reaches a certain frame or frame label (and is done with the outro). I can't find a suitable event to hook into? I guess I was looking for something like "mc.onframelabel" to hook a function to, I guess that was naive. :) Can I in some way create a hook myself, or do I have to create a watcher object that checks each frame where the playhead is in my dynamic loader movieclip? Would certainly work, but it's not very elegant. My goal is to keep the preloader movieclip code-free. Anyway, I hope I managed to describe the problem. Apologies for any ignorance and any terms/keywords used out of context. I'm pretty new to more advanced actionscript, but have many moons of general coding experience. :) Many thanks in advance, Dan ___ 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