[Flashcoders] Transition Manager event complete
Hi, I have the following code TransitionManager.start(babyPreloader,{type:Fade, direction:Transition.OUT, duration:0.5, easing:Regular.easeOut}); var tempPreloader:DisplayObject = babyPreloader as DisplayObject; this.removeChild(tempPreloader); But since this does not wait for the transition to complete. I cannot see the transition happening. Is there a way to have a even listener for transition complete? Fahim Akhter Game Developer | White Rabbit Studios | http://apps.facebook.com/feline-frenzy/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] flv stop loading / close netconnection
My experience is that you can't close the default vp (video player) in an FLVPlayback instance, so you *never* use it. What were they thinking?! Before you load a video, you set the vp index to whatever you want, just not zero! myflv.activeVideoPlayerIndex = 1 myflv.source =hippo.flv Then when you're done... myflv.closeVideoPlayer(1); When working with active indexes, i find this page incredibly useful to find out what FLVPlayback properties are affected by activeVideoPlayerIndex... http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html#activeVideoPlayerIndex On your side note (I can't find anything in the docs on adding new instances of VideoPlayer Class), you don't have to do anything to add a new instance, all you do is set the flvplayback's activeVideoPlayerIndex to a new number, and it's ready to load a new vid. If you want to see that new vid, set the visibleVideoPlayerIndex to the same number. cheers chichilatte On 23 March 2010 09:13, Andrew Kenward a...@milkybrain.co.uk wrote: Hi David when you .close() the connection to the netstream object/video it stops the download and you lose the connection. I would also remove it from the displaylist. If you then want to go back to that same video after using .close() then you have to make a new connection to the video. So reload the videoplayer basically. Depending on the users browser it may continue to download the progressive video from the browser cache. If you have safari browser try looking at the activity window in the windows drop down menu. It should show you whats being downloaded on the page. Andy Andrew Kenward a...@milkybrain.co.uk www.milkybrain.co.uk 07590 609 554 On 22 Mar 2010, at 19:59, flashcoders-requ...@chattyfig.figleaf.com wrote: [Flashcoders] flv stop loading / close netconnection ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flash CS3 crashes when debugging
Hi list... [XP CS3] Why is my Flash IDE crashing all of a sudden when I go to debug? I deleted ASO files, rebooted, didn't make a difference. I haven't found any explanation through Google either. Help! - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash CS3 crashes when debugging
Mendelsohn, Michael wrote: Hi list... [XP CS3] Why is my Flash IDE crashing all of a sudden when I go to debug? I deleted ASO files, rebooted, didn't make a difference. I haven't found any explanation through Google either. Help! - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Hi, Maybe your workspace.xml file is trashed. Exit Flash, goto: C:\Documents and Settings\$USERNAME\Local Settings\Application Data\Adobe\Flash CS3\en\Configuration Rename workspacelayout.xml and restart Flash - that may solve the problem, but you will loose your workspace settings. Try that, if no different put the workspacelayout back... Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Flash CS3 crashes when debugging
Glen, you have saved my life! That worked. I can't believe it. Thank you, thank you, thank you! - Michael M. Maybe your workspace.xml file is trashed. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash CS3 crashes when debugging
Mendelsohn, Michael wrote: Glen, you have saved my life! That worked. I can't believe it. Thank you, thank you, thank you! - Michael M. Maybe your workspace.xml file is trashed. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders I never worked out why it worked either - I had same problem about 6 months ago and found some blurb that said to delete workspace... It's bloody annoying - think it's something to do with output window position, but not sure. Anyway, I duplicated my working workspace xml and just restore that one when CS3 throws its toys out the pram... I also have problem with the stacking order in CS3 quite a lot - SWF's at my screen-res start getting obscured by the IDE toolbars, etc. Same fix - delete workspace and start again. As I am working on this document size all the time it gets pretty annoying. I have asked for upgrade to CS4, but don't know why I should have to pay for bug-fixes (seems to be the new way of software business)... Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Flash CS3 crashes when debugging
Well, the most bizarre thing about this bug fix is that the two (debugging and window layout) seem to me like completely unrelated elements of the IDE. I ran into a cold trail in searching online. What's really bothersome is that it isn't documented anywhere. It's the equivalent of: I have a toothache...ok, well did you check to see if your car is low on gas? Something to that effect. I've never seen the stacking order (panel Z?) issue. That's a good one. Let's hope CS5 covers these obstacles. - MM I never worked out why it worked either - I had same problem about 6 months ago and found some blurb that said to delete workspace... It's bloody annoying - think it's something to do with output window position, but not sure. Anyway, I duplicated my working workspace xml and just restore that one when CS3 throws its toys out the pram... I also have problem with the stacking order in CS3 quite a lot - SWF's at my screen-res start getting obscured by the IDE toolbars, etc. Same fix - delete workspace and start again. As I am working on this document size all the time it gets pretty annoying. I have asked for upgrade to CS4, but don't know why I should have to pay for bug-fixes (seems to be the new way of software business)... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Events can be tedious, general thoughts on best practice?
I have an XMLLoader class that I wrote that I've been using to load XML files. -- public class XMLLoader{ /** * Load an XML file * * @param url The path to the XML file. * @param onComplete The function to call when the XML file loads, passes back an argument of type StyleSheet * @param onError The function to call (defaults to null) if the load errors out, passes back an IOErrorEvent object. */ public static function load(url:String, onComplete:Function, onError:Function = null):void{ var _xml:XML = null; var _xmlURL:URLRequest = new URLRequest(url); var _xmlLoader:URLLoader = new URLLoader(_xmlURL); _xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded); _xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, xmlError); function xmlLoaded(e:Event):void{ _xmlLoader.removeEventListener(Event.COMPLETE, xmlLoaded); _xmlLoader.removeEventListener(IOErrorEvent.IO_ERROR, xmlError); if(onComplete is Function){ var xml:XML = XML(_xmlLoader.data); onComplete(xml); } } function xmlError(e:IOErrorEvent):void{ _xmlLoader.removeEventListener(Event.COMPLETE, xmlLoaded); _xmlLoader.removeEventListener(IOErrorEvent.IO_ERROR, xmlError); if(onError is Function){ onError(e); } } } } -- As you can see it doesn't do too much, but writing the following every time I wanted to load an XML file was getting tedious: import flash.events.Event; import flash.events.IOErrorEvent; import flash.net.URLRequest; import flash.net.URLLoader; var xmlLoader:URLLoader = new URLLoader(new URLRequest(path/to/xmlFile.xml)); xmlLoader.addEventListener(Event.COMPLETE, onXMLLoaded); xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, onXMLError); function onXMLLoaded(e:Event):void{ } Being able to call XMLLoader.load(path/to/xmlFile.xml, onXMLLoaded, onXMLError); is so much better, the question is I am no longer using events, and handling the event listeners within the XMLLoader class and passing functions to the class to call upon said events.I'm curious as to other people's thoughts on this in terms of good/bad practice and what the pros/cons to this approach might be. Just want to hear all your thoughts. Thanks, Taka ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flex3: attaching assets from .swf using getDefinitionByName
Hello, may I ask another Flex question here? (the Yahoo flexcoders-list seems not to be very responsive, asked a question 4h ago there, it still hasn't appeared) I've prepared a short test case to demonstrate my problem: Test.mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onCreationComplete(); mx:Script ![CDATA[ private function onCreationComplete():void { var sprite:Sprite = new Sprite(); var g:Graphics = sprite.graphics; g.lineStyle(1, 0xFF); g.beginFill(0xFF); g.drawCircle(100, 100, 20); g.endFill(); spriteHolder.addChild(sprite); // XXX stuff below not working var suit:String = 'SPADES'; var mc:MovieClip = new (getDefinitionByName(Symbols.CLUBS) as Class); spriteHolder.addChild(mc); } ]] /mx:Script mx:VBox width=100% mx:Button label=1 icon={Symbols.SPADES} / mx:Button label=2 icon={Symbols.CLUBS} / mx:Button label=3 icon={Symbols.DIAMONDS} / mx:Button label=4 icon={Symbols.HEARTS} / mx:UIComponent id=spriteHolder width=200 height=200/ /mx:VBox /mx:Application Symbols.as: package { public class Symbols { [Embed('../assets/symbols.swf', symbol='spades')] public static const SPADES:Class; [Embed('../assets/symbols.swf', symbol='clubs')] public static const CLUBS:Class; [Embed('../assets/symbols.swf', symbol='diamonds')] public static const DIAMONDS:Class; [Embed('../assets/symbols.swf', symbol='hearts')] public static const HEARTS:Class; } } How could I make the mc appear? Everything else work ok. (the icons appear at the buttons, there is a red circle,...) I've tried many things, like casting to MovieAsset, Sprite, Image... Thank you Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Events can be tedious, general thoughts on best practice?
On Wed, Mar 24, 2010 at 7:03 PM, Taka Kojima t...@gigafied.com wrote: I'm curious as to other people's thoughts on this in terms of good/bad practice and what the pros/cons to this approach might be. My thoughts are that it's OK for the very common cases which don't need the flexibility of events. Advantages of events: * multiple listeners * one listener for multiple targets/types * progress events etc. * you'll have events all over your project anyway, period. * it's what other coders are familiar with The last one's important if other devs /might/ have to work with your code. For this it will only take me a minute to look up that strange loader class I don't know, but if you use too many of those it adds up, and at some point I won't want to play with you no more. Personally, I'll stick with events, and I don't mind them at all. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Events can be tedious, general thoughts on best practice?
You bring up some valid points, however some of them are irrelevant for this example, i.e. multiple listeners. I could be a minority, but I don't think I am when I say that I have never used multiple listeners for when I load in an XML file. Secondly, if I were to implement events for this XMLLoader class, I would most likely write a custom event class, which is even more work and I don't feel like it is necessary. The reason I say I'd write a custom event class is, let's say I wanted to implement caching into my XMLLoader class, I can't use the Event.COMPLETE event anymore as the second time I make the request it won't even call a URLLoader, as it's reading from an array/dictionary/vector stored in the class to grab the content. I totally agree with you on the familiarity/consistency point, it makes working with others a lot easier. The other option is as3-signals, which I'm looking into and looks rather promising. On Wed, Mar 24, 2010 at 1:02 PM, Mark Winterhalder mar...@gmail.com wrote: On Wed, Mar 24, 2010 at 7:03 PM, Taka Kojima t...@gigafied.com wrote: I'm curious as to other people's thoughts on this in terms of good/bad practice and what the pros/cons to this approach might be. My thoughts are that it's OK for the very common cases which don't need the flexibility of events. Advantages of events: * multiple listeners * one listener for multiple targets/types * progress events etc. * you'll have events all over your project anyway, period. * it's what other coders are familiar with The last one's important if other devs /might/ have to work with your code. For this it will only take me a minute to look up that strange loader class I don't know, but if you use too many of those it adds up, and at some point I won't want to play with you no more. Personally, I'll stick with events, and I don't mind them at all. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Filter rendering error warning
I have a Print button in my SWF that prints a defined area off to the right of the stage. There are a few small objects on the stage with drop shadows at that point, but no filters on the objects in the print area which is just a background and some static and dynamic text fields. When I test my SWF and click the Print button the output window tells me Warning: Filter will not render. The DisplayObject's filtered dimensions (6928, 4637) are too large to be drawn. The stage itself is 820 x 545, and the entire area I am using (from the top left of the stage to the bottom right of the print area) is 1516 x 660, so I don't get where 6928 x 4637 is coming from. Is this maybe a glitch in Flash? Everything still seems to work okay for me, but I am worried that this error may cause the SWF to not work properly on some slower computers, or have some other unwanted effect for my clients. Has anybody seen this sort of thing before, and maybe has a solution to stop this filter rendering error from occurring? Alan Neilsen This message is for the named persons use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or; lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. GOULBURN OVENS INSTITUTE OF TAFE and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of any such entity. # This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal # ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders