Re: [Flashcoders] Running Independent SWF
Hi Bob Thanks for reply. This is not AIR, its simple swf file created from Flash authoring timeline. All the code is on main timeline. Also it behaves similarly on HTML published too, i tried windows exe publishing too. It seems like in my Flash IDE it is loading external SWF but when i am trying to run independent swf it is not loading external swfs. I don't know how to get rid of this problem. Please help Thanks Anuj On Wed, Mar 12, 2008 at 7:19 PM, Bob Wohl [EMAIL PROTECTED] wrote: Is this from opening the swf or is this an air app? Does this behave this way when testing from embeding in an html document? B. On Wed, Mar 12, 2008 at 3:08 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi All I made a desktop application( in AS 3.0 using Flash IDE) in which I am loading bunch of SWFs in my UILoader. The file is working fine from Flash Authoring tool( IDE). I publish my file using local files only. Now when I am trying to run my independent SWF file, i am getting error Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:///video/pic_8.swf. The things are working fine if i open fla and hit ctr+Enter.I don't know why its not working as an independent swf. Also the title of the player is showing player 9, which means it is using the player it is supposed to use. If i change my publish settings to network only nothing works at all. i am just using XML to load external SWFs and videos in UIloader component. Any body has any solution for this kind of problem. I am putting all my code on main time line in Flash authoring tool and my Operating system is XP Thanks a lot. Anuj ___ 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Using seek on a NetStream
Hi guys, I'm having a problem using seek. In a listener for NetStream.Play.Stop I have a call to stream_ns.seek(1). I am trying to loop a stream seamlessly. I put a trace on the stream_ns.time and after the seek is called, the time displays as starting over from 0. When I change the seek command to a value of 3 or 4, it still isn't accurate to what I'm sending it. Is this a bug in my trace or is the seek not as accurate as it should be? If anyone has any advice on getting a clean, stutter free loop on a NetStream I'd love to hear some thoughts. I've tried a lot of different methods with no good result yet. Thanks. -Shant ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Using seek on a NetStream
You can pass any time to seek, but the NetStream will jump to the nearest keyframe of the FLV. If you seek(4) and the nearest keyframe is at 7, it will jump to 7. Go to YouTube to see this happen as you scrub. Some of their videos have 15 second keyframes. If you've got control over the videos, you can publish them with more keyframes, 1 per second if you want, or more if you want more accuracy. Stutter-free loop? I'd say queue up a second NetStream of the same url and start it right when the other one ends or hits a certain timecode and attach the new one to the Video object at the same time. Shant Parseghian wrote: Hi guys, I'm having a problem using seek. In a listener for NetStream.Play.Stop I have a call to stream_ns.seek(1). I am trying to loop a stream seamlessly. I put a trace on the stream_ns.time and after the seek is called, the time displays as starting over from 0. When I change the seek command to a value of 3 or 4, it still isn't accurate to what I'm sending it. Is this a bug in my trace or is the seek not as accurate as it should be? If anyone has any advice on getting a clean, stutter free loop on a NetStream I'd love to hear some thoughts. I've tried a lot of different methods with no good result yet. Thanks. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] 9-slice scaling not working when used as mask
Hi Flashcoders, my subject might said it all am having a mask which is a movieclip with rounded corners, but when used as a mask - the 9-slice scaling seems to be out of function. Is there a way around this, is it a bug or intentional response? The solution that I know of, but dont like - is to make a movieclip with different movieclips in it to take care of the rounded corners in the old-fashioned way. -- Martin Klasson Flash Developer Parkgatan 9-11 S-411 24 Göteborg Sweden Office +46 (0) 31 711 54 50 Cell +46 (0) 730 964 561 [EMAIL PROTECTED] www.kokokaka.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] [AS3] Memory leaks unloading
Hi Henry, I've found that even if items are garbage collected in the Flash Player memory will be necessarily be freed in the browser. If you want to check for garbage collection you can use the Flex Profiler (In Flex Builder 3) to check whether items are collected or not. What you will most likely find is that your items are being gc'd but Flash is unable to free up the memory. We had an application loading in a large game and trying to unload it. Although the game was garbage collected most of the memory was not freed up. In the end we gave up trying to get Flash to load/unload large amounts of data since we didn't believe it was able to release memory well enough. Hope that helps! Sunil -Original Message- From: Henry Cooke [mailto:[EMAIL PROTECTED] Sent: 12 March 2008 17:25 To: Flash Coders List Subject: Re: [Flashcoders] [AS3] Memory leaks unloading Wow, thanks for all the tips, guys. I forgot to mention that I was removing all my listeners, too, but weak referencing definitely looks useful, as does the rest of the stuff that Mr Skinner's written on resource management. And I'll dig into my copy of Moock as soon as I get the chance. Thanks again! Any more suggestions welcome, of course ;) On 12/03/2008, Matthew James Poole [EMAIL PROTECTED] wrote: True, but its sounds like Henry has lots of stuff not marked for GC so he still has references somewhere, just a case of finding them... Easier said than done -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Allandt Bik-Elliott (Receptacle) Sent: 12 March 2008 16:30 To: Flash Coders List Subject: Re: [Flashcoders] [AS3] Memory leaks unloading as far as i know, there is no way of dumping the garbage manually - you have to wait for the flash plugin to dump it once it has been marked you can check chapter 14 of essential actionscript 3.0 (moock) for more info about that On 12 Mar 2008, at 15:54, Henry Cooke wrote: Hey all, I'm currently working on a Flash module to sit inside a larger Flash site being developed by another agency. This module needs to be loaded and unloaded as needed, and has a fair few library assets, quite substantial codebase and will be running PV3D or Away3D, so I need to be very careful about destroying everything when my module is finished with; the container site is pretty resource-hungry too. So, my current problem: I've built initialisation and destruction routines that run on Event.ADDED_TO_STAGE and Event.REMOVED_FROM_STAGE, and a test loader which loads and removes my module. However, watching the test loader unload my module in the Flash Player shows no noticeable drop in memory after my destructors have been called in the module and $loader.unload() has been called in the test loader, so it seems like a lot o stuff is gettign stuck in memory. Basically, my destructors set any class variables which reference objects to null, which I believe should mark them for garbage collection, if nothing else points to them? I also do things like removeChild() and bitmapData.dispose() where relevant. I've compiled in XRay, which shows what you'd expect: various bits present on stage while my module is loaded, all gone when it's not. So I guess my questions are: does anyone know any secret voodoo techniques to track down memory use in the Flash player? Is there anything better I can be doing than just setting pointers to null? Back in the AS2 day, I'd suspect the _global namespace of becoming cluttered and just try and nuke _global[ package_name ], but dirty hacks like that don't exist in our shiny new AS3 world, do they? I'd be grateful if anyone can offer any advice about how to properly clear up memory after unloading my module. This is my first AS3 project, and none of my old tricks work :( Cheers, Henry ___ 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 __ This e-mail has been scanned for viruses by the Virtual Universe e-mail security system - powered by MessageLabs. http://www.virtual-universe.net __ The contents of this email (which include its attachments) are confidential and may be subject to legal privilege and protected by copyright. If you are not the intended recipient any use, copying or disclosure of this e-mail to any third party is strictly forbidden by the sender and we reserve all rights and remedies against any person or entity making any such unauthorised use. If
Re: [Flashcoders] 9-slice scaling not working when used as mask
I haven't tried what you're doing, but you might be better off using the drawAPI and a method to draw your mask instead if probs continue. Thats the old-fashioned way to me. eric On Thu, Mar 13, 2008 at 8:48 AM, Martin Klasson [EMAIL PROTECTED] wrote: Hi Flashcoders, my subject might said it all am having a mask which is a movieclip with rounded corners, but when used as a mask - the 9-slice scaling seems to be out of function. Is there a way around this, is it a bug or intentional response? The solution that I know of, but dont like - is to make a movieclip with different movieclips in it to take care of the rounded corners in the old-fashioned way. -- Martin Klasson Flash Developer Parkgatan 9-11 S-411 24 Göteborg Sweden Office +46 (0) 31 711 54 50 Cell +46 (0) 730 964 561 [EMAIL PROTECTED] www.kokokaka.com ___ 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
Re: [Flashcoders] Arabic and other character sets text entry
Good point, yes the email will probably be ltr. I'll try posting on Flash_Tiger in the hope that she's around, thanks very much :) Piers [EMAIL PROTECTED] On 13 Mar 2008, at 13:20, Piers Cowburn wrote: Begin forwarded message: From: Kerry Thompson [EMAIL PROTECTED] Date: 12 March 2008 17:51:41 GMT To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Arabic and other character sets text entry Reply-To: Flash Coders List flashcoders@chattyfig.figleaf.com Piers Cowburn wrote: I found one idea online which I thought might be a shot, see it here: http://broadcast.artificialcolors.com/ index.php?title=flash_rtl_via_a_simple_hack_non_rhetoric The only free-text fields I would need are name and email address, the rest of the options are combo boxes which I could do in arabic simply by having the letters in there as a graphic. Do you think I might be able to use something like the idea above for a simple name and email address? As I don't think there should be and bi-di in there, just rtl. I'm not sure, but you might be able to get the combo box to display an Arabic font. It's worth a try, and make for a lighter download than using graphics. But--won't the e-mail address be ltr? I'm not sure, but I think most e-mail servers only handle ltr. I have an Israeli friend in Dublin who is a Flash genius, and is currently working on a Hebrew-language project. She's quite helpful, and knows a lot more about bi-di issues than I do I don't think she's on this list, though--she's on Flash_Tiger. You might try posting over there. She might even still be working--I think it's only about 7:00 in Dublin. Do it now, though, because St. Patrick's day is this weekend ^_^ Cordially, Kerry Thompson ___ 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
Re: [Flashcoders] 9-slice scaling not working when used as mask
Yeah, thats a solution that should work. I am not that good ar the drawing api to be making myself some great corners ;) -but I guess there is a solution for that - digging diwn and learn. thanks eric. 2008/3/13, eric e. dolecki [EMAIL PROTECTED]: I haven't tried what you're doing, but you might be better off using the drawAPI and a method to draw your mask instead if probs continue. Thats the old-fashioned way to me. eric On Thu, Mar 13, 2008 at 8:48 AM, Martin Klasson [EMAIL PROTECTED] wrote: Hi Flashcoders, my subject might said it all am having a mask which is a movieclip with rounded corners, but when used as a mask - the 9-slice scaling seems to be out of function. Is there a way around this, is it a bug or intentional response? The solution that I know of, but dont like - is to make a movieclip with different movieclips in it to take care of the rounded corners in the old-fashioned way. -- Martin Klasson Flash Developer Parkgatan 9-11 S-411 24 Göteborg Sweden Office +46 (0) 31 711 54 50 Cell +46 (0) 730 964 561 [EMAIL PROTECTED] www.kokokaka.com ___ 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 -- Martin Klasson Flash Developer Parkgatan 9-11 S-411 24 Göteborg Sweden Office +46 (0) 31 711 54 50 Cell +46 (0) 730 964 561 [EMAIL PROTECTED] www.kokokaka.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] 9-slice scaling not working when used as mask
did you try my_mask.cacheAsBitmap = true and my_masked_movieclip.cacheAsBitmap = true ? hth, Cedric On 13/03/2008 15:15, Martin Klasson wrote: I am not that good ar the drawing api to be making myself some great corners ;) import flash.display.Shape; var my_mask:Shape=new Shape(); my_mask.graphics.beginFill(0x99, 1); my_mask.graphics.drawRoundRect(10,10,320,240,15); my_mask.graphics.endFill(); addChild(my_mask); ___ 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
Re: [Flashcoders] 9-slice scaling not working when used as mask
If you are talking about drawing a rectangle with rounded corners, there is a method drawRoundRect() - cannot be simpler ;) Kenneth Kawamoto http://www.materiaprima.co.uk/ Martin Klasson wrote: Yeah, thats a solution that should work. I am not that good ar the drawing api to be making myself some great corners ;) -but I guess there is a solution for that - digging diwn and learn. thanks eric. 2008/3/13, eric e. dolecki [EMAIL PROTECTED]: I haven't tried what you're doing, but you might be better off using the drawAPI and a method to draw your mask instead if probs continue. Thats the old-fashioned way to me. eric On Thu, Mar 13, 2008 at 8:48 AM, Martin Klasson [EMAIL PROTECTED] wrote: Hi Flashcoders, my subject might said it all am having a mask which is a movieclip with rounded corners, but when used as a mask - the 9-slice scaling seems to be out of function. Is there a way around this, is it a bug or intentional response? The solution that I know of, but dont like - is to make a movieclip with different movieclips in it to take care of the rounded corners in the old-fashioned way. -- Martin Klasson Flash Developer Parkgatan 9-11 S-411 24 Göteborg Sweden Office +46 (0) 31 711 54 50 Cell +46 (0) 730 964 561 [EMAIL PROTECTED] www.kokokaka.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] 9-slice scaling not working when used as mask
On 13/03/2008 15:15, Martin Klasson wrote: I am not that good ar the drawing api to be making myself some great corners ;) import flash.display.Shape; var my_mask:Shape=new Shape(); my_mask.graphics.beginFill(0x99, 1); my_mask.graphics.drawRoundRect(10,10,320,240,15); my_mask.graphics.endFill(); addChild(my_mask); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] 9-slice scaling not working when used as mask
Speaking of Scale 9, can the Scaled MC, eg the one thats actually sitting IN the scaling movie, under the guides, have MC's within it? I've tried to use S9 as a way to control the positioning of nav items, eg, a movieclip, which itself contains multiple MCs, each of which sits in the safe zones at the corners. But when I do this, the whole thing still distorts, mcs at corners included. Am I using S9 for something it werent intended fer? :) thx, .m ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Issue with Windows Projector file
Hello, Is it possible to create a Windows Projector file that targets Flash Player 8 using Flash CS3? It seems the behavior of opening applications is different in the Windows Projector file created from Flash CS3. Previous behavior (Flash8 Projector) - executing a getURL command on a pdf file from a projector file in fullscreen opens the pdf and projector remains fullscreen. New behavior (Flash9 Projector) - executing a getURL command on a pdf file from a project file in fullscreen, changes the fullscreen mode, then opens the pdf. I can't figure out how to stop the projector from going out of fullscreen so I'm wondering if it is possible to create a projector for Flash Player 8 using Flash CS3. Anybody have any ideas? Or is there something I can do to prevent the projector from going out of fullscreen? Thanks. Matthew. This e-mail and its attachments are intended only for the use of the addressee(s) and may contain privileged, confidential or proprietary information. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, displaying, copying, or use of this information is strictly prohibited. If you have received this communication in error, please inform the sender immediately and delete and destroy any record of this message. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Running Independent SWF
Anuj, I know this is more of a hack than really fixing the problem, but have you tried keeping all swf's in the same directory? I am suspicious of the URL: file:///video/pic_8.swf. Why so many directory levels in the path? - Marc At 11:08 PM 3/12/2008, you wrote: Hi Bob Thanks for reply. This is not AIR, its simple swf file created from Flash authoring timeline. All the code is on main timeline. Also it behaves similarly on HTML published too, i tried windows exe publishing too. It seems like in my Flash IDE it is loading external SWF but when i am trying to run independent swf it is not loading external swfs. I don't know how to get rid of this problem. Please help Thanks Anuj On Wed, Mar 12, 2008 at 7:19 PM, Bob Wohl [EMAIL PROTECTED] wrote: Is this from opening the swf or is this an air app? Does this behave this way when testing from embeding in an html document? B. On Wed, Mar 12, 2008 at 3:08 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi All I made a desktop application( in AS 3.0 using Flash IDE) in which I am loading bunch of SWFs in my UILoader. The file is working fine from Flash Authoring tool( IDE). I publish my file using local files only. Now when I am trying to run my independent SWF file, i am getting error Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:///video/pic_8.swf. The things are working fine if i open fla and hit ctr+Enter.I don't know why its not working as an independent swf. Also the title of the player is showing player 9, which means it is using the player it is supposed to use. If i change my publish settings to network only nothing works at all. i am just using XML to load external SWFs and videos in UIloader component. Any body has any solution for this kind of problem. I am putting all my code on main time line in Flash authoring tool and my Operating system is XP Thanks a lot. Anuj ___ 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 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] [AS3] Sound Object Overlays
I am having a dilema with the sound Object. I have a player that plays sounds in certain order, when the user resets the movie the sounds play again. The issue is that somewhere the Sound Object remembers what sound was in queue thus when you reach certain point your old sounds play. for example play 1, 2 , 3 (pause) reset play 1, 2 (overlaps 3 ), 4 (overlaps 5).. and so forth. when the user resets the movie I stop the soundChannel but still I get this weird behavior and I was wondering if some one else has run on something similar or some guidance in better control of the sound object. TIA ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Passing vars with the the timer and events
That's a dangerous practice. I do not completely agree. It prevents you from using weak event listeners Correct. The common use for weak event listeners is when adding listeners to the stage: the stage is allways present and adding normal listeners to it will insure that the listener will persist. Even if it is removed everywhere else. In most cases there is actually no real benefit of creating weak event listeners. In most cases parents add listeners to their children. Children are removed and that's that. If the parent gets removed: no problem. In the majority of the cases, the creation of listeners on a parent is bad practice (stage is one of those exceptions). Now have to manually remove your listener to make sure your object is garbage collected -- but the only way to remove event listeners is to pass the removeEventListener function a reference to the function you want to remove... but you don't have that reference! Hmmm, if it was garbage collected, why would I remove the listener, isnt that the point of weak references? Greetz Erik On 3/12/08, Cory Petosky [EMAIL PROTECTED] wrote: That's a dangerous practice. It prevents you from using weak event listeners -- because the only reference to your delegate function object is the event listener itself, a weakly-referenced listener will be garbage collected. Now have to manually remove your listener to make sure your object is garbage collected -- but the only way to remove event listeners is to pass the removeEventListener function a reference to the function you want to remove... but you don't have that reference! If it's a one-time event, you can have the listener remove itself. Your delegate function object can pass a reference to itself (using arguments.callee) in to the real event listener function, which you can use to remove the listener. In any other case, you'll have to build a separate data structure (usually a Dictionary of Objects - Functions) to keep a reference available to your code. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Recources for planning flash projects
Hi all, i want to thoroughly plan a flash project before we start to save any messing later in the project. Can you point me to any sites that could give me some help with planning a flash project?? SM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [AS3] Sound Object Overlays
Hi Helmut, This looks more like an issue of lingering variables, or a queue that is not properly re-initialized at the pause, than of a problem with the Sound Object . How are you storing the references to the sounds? How are you controlling the sequential playing of the sounds? Bob Helmut Granda wrote: I am having a dilema with the sound Object. I have a player that plays sounds in certain order, when the user resets the movie the sounds play again. The issue is that somewhere the Sound Object remembers what sound was in queue thus when you reach certain point your old sounds play. for example play 1, 2 , 3 (pause) reset play 1, 2 (overlaps 3 ), 4 (overlaps 5).. and so forth. when the user resets the movie I stop the soundChannel but still I get this weird behavior and I was wondering if some one else has run on something similar or some guidance in better control of the sound object. TIA ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Thanks, ~ Bob Leisle Headsprout Software Engineering http://www.headsprout.com Where kids learn to read! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Passing vars with the the timer and events
The common use for weak event listeners is when adding listeners to the stage I disagree. Weak event listeners should be used in nearly all cases. In most cases there is actually no real benefit of creating weak event listeners. In most cases parents add listeners to their children. Children are removed and that's that. This is not correct. If you add a normal event listener to a child, and then remove that child, the child is _not_ garbage collected. Objects are only garbage collected when all references to the object are removed. Adding a normal event listener causes a reference to be created invisibly within the event system. You must remove all normal listeners from an object before it will be garbage collected. Hmmm, if it was garbage collected, why would I remove the listener, isnt that the point of weak references? You can't use weak references on an anonymous event listener. The only reference to that function is in the event system itself, so if you use a weak reference, the garbage collector considers the anonymous function eligible for garbage collection. Thus, the garbage collector removes your event listener immediately, and you never get your event. (When I say immediately, I really mean at a random time when the GC is invoked. Sometimes that's immediate, sometimes its not, but you should assume immediacy so your code doesn't randomly break.) On 3/13/08, EECOLOR [EMAIL PROTECTED] wrote: That's a dangerous practice. I do not completely agree. It prevents you from using weak event listeners Correct. The common use for weak event listeners is when adding listeners to the stage: the stage is allways present and adding normal listeners to it will insure that the listener will persist. Even if it is removed everywhere else. In most cases there is actually no real benefit of creating weak event listeners. In most cases parents add listeners to their children. Children are removed and that's that. If the parent gets removed: no problem. In the majority of the cases, the creation of listeners on a parent is bad practice (stage is one of those exceptions). Now have to manually remove your listener to make sure your object is garbage collected -- but the only way to remove event listeners is to pass the removeEventListener function a reference to the function you want to remove... but you don't have that reference! Hmmm, if it was garbage collected, why would I remove the listener, isnt that the point of weak references? Greetz Erik On 3/12/08, Cory Petosky [EMAIL PROTECTED] wrote: That's a dangerous practice. It prevents you from using weak event listeners -- because the only reference to your delegate function object is the event listener itself, a weakly-referenced listener will be garbage collected. Now have to manually remove your listener to make sure your object is garbage collected -- but the only way to remove event listeners is to pass the removeEventListener function a reference to the function you want to remove... but you don't have that reference! If it's a one-time event, you can have the listener remove itself. Your delegate function object can pass a reference to itself (using arguments.callee) in to the real event listener function, which you can use to remove the listener. In any other case, you'll have to build a separate data structure (usually a Dictionary of Objects - Functions) to keep a reference available to your code. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Cory Petosky : Lead Developer : PUNY 1618 Central Ave NE Suite 130 Minneapolis, MN 55413 Office: 612.216.3924 Mobile: 240.422.9652 Fax: 612.605.9216 http://www.punyentertainment.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [AS3] Sound Object Overlays
Hi Bob, Yeah after looking at my code I realized there was an issue with my set up. I am controlling the calls to the sound with time outs... and my idea was that if I cleared the time out variable that I was assigning all my time outs to, that for some reason all would be cleared but I was wrong... take this for example: trace(\n\n\n\nCOUNTER COUNT ** ) ; var myTimer : Number ; var counter : uint ; myTimer = setTimeout ( myfunc, 1000, first); myTimer = setTimeout ( myfunc, 1100, second); myTimer = setTimeout ( myfunc, 1200, third); myTimer = setTimeout ( myfunc, 1300, fourth-); trace(MYTIMER CHECK 1 = + myTimer) clearTimeout (myTimer); trace(MYTIMER CHECK 2 = + myTimer) myTimer = setTimeout ( myfunc, 1400, fifth); myTimer = setTimeout ( myfunc, 1500, sixth); myTimer = setTimeout ( myfunc, 1600, seventh); myTimer = setTimeout ( myfunc, 1700, eight); trace(MYTIMER CHECK 3 = + myTimer) function myfunc ( arg ) : void { trace(myFUNC - + counter + = +arg ); counter ++ } This will give you: COUNTER COUNT ** MYTIMER CHECK 1 = 4 MYTIMER CHECK 2 = 4 MYTIMER CHECK 3 = 8 myFUNC - 0 = first myFUNC - 1 = second myFUNC - 2 = third myFUNC - 3 = fifth myFUNC - 4 = sixth myFUNC - 5 = seventh myFUNC - 6 = eight it in fact clears the 4th time out since that is when the clearTimeout was called but for some reason I thought that since I was assigning all my timeouts to that one variable that all the items would be cleared. The only solution I see right now is to assign all my time outs to new variables and then clear them out, or create an array that would hold my timeouts or if there is a secrete CLEAR ALL TIME OUTS method that I dont know about, that would be nice :) Thanks again... On 3/13/08, Bob Leisle [EMAIL PROTECTED] wrote: Hi Helmut, This looks more like an issue of lingering variables, or a queue that is not properly re-initialized at the pause, than of a problem with the Sound Object . How are you storing the references to the sounds? How are you controlling the sequential playing of the sounds? Bob Helmut Granda wrote: I am having a dilema with the sound Object. I have a player that plays sounds in certain order, when the user resets the movie the sounds play again. The issue is that somewhere the Sound Object remembers what sound was in queue thus when you reach certain point your old sounds play. for example play 1, 2 , 3 (pause) reset play 1, 2 (overlaps 3 ), 4 (overlaps 5).. and so forth. when the user resets the movie I stop the soundChannel but still I get this weird behavior and I was wondering if some one else has run on something similar or some guidance in better control of the sound object. TIA ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Thanks, ~ Bob Leisle Headsprout Software Engineering http://www.headsprout.com Where kids learn to read! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] [AS3] FileReference.download()
Hi. simply trying to download files such as .zip or .pdf. The dialog box which tells me wher i want to download the file appears, i click OK, the dialog box closes and nothing is downloaded. files are on the same server. Did someone has a similar issue ? thx, N. here is my code: package { import flash.display.MovieClip; import flash.display.SimpleButton; import flash.events.MouseEvent; import flash.net.FileReference; import flash.net.URLRequest; import flash.events.IOErrorEvent; public class FileListItem extends MovieClip { private var _fileToDownload :FileReference; public function FileListItem(p_fileLocation:String) { _fileToDownload = new FileReference(); btDownload.addEventListener(MouseEvent.CLICK, _onDownload); }; private function _onDownload(p_evt:MouseEvent):void { _fileToDownload.addEventListener(IOErrorEvent.IO_ERROR, _onIOError) _fileToDownload.download(new URLRequest(_fileLocation), _fileLocation); } private function _onIOError(p_evt:IOErrorEvent):void { trace (p_evt); } } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [AS3] Sound Object Overlays
so a simple array to track them all: trace(\n\n\n\nCOUNTER COUNT ** ) ; var timeoutTracker : Array = new Array(); var myTimer : Number ; var counter : uint ; myTimer = setTimeout ( myfunc, 1000, first); timeoutTracker.push(myTimer); myTimer = setTimeout ( myfunc, 1100, second); timeoutTracker.push(myTimer); myTimer = setTimeout ( myfunc, 1200, third); timeoutTracker.push(myTimer); myTimer = setTimeout ( myfunc, 1300, fourth-); timeoutTracker.push(myTimer); myTimer = setTimeout ( myfunc, 1400, fifth); timeoutTracker.push(myTimer); myTimer = setTimeout ( myfunc, 1500, sixth); timeoutTracker.push(myTimer); myTimer = setTimeout ( myfunc, 1600, seventh); timeoutTracker.push(myTimer); myTimer = setTimeout ( myfunc, 1700, eight); timeoutTracker.push(myTimer); function myfunc ( arg ) : void { trace(myFUNC - + counter + = +arg ); counter ++ } for ( var i : int = 0 ; i timeoutTracker.length ; i++ ) { trace(TIMEOUTS = + i ); clearTimeout ( timeoutTracker[i]) ; } On 3/13/08, Helmut Granda [EMAIL PROTECTED] wrote: Hi Bob, Yeah after looking at my code I realized there was an issue with my set up. I am controlling the calls to the sound with time outs... and my idea was that if I cleared the time out variable that I was assigning all my time outs to, that for some reason all would be cleared but I was wrong... take this for example: trace(\n\n\n\nCOUNTER COUNT ** ) ; var myTimer : Number ; var counter : uint ; myTimer = setTimeout ( myfunc, 1000, first); myTimer = setTimeout ( myfunc, 1100, second); myTimer = setTimeout ( myfunc, 1200, third); myTimer = setTimeout ( myfunc, 1300, fourth-); trace(MYTIMER CHECK 1 = + myTimer) clearTimeout (myTimer); trace(MYTIMER CHECK 2 = + myTimer) myTimer = setTimeout ( myfunc, 1400, fifth); myTimer = setTimeout ( myfunc, 1500, sixth); myTimer = setTimeout ( myfunc, 1600, seventh); myTimer = setTimeout ( myfunc, 1700, eight); trace(MYTIMER CHECK 3 = + myTimer) function myfunc ( arg ) : void { trace(myFUNC - + counter + = +arg ); counter ++ } This will give you: COUNTER COUNT ** MYTIMER CHECK 1 = 4 MYTIMER CHECK 2 = 4 MYTIMER CHECK 3 = 8 myFUNC - 0 = first myFUNC - 1 = second myFUNC - 2 = third myFUNC - 3 = fifth myFUNC - 4 = sixth myFUNC - 5 = seventh myFUNC - 6 = eight it in fact clears the 4th time out since that is when the clearTimeout was called but for some reason I thought that since I was assigning all my timeouts to that one variable that all the items would be cleared. The only solution I see right now is to assign all my time outs to new variables and then clear them out, or create an array that would hold my timeouts or if there is a secrete CLEAR ALL TIME OUTS method that I dont know about, that would be nice :) Thanks again... On 3/13/08, Bob Leisle [EMAIL PROTECTED] wrote: Hi Helmut, This looks more like an issue of lingering variables, or a queue that is not properly re-initialized at the pause, than of a problem with the Sound Object . How are you storing the references to the sounds? How are you controlling the sequential playing of the sounds? Bob Helmut Granda wrote: I am having a dilema with the sound Object. I have a player that plays sounds in certain order, when the user resets the movie the sounds play again. The issue is that somewhere the Sound Object remembers what sound was in queue thus when you reach certain point your old sounds play. for example play 1, 2 , 3 (pause) reset play 1, 2 (overlaps 3 ), 4 (overlaps 5).. and so forth. when the user resets the movie I stop the soundChannel but still I get this weird behavior and I was wondering if some one else has run on something similar or some guidance in better control of the sound object. TIA ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Thanks, ~ Bob Leisle Headsprout Software Engineering http://www.headsprout.com Where kids learn to read! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [AS3] FileReference.download()
What browser? MAC PC? have you tried to download other files successfully besides pdf and zip files with the same code? On 3/13/08, ntasky [EMAIL PROTECTED] wrote: Hi. simply trying to download files such as .zip or .pdf. The dialog box which tells me wher i want to download the file appears, i click OK, the dialog box closes and nothing is downloaded. files are on the same server. Did someone has a similar issue ? thx, N. here is my code: package { import flash.display.MovieClip; import flash.display.SimpleButton; import flash.events.MouseEvent; import flash.net.FileReference; import flash.net.URLRequest; import flash.events.IOErrorEvent; public class FileListItem extends MovieClip { private var _fileToDownload :FileReference; public function FileListItem(p_fileLocation:String) { _fileToDownload = new FileReference(); btDownload.addEventListener(MouseEvent.CLICK, _onDownload); }; private function _onDownload(p_evt:MouseEvent):void { _fileToDownload.addEventListener( IOErrorEvent.IO_ERROR, _onIOError) _fileToDownload.download(new URLRequest(_fileLocation), _fileLocation); } private function _onIOError(p_evt:IOErrorEvent):void { trace (p_evt); } } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [AS3] FileReference.download()
Hi Ntasky, I'm not sure if this is the only cause to the problem, but I did notice this. Your _onDownLoad handler is using _fileLocation, which is not defined anywhere in your code. hth, Bob ntasky wrote: Hi. simply trying to download files such as .zip or .pdf. The dialog box which tells me wher i want to download the file appears, i click OK, the dialog box closes and nothing is downloaded. files are on the same server. Did someone has a similar issue ? thx, N. here is my code: package { import flash.display.MovieClip; import flash.display.SimpleButton; import flash.events.MouseEvent; import flash.net.FileReference; import flash.net.URLRequest; import flash.events.IOErrorEvent; public class FileListItem extends MovieClip { private var _fileToDownload:FileReference; public function FileListItem(p_fileLocation:String) { _fileToDownload = new FileReference(); btDownload.addEventListener(MouseEvent.CLICK, _onDownload); }; private function _onDownload(p_evt:MouseEvent):void { _fileToDownload.addEventListener(IOErrorEvent.IO_ERROR, _onIOError) _fileToDownload.download(new URLRequest(_fileLocation), _fileLocation); } private function _onIOError(p_evt:IOErrorEvent):void { trace (p_evt); } } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Thanks, ~ Bob Leisle Headsprout Software Engineering http://www.headsprout.com Where kids learn to read! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Passing vars with the the timer and events
If you add a normal event listener to a child, and then remove that child, the child is _not_ garbage collected. Objects are only garbage collected when all references to the object are removed. Adding a normal event listener causes a reference to be created invisibly within the event system. I think this is where we disagree. If a parent adds a listener to a child, this means the child has a reference to the parent, not the other way around. What you call the event system can be thought of as an array with handler methods on the child instance. This means that if you add a normal event listener to a child and then remove it, it will be garbage collected. There is no such thing as a reference to be created invisibly within the event system. You can't use weak references on an anonymous event listener. In my last email I agreed with you on this :) You must remove all normal listeners from an object before it will be garbage collected. Again, I do not think this is correct. An object will be garbage collected if there are no references to it. Adding listeners to an object will not create references to the object itself. An example (not usefull, but to illustrate the point): package { class TestClass { public function TestClass() { var o:EventDispatcher = new EventDispatcher(); o.addEventListener(Event.COMPLETE, _handler); }; // At this point o will be marked for garbage collection, no references to o left. private function _handler(e:Event):void { }; }; }; Another example (again not usefull, but to illustrate the point): package { class TestHandler { public function TestHandler() { }; public function handler(e:Event):void { }; }; }; package { import flash.display.Sprite; class TestClass extends Sprite { public function TestClass() { var o:TestHandler = new TestHandler(); stage.addEventListener(Event.RESIZE, o.handler); }; // At this point o will not be marked for garbage collection, stage will still have a reference to it. }; }; I hope you agree on this. If not I am open to convincing arguments :) Greetz Erik On 3/13/08, Cory Petosky [EMAIL PROTECTED] wrote: The common use for weak event listeners is when adding listeners to the stage I disagree. Weak event listeners should be used in nearly all cases. In most cases there is actually no real benefit of creating weak event listeners. In most cases parents add listeners to their children. Children are removed and that's that. This is not correct. If you add a normal event listener to a child, and then remove that child, the child is _not_ garbage collected. Objects are only garbage collected when all references to the object are removed. Adding a normal event listener causes a reference to be created invisibly within the event system. You must remove all normal listeners from an object before it will be garbage collected. Hmmm, if it was garbage collected, why would I remove the listener, isnt that the point of weak references? You can't use weak references on an anonymous event listener. The only reference to that function is in the event system itself, so if you use a weak reference, the garbage collector considers the anonymous function eligible for garbage collection. Thus, the garbage collector removes your event listener immediately, and you never get your event. (When I say immediately, I really mean at a random time when the GC is invoked. Sometimes that's immediate, sometimes its not, but you should assume immediacy so your code doesn't randomly break.) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Running Independent SWF
It is just a guess, but is the url in your swf /video/pic_8.swf? If so, you might want to change it to video/pic_8.swf (without the slash at the start). The slash at the start is only usefull if you are serving your swf from a webserver. Greetz Erik On 3/13/08, Marc Hoffman [EMAIL PROTECTED] wrote: Anuj, I know this is more of a hack than really fixing the problem, but have you tried keeping all swf's in the same directory? I am suspicious of the URL: file:///video/pic_8.swf. Why so many directory levels in the path? - Marc ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [AS3] FileReference.download()
hello bob, your absolutely right but unfortunatly for me it just that i forgot to copy/paste it... good catch thought :) N. public function FileListItem(p_fileLocation:String) { _fileToDownload = new FileReference(); _fileLocation = p_fileLocation; btDownload.addEventListener(MouseEvent.CLICK, _onDownload); }; -- From: Bob Leisle [EMAIL PROTECTED] Sent: Thursday, March 13, 2008 4:16 PM To: Flash Coders List flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] [AS3] FileReference.download() Hi Ntasky, I'm not sure if this is the only cause to the problem, but I did notice this. Your _onDownLoad handler is using _fileLocation, which is not defined anywhere in your code. hth, Bob ntasky wrote: Hi. simply trying to download files such as .zip or .pdf. The dialog box which tells me wher i want to download the file appears, i click OK, the dialog box closes and nothing is downloaded. files are on the same server. Did someone has a similar issue ? thx, N. here is my code: package { import flash.display.MovieClip; import flash.display.SimpleButton; import flash.events.MouseEvent; import flash.net.FileReference; import flash.net.URLRequest; import flash.events.IOErrorEvent; public class FileListItem extends MovieClip { private var _fileToDownload:FileReference; public function FileListItem(p_fileLocation:String) { _fileToDownload = new FileReference(); btDownload.addEventListener(MouseEvent.CLICK, _onDownload); }; private function _onDownload(p_evt:MouseEvent):void { _fileToDownload.addEventListener(IOErrorEvent.IO_ERROR, _onIOError) _fileToDownload.download(new URLRequest(_fileLocation), _fileLocation); } private function _onIOError(p_evt:IOErrorEvent):void { trace (p_evt); } } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Thanks, ~ Bob Leisle Headsprout Software Engineering http://www.headsprout.com Where kids learn to read! ___ 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] garbage collection for custom objects with video and sound
Hi All, So how does the garbage collection works in flash for objects with video and sound? I have a custom video player and when I delete the instance of this video player the sound and video continue to play on stage. removeChild(endMoviePlayer); endMoviePlayer = null ; I know there is no way to force the garbage collection to be triggered, so this means that I have to go inside of my object and delete the reference of all the items used within the custom class? TIA ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Passing vars with the the timer and events
There is no such thing as a reference to be created invisibly within the event system. I disagree. Try this test code: package { import flash.events.Event; import flash.display.Sprite; import flash.utils.getTimer; public class TestClass extends Sprite { public function TestClass() { trace(Started!); var s:Sprite = new Sprite(); s.addEventListener(Event.ENTER_FRAME, listener); addEventListener(Event.ENTER_FRAME, listener); } private function listener(event:Event):void { trace(event.currentTarget.toString() + getTimer()); } } } You'll see both event handlers fire until the end of time. Event references actually are kept, invisibly, within the event system. On 3/13/08, EECOLOR [EMAIL PROTECTED] wrote: If you add a normal event listener to a child, and then remove that child, the child is _not_ garbage collected. Objects are only garbage collected when all references to the object are removed. Adding a normal event listener causes a reference to be created invisibly within the event system. I think this is where we disagree. If a parent adds a listener to a child, this means the child has a reference to the parent, not the other way around. What you call the event system can be thought of as an array with handler methods on the child instance. This means that if you add a normal event listener to a child and then remove it, it will be garbage collected. There is no such thing as a reference to be created invisibly within the event system. You can't use weak references on an anonymous event listener. In my last email I agreed with you on this :) You must remove all normal listeners from an object before it will be garbage collected. Again, I do not think this is correct. An object will be garbage collected if there are no references to it. Adding listeners to an object will not create references to the object itself. An example (not usefull, but to illustrate the point): package { class TestClass { public function TestClass() { var o:EventDispatcher = new EventDispatcher(); o.addEventListener(Event.COMPLETE, _handler); }; // At this point o will be marked for garbage collection, no references to o left. private function _handler(e:Event):void { }; }; }; Another example (again not usefull, but to illustrate the point): package { class TestHandler { public function TestHandler() { }; public function handler(e:Event):void { }; }; }; package { import flash.display.Sprite; class TestClass extends Sprite { public function TestClass() { var o:TestHandler = new TestHandler(); stage.addEventListener(Event.RESIZE, o.handler); }; // At this point o will not be marked for garbage collection, stage will still have a reference to it. }; }; I hope you agree on this. If not I am open to convincing arguments :) Greetz Erik On 3/13/08, Cory Petosky [EMAIL PROTECTED] wrote: The common use for weak event listeners is when adding listeners to the stage I disagree. Weak event listeners should be used in nearly all cases. In most cases there is actually no real benefit of creating weak event listeners. In most cases parents add listeners to their children. Children are removed and that's that. This is not correct. If you add a normal event listener to a child, and then remove that child, the child is _not_ garbage collected. Objects are only garbage collected when all references to the object are removed. Adding a normal event listener causes a reference to be created invisibly within the event system. You must remove all normal listeners from an object before it will be garbage collected. Hmmm, if it was garbage collected, why would I remove the listener, isnt that the point of weak references? You can't use weak references on an anonymous event listener. The only reference to that function is in the event system itself, so if you use a weak reference, the garbage collector considers the anonymous function eligible for garbage collection. Thus, the garbage collector removes your event listener immediately, and you never get your event. (When I say immediately, I really mean at a random time when the GC is invoked. Sometimes that's immediate, sometimes its not, but you should assume immediacy so your code doesn't randomly break.) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com
Re: [Flashcoders] Recources for planning flash projects
http://gskinner.com/gmodeler/ hth B. On Thu, Mar 13, 2008 at 10:26 AM, Stuart (FunkDaWeb) [EMAIL PROTECTED] wrote: Hi all, i want to thoroughly plan a flash project before we start to save any messing later in the project. Can you point me to any sites that could give me some help with planning a flash project?? SM ___ 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
Re: [Flashcoders] Running Independent SWF
Hi ALL Thanks for your help. one of guy help me out in figuruign this thing out. I have to use /.video/pic_8.swf. Now the problem is solved. Thanks Anuj On Thu, Mar 13, 2008 at 1:58 PM, EECOLOR [EMAIL PROTECTED] wrote: It is just a guess, but is the url in your swf /video/pic_8.swf? If so, you might want to change it to video/pic_8.swf (without the slash at the start). The slash at the start is only usefull if you are serving your swf from a webserver. Greetz Erik On 3/13/08, Marc Hoffman [EMAIL PROTECTED] wrote: Anuj, I know this is more of a hack than really fixing the problem, but have you tried keeping all swf's in the same directory? I am suspicious of the URL: file:///video/pic_8.swf. Why so many directory levels in the path? - Marc ___ 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] Unable to connect to database
I posted this problem on Yahoo Groups FlexCoders, but I figured I can give the FlashCoders a try... I'm having major issues with connecting to my localhost database. The link below shows the generated link when I click on the Test Connection. How I setup my flex app: Create Flex Project Application server type: PHP Configure PHP Server /Applications/MAMP/htdocs root URL: http://localhost: Validate Configuration (clicked) and it is a success. I then go to Create Application from Databas: Connection New name: test Host URL : localhost Database: database name username: username password: password Test Connection (clicked). I then receive the following errors: http://privatepaste.com/320YZcjCi6 - Anthony ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Unable to connect to database
It looks like you are trying to connect to your database from Flex - this may or may not be via a browser connection, dunno, never tried to connect via Flex, but if you are using MAMP (I use XAMPP so similar) you probably need to connect to MySQL via PHP scripts through a web browser. Have you visited localhost: in your browser? - you should get the MAMP start page (URL maybe different). On my XAMPP, I also have a URL for PHPMyAdmin - localhost:/phpmyadmin - try that or something similar (help docs). If you can see PHPMyAdmin, you can connect to the database through PHP scripts - good. You can also configure users and privileges here, which may help with the next bit... But, with MySQL, you sometimes get different Privileges for socket and http based database connections - you may need to look up how to allow connections via a socket as this seems to be what the exception is talking about. Anthony Cintron wrote: I posted this problem on Yahoo Groups FlexCoders, but I figured I can give the FlashCoders a try... I'm having major issues with connecting to my localhost database. The link below shows the generated link when I click on the Test Connection. How I setup my flex app: Create Flex Project Application server type: PHP Configure PHP Server /Applications/MAMP/htdocs root URL: http://localhost: Validate Configuration (clicked) and it is a success. I then go to Create Application from Databas: Connection New name: test Host URL : localhost Database: database name username: username password: password Test Connection (clicked). I then receive the following errors: http://privatepaste.com/320YZcjCi6 - Anthony ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01736 759321 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Unable to connect to database
Try port 8889 instead - that's the MAMP default for MySQL. Anthony Cintron wrote: I posted this problem on Yahoo Groups FlexCoders, but I figured I can give the FlashCoders a try... I'm having major issues with connecting to my localhost database. The link below shows the generated link when I click on the Test Connection. How I setup my flex app: Create Flex Project Application server type: PHP Configure PHP Server /Applications/MAMP/htdocs root URL: http://localhost: Validate Configuration (clicked) and it is a success. I then go to Create Application from Databas: Connection New name: test Host URL : localhost Database: database name username: username password: password Test Connection (clicked). I then receive the following errors: http://privatepaste.com/320YZcjCi6 - Anthony ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01736 759321 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Unable to connect to database
Awesome! I fixed the issue. I changed the port number 8889. Host: localhost:8880 user: whatever password: whatever ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders