Re: [Flashcoders] AS3 Noise (Audio) Filter?
I have not seen anything that does that (how unhelpful was this !)… Having said that, this guy is a DSP specialist by the looks of it: http://gerrybeauregard.wordpress.com/2010/08/03/an-fft-in-as3/ maybe if you got in contact with him ? On 24 May 2013, at 15:20, Eric E. Dolecki edole...@gmail.com wrote: I'm looking for something to attempt to remove noise (or hum/hiss) from a playing audio file in real-time. Thanks for any pointers. Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki Imagineric http://imagineric.ericd.net ___ 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] Game physics programming needed.
I would also have a look at NAPE: https://github.com/deltaluca/nape . CDK can be quite slow in comparison to vector maths. Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND On 27 Oct 2012, at 16:16, Kurt Dommermuth wrote: Thank you JC. My partner was excited about it, but then something happened that dissuaded him from using it. I'll run it by him again and find out why. Thanks for the note! Kurt On Sat, Oct 27, 2012 at 11:09 AM, Hans Wichman hans.wich...@gmail.comwrote: Hi Kurt, sorry don't have the time to help you out, would love to though:) but maybe it isn't necessary... have you thought about using box2d instead of CDK? regards, JC On 27/10/2012 16:49, Kurt Dommermuth wrote: Hello People, Someone is helping me program a game, but neither he nor I can handle some aspects of it. I won't speak for him, but the truth is my math skills blow. Is anyone out there confident that could make this skateboard game work? http://staticportfolio.com/**TEY/skatebeach/http://staticportfolio.com/TEY/skatebeach/ We've got so much of it together, but the rails, ramps and platform just aren't coming together well. We're using CDK to help with the collision detection. In the version we have up there now we removed our attempts, but the character is supposed to be able to jump up on rails and 'grind', go up the rail on the platform and fly through the air and hit the ramp and fly through the air, If doesn't jump onto the rail, he should sort of bounce off it - same with the platform. There are other nuances that someone more skilled than me could address, but that's the basic idea. I do have a budget for this, but time is tight. Email me directly or whatever suits you if you know you could help. Thanks all, Kurt __**_ Flashcoders mailing list Flashcoders@chattyfig.figleaf.**com Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/**mailman/listinfo/flashcodershttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders __**_ Flashcoders mailing list Flashcoders@chattyfig.figleaf.**com Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/**mailman/listinfo/flashcodershttp://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] Time adjusted / Framerate independent animation…
Hello Flash coders, It's been a little quite here of late… So, hope it's good with with you all. … I have been trying to figure this out for a day or so, and wondering if you can help. I am trying to time correct my animation to be independent of framerate, which is a little easier when dealing with physics (scaling velocity / position) than non physics animation… In my app physics is time corrected, however I have some code that is not physics based an am trying to have that running independently of framerate (and not really succeding). In the following demo: http://kurst.co.uk/transfer/timecorrection/TimeCorrection.swf I have two rects ( green and red ). The green one is being time corrected, and I would expect it to follow the red one ( as there is no lag in framerate )… however as you can see - it's not really working. Using the following formula to correct it: var spcTargetPosition : Point = new Point() spcTargetPosition.x = ( spc.x + ( spc.x + 10 ) ) * speed * spcDir; spcTargetPosition.y = spc.y; dt = 0.001 * (getTimer() - t0); time+= dt; t0 = getTimer(); spc.x = spc.x + ( dt * spcTargetPosition.x ); Here is the full code: http://kurst.co.uk/transfer/timecorrection/TimeCorrection.as I would love it if you can point out where I am going wrong... Best regards Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Time adjusted / Framerate independent animation…
are you trying to do frame rate independent animation based on a fixed frame rate (eg you switch from 30 to 60 and everything should move at the same pace but more fluid Yep - that is the one… all my game physics is independent of framerate (time based)… however, I am trying to get other non-physics based animated objects/code to work the same way (i.e. the camera), and I am finding it a little difficult. Will try your solution - although it looks like it's for the other option (variable framerate)…. Thank you for helping…. Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND On 26 Oct 2012, at 15:21, Hans Wichman wrote: Hi, are you trying to do frame rate independent animation based on a fixed frame rate (eg you switch from 30 to 60 and everything should move at the same pace but more fluid), or trying to make up a variable framerate due to running code? Anyway since you are keeping y constant I compressed the code a bit, is this what you are looking for? private function enterFrame( event : Event ) : void { sp.x += speed * spDir; if ( 0 sp.x|| ( sp.x + sp.width ) stage.stageWidth ) spDir = -spDir; var lSpeedPerSecond:Number = 300; var lSpeedPerFrameConstant:Number = lSpeedPerSecond / stage.frameRate; var lSpeedPerFrameVariable:Number = lSpeedPerSecond * (getTimer()-t0)/1000; spc.x += lSpeedPerFrameConstant* spcDir; //spc.x += lSpeedPerFrameVariable * spcDir; if ( 0 spc.x|| ( spc.x + spc.width ) stage.stageWidth ) spcDir = -spcDir; t0 = getTimer(); } hth jc On 26-10-2012 15:29, Karim Beyrouti wrote: Hello Flash coders, It's been a little quite here of late… So, hope it's good with with you all. … I have been trying to figure this out for a day or so, and wondering if you can help. I am trying to time correct my animation to be independent of framerate, which is a little easier when dealing with physics (scaling velocity / position) than non physics animation… In my app physics is time corrected, however I have some code that is not physics based an am trying to have that running independently of framerate (and not really succeding). In the following demo: http://kurst.co.uk/transfer/timecorrection/TimeCorrection.swf I have two rects ( green and red ). The green one is being time corrected, and I would expect it to follow the red one ( as there is no lag in framerate )… however as you can see - it's not really working. Using the following formula to correct it: var spcTargetPosition : Point = new Point() spcTargetPosition.x = ( spc.x + ( spc.x + 10 ) ) * speed * spcDir; spcTargetPosition.y = spc.y; dt = 0.001 * (getTimer() - t0); time += dt; t0 = getTimer(); spc.x = spc.x + ( dt * spcTargetPosition.x ); Here is the full code: http://kurst.co.uk/transfer/timecorrection/TimeCorrection.as I would love it if you can point out where I am going wrong... Best regards Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND ___ 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
Re: [Flashcoders] Time adjusted / Framerate independent animation…
Thank you! That make sense. Will integrate this into my code ( now looking at my camera class ) … This is quite important, as if there is any frame lag, physics and other objects go out of sync. Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND On 26 Oct 2012, at 17:07, Hans Wichman wrote: Hi Karim, i put them both in there, the one you are referring to is simpler: ofcourse this value can be kept out of the enterframe loop, i have a utility class for it (although it is a bit overkill;)) private function enterFrame( event : Event ) : void { sp.x += speed * spDir; if ( 0 sp.x|| ( sp.x + sp.width ) stage.stageWidth ) spDir = -spDir; var lSpeedPerSecond:Number = 300; var lSpeedPerFrameConstant:Number = lSpeedPerSecond / stage.frameRate; spc.x += lSpeedPerFrameConstant* spcDir; if ( 0 spc.x|| ( spc.x + spc.width ) stage.stageWidth ) spcDir = -spcDir; t0 = getTimer(); } Anyway, basically frameindependent value is simply SPEED_PER_SECOND/FRAMES_PER_SECOND. regards Hans On 26-10-2012 16:58, Karim Beyrouti wrote: are you trying to do frame rate independent animation based on a fixed frame rate (eg you switch from 30 to 60 and everything should move at the same pace but more fluid Yep - that is the one… all my game physics is independent of framerate (time based)… however, I am trying to get other non-physics based animated objects/code to work the same way (i.e. the camera), and I am finding it a little difficult. Will try your solution - although it looks like it's for the other option (variable framerate)…. Thank you for helping…. Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND On 26 Oct 2012, at 15:21, Hans Wichman wrote: Hi, are you trying to do frame rate independent animation based on a fixed frame rate (eg you switch from 30 to 60 and everything should move at the same pace but more fluid), or trying to make up a variable framerate due to running code? Anyway since you are keeping y constant I compressed the code a bit, is this what you are looking for? private function enterFrame( event : Event ) : void { sp.x += speed * spDir; if ( 0 sp.x|| ( sp.x + sp.width ) stage.stageWidth ) spDir = -spDir; var lSpeedPerSecond:Number = 300; var lSpeedPerFrameConstant:Number = lSpeedPerSecond / stage.frameRate; var lSpeedPerFrameVariable:Number = lSpeedPerSecond * (getTimer()-t0)/1000; spc.x += lSpeedPerFrameConstant* spcDir; //spc.x += lSpeedPerFrameVariable * spcDir; if ( 0 spc.x|| ( spc.x + spc.width ) stage.stageWidth ) spcDir = -spcDir; t0 = getTimer(); } hth jc On 26-10-2012 15:29, Karim Beyrouti wrote: Hello Flash coders, It's been a little quite here of late… So, hope it's good with with you all. … I have been trying to figure this out for a day or so, and wondering if you can help. I am trying to time correct my animation to be independent of framerate, which is a little easier when dealing with physics (scaling velocity / position) than non physics animation… In my app physics is time corrected, however I have some code that is not physics based an am trying to have that running independently of framerate (and not really succeding). In the following demo: http://kurst.co.uk/transfer/timecorrection/TimeCorrection.swf I have two rects ( green and red ). The green one is being time corrected, and I would expect it to follow the red one ( as there is no lag in framerate )… however as you can see - it's not really working. Using the following formula to correct it: var spcTargetPosition : Point = new Point() spcTargetPosition.x = ( spc.x + ( spc.x + 10 ) ) * speed * spcDir; spcTargetPosition.y = spc.y; dt = 0.001 * (getTimer() - t0); time += dt; t0 = getTimer(); spc.x = spc.x + ( dt * spcTargetPosition.x ); Here is the full code: http://kurst.co.uk/transfer/timecorrection/TimeCorrection.as I would love it if you can point out where I am going wrong... Best regards Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman
Re: [Flashcoders] Time adjusted / Framerate independent animation…
Ok - i needed variable speed per frame (so animation keeps in time with possible frame lag) . I guess where I get confused is: how would i structure this if I wanted the follower to for example follow the mouse (with an eased delay)?… Here is the code for now ( which is currently not really adjusting for frame delay / variable speed ) private function enterFrame( event : Event ) : void { // Update Time dt = 0.001 * (getTimer() - t0); time+= dt; // // TIME CORRECTED var lSpeedPerSecond : Number = 30; var lSpeedPerFrameVariable : Number = lSpeedPerSecond * dt; var targetX : Number = ( ( spc.x - stage.mouseX ) / lSpeedPerSecond ); spc.x -= targetX; if ( 0 spc.x|| ( spc.x + spc.width ) stage.stageWidth ) spcDir = -spcDir; t0 = getTimer(); } Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND On 26 Oct 2012, at 17:07, Hans Wichman wrote: Hi Karim, i put them both in there, the one you are referring to is simpler: ofcourse this value can be kept out of the enterframe loop, i have a utility class for it (although it is a bit overkill;)) private function enterFrame( event : Event ) : void { sp.x += speed * spDir; if ( 0 sp.x|| ( sp.x + sp.width ) stage.stageWidth ) spDir = -spDir; var lSpeedPerSecond:Number = 300; var lSpeedPerFrameConstant:Number = lSpeedPerSecond / stage.frameRate; spc.x += lSpeedPerFrameConstant* spcDir; if ( 0 spc.x|| ( spc.x + spc.width ) stage.stageWidth ) spcDir = -spcDir; t0 = getTimer(); } Anyway, basically frameindependent value is simply SPEED_PER_SECOND/FRAMES_PER_SECOND. regards Hans On 26-10-2012 16:58, Karim Beyrouti wrote: are you trying to do frame rate independent animation based on a fixed frame rate (eg you switch from 30 to 60 and everything should move at the same pace but more fluid Yep - that is the one… all my game physics is independent of framerate (time based)… however, I am trying to get other non-physics based animated objects/code to work the same way (i.e. the camera), and I am finding it a little difficult. Will try your solution - although it looks like it's for the other option (variable framerate)…. Thank you for helping…. Karim Beyrouti t: +44 (0) 7977 997 629 e: ka...@kurst.co.uk w: http://kurst.co.uk skype: karimbeyrouti 109 Timber Yard, Drysdale Street, Hoxton, London, N1 6ND On 26 Oct 2012, at 15:21, Hans Wichman wrote: Hi, are you trying to do frame rate independent animation based on a fixed frame rate (eg you switch from 30 to 60 and everything should move at the same pace but more fluid), or trying to make up a variable framerate due to running code? Anyway since you are keeping y constant I compressed the code a bit, is this what you are looking for? private function enterFrame( event : Event ) : void { sp.x += speed * spDir; if ( 0 sp.x|| ( sp.x + sp.width ) stage.stageWidth ) spDir = -spDir; var lSpeedPerSecond:Number = 300; var lSpeedPerFrameConstant:Number = lSpeedPerSecond / stage.frameRate; var lSpeedPerFrameVariable:Number = lSpeedPerSecond * (getTimer()-t0)/1000; spc.x += lSpeedPerFrameConstant* spcDir; //spc.x += lSpeedPerFrameVariable * spcDir; if ( 0 spc.x|| ( spc.x + spc.width ) stage.stageWidth ) spcDir = -spcDir; t0 = getTimer(); } hth jc On 26-10-2012 15:29, Karim Beyrouti wrote: Hello Flash coders, It's been a little quite here of late… So, hope it's good with with you all. … I have been trying to figure this out for a day or so, and wondering if you can help. I am trying to time correct my animation to be independent of framerate, which is a little easier when dealing with physics (scaling velocity / position) than non physics animation… In my app physics is time corrected, however I have some code that is not physics based an am trying to have that running independently of framerate (and not really succeding). In the following demo: http://kurst.co.uk/transfer/timecorrection/TimeCorrection.swf I have two rects ( green and red ). The green one is being time corrected, and I would expect it to follow the red one ( as there is no lag in framerate )… however as you can see - it's not really working. Using the following formula to correct it: var spcTargetPosition : Point = new Point() spcTargetPosition.x = ( spc.x + ( spc.x + 10 ) ) * speed * spcDir; spcTargetPosition.y = spc.y; dt = 0.001
[Flashcoders] Pure AS3 spark.components.List
Hello List ! Wondering if anyone is using any of the flex 'spark.components' in a pure AS3 Project ? If so, I am currently trying to get the 'spark.components.List' working, and it's just not showing any content from the data provider. Best Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] mx.logging package?
registration point ( white circle) is the centre of transformation - so if you rotate the symbol, or transform it (using transform tool), it will happen around the the registration point (white circle). You can also move that point using the transform tool. ( tiny cross hair) in movieClip That's the 0,0 point for the assets in the MovieClip. pretty sure i got it right…. On 2 Aug 2011, at 15:06, nasim h wrote: Hi I work in flash Ide cs5 could u tell me what s diferent between registration point ( white circle) and origion point( tiny cross hair) in movieClip how can i change them?? --- On Tue, 8/2/11, Dave Watts dwa...@figleaf.com wrote: From: Dave Watts dwa...@figleaf.com Subject: Re: [Flashcoders] mx.logging package? To: Flash Coders List flashcoders@chattyfig.figleaf.com Date: Tuesday, August 2, 2011, 9:23 AM Any idea where I can get the mx.logging package? Is it an intrinsic or what? As3 corelib is dependant on it. It's part of the Flex framework, and is automatically included in Flex 3 projects. You can install the Flex 3.x SDK, then reference this directory: C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\frameworks\flash-integration\ (your version number will probably be the latest 3.x SDK rather than 3.0.0, actually) Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ___ 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] Webcam - Menu / Allow access not working
Hello Flashcoders, Well - the adobe settings panel to allow access to my webcam is not responding to mouse click - it shows up - and I can't click 'Allow' or 'Deny'. It just simple does not respond to keyboard or mouse events. Anyone seen this before / or know how to resolve this issue ? Chrome / OsX 10.7. Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] FDT + Apk, adding extra files
Hello List !!! Well - almost weekend... and have a hopefully quick question. Do any of you know how to include files (in this case images) with an APK... so I can get the app to load them ?... Using FDT 4.5 Best Karim Beyrouti ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FDT + Apk, adding extra files
Got it, in FDT; Just needed to add the folder or file path to the ANT file: arg value=${deploy.dir}/images/ / On 1 Jul 2011, at 18:43, Karim Beyrouti wrote: Hello List !!! Well - almost weekend... and have a hopefully quick question. Do any of you know how to include files (in this case images) with an APK... so I can get the app to load them ?... Using FDT 4.5 Best Karim Beyrouti ___ 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] AIR + Google Maps = not working
Hello List - I am trying to get Google Maps working in an AIR app (for desktop). Currently I am not able to get the maps to initialise and work in an AIR application. Has anyone managed to get the googleMaps as3 component to work inside an AIR application ? Best Karim Beyrouti ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AIR + Google Maps = not working
Figured it out, in air you have to define a URL for the map component. i.e.: zoomMap.url= 'http://myWebsite.com' Cheers Karim On 8 Jun 2011, at 12:49, Karim Beyrouti wrote: Hello List - I am trying to get Google Maps working in an AIR app (for desktop). Currently I am not able to get the maps to initialise and work in an AIR application. Has anyone managed to get the googleMaps as3 component to work inside an AIR application ? Best Karim Beyrouti ___ 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] Incubator updates
Interestingly enough - I installed the latest drivers from NVidia on windows (bootcamp/2010 - 13 MBP), and Stage3D performance dropped to 2-3 FPS just like on OSX. Also, I think some games on OsX use vine/windows emulator - which is why they are slower. Not sure if Valve have native code or not for OsX, but - i also hope they bridge the gap with OsX a little more. On 6 Jun 2011, at 21:13, Kevin Newman wrote: Lots of things, like any Valve game for example, seem to run much slower on Mac OS X than on Windows, on the same hardware. I'm not sure this is a Flash Player problem specifically, though I do hope they can bridge the gap a bit more. Kevin N. On 5/22/11 6:32 AM, Karim Beyrouti wrote: one observation here: Stage 3d / Molehill runs much much faster on a PC than a Mac. Recently loaded XP BootCamp, and some Away3D examples than ran at 2-3 FPS on OsX ran at 30 FPS in XP on the same PC, well all examples were an order of magnitude faster in XP / Window. I know it's early days, but I do hope that this gets ironed out, and we are not left with too much disparity/performance differentials between platforms. - k On 22 May 2011, at 10:54, Henrik Andersson wrote: Since nobody else has done this, I might as well do it. It's old news by now, but it doesn't hurt to tell people about it. The flash player incubator have updated and added new features. http://labs.adobe.com/technologies/flashplatformruntimes/incubator/ Here is the feature list for those who can't be bothered to check the page out. Media/Real Time Communications * G.711 audio compression for telephony * H.264/AVC SW Encode for camera encoding Language/VM * JSON (JavaScript Object Notation) * GC Advice * Socket Progress Events * Pause/sleep/resume Events Security * Secure random number generator * TLS (Transport Layer Security) sockets * TLS socket policy file Oh and they still got that previous incubator stuff too, like Molehill and cubic bezier curves. ___ 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
Re: [Flashcoders] Incubator updates
one observation here: Stage 3d / Molehill runs much much faster on a PC than a Mac. Recently loaded XP BootCamp, and some Away3D examples than ran at 2-3 FPS on OsX ran at 30 FPS in XP on the same PC, well all examples were an order of magnitude faster in XP / Window. I know it's early days, but I do hope that this gets ironed out, and we are not left with too much disparity/performance differentials between platforms. - k On 22 May 2011, at 10:54, Henrik Andersson wrote: Since nobody else has done this, I might as well do it. It's old news by now, but it doesn't hurt to tell people about it. The flash player incubator have updated and added new features. http://labs.adobe.com/technologies/flashplatformruntimes/incubator/ Here is the feature list for those who can't be bothered to check the page out. Media/Real Time Communications * G.711 audio compression for telephony * H.264/AVC SW Encode for camera encoding Language/VM * JSON (JavaScript Object Notation) * GC Advice * Socket Progress Events * Pause/sleep/resume Events Security * Secure random number generator * TLS (Transport Layer Security) sockets * TLS socket policy file Oh and they still got that previous incubator stuff too, like Molehill and cubic bezier curves. ___ 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] F4V progressive download?
Also, might be the server's mime type is not configured for f4v? On 2 Apr 2011, at 03:06, Merrill, Jason jason.merr...@bankofamerica.com wrote: I believe F4V is for H.264 video, AAC or MP3 audio only. Could that be the reason? Jason Merrill Instructional Technology Architect Bank of America Global Learning ___ -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of J.C. Berry Sent: Friday, April 01, 2011 7:11 PM To: Flash Coders List Subject: [Flashcoders] F4V progressive download? Hello all, I have googled this for the last few hours and have not found a full answer. I have a progressive download player and it works fine with FLV's, but when I encode my video to F4V's I cannot seem to get any video loading into the page. I published to FP10 from CS5 (and video from CS5 Media Encoder). Any help would be greatly appreciated! -- J.C. Berry, M.A. UI Developer 619.306.1712(m) jcharlesbe...@gmail.com portfolio: http://Client:maz...@www.mindarc.com This E-mail is covered by the Electronic Communications Privacy Act, 18 U.S.C. ?? 2510-2521 and is legally privileged. This information is confidential information and is intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ 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] RegExp Help
This is great - thanks for explaining, helps a lot. the original expression I posted works this tool : http://gskinner.com/RegExr I would love to know what magic Grant is using to get it working in his RegExp utility. Thank you Anthony. On 11 Mar 2011, at 23:42, Anthony Pace wrote: Hi Karim and Ktu, Below is an explanation of what appears to be going on in the given pattern: (?:\s*) is a greedy non-capturing group of whitespace (?=[-|/]) is looking behind the next section of the expression, (?name\w*), for, what is in this case, a character set; as well, it does so without including it in the result. In this case the character set could also be written without the |, resulting in [-/] (?name\w*) is looking for name\w*, before the next expression [:|=] you may have wanted (?Pname\w*) [:|=] is a character set : or =, but again does not need the |, and could be [:=] or something like (?::|=) (((?value.*?)(?!\\))|(?value[\w]*)) is what I think you may have wanted to be an alternation, and in another language it would have worked; however, not in AS3. Apparently in AS3 in order to distinguish the syntax from a lookbehind ? you need to use the syntax ?PdesiredGroupName when defining a named group; as well, it is due to the fact that, as far as I know, in AS3 you cannot use names of the same group even a logical OR alternation. On 3/11/2011 2:37 PM, Ktu wrote: I just plugged it into RegExrhttp://www.regexr.com and I can't make sense of it. Try using that tool to build it. It really helps On Fri, Mar 11, 2011 at 5:56 AM, Karim Beyroutika...@kurst.co.uk wrote: Hello lovely list...I am trying to run a RegExp pattern on a String, and am not too sure why it's not working, and am not too sure why. Here is the code: var tStr: String= '/a:value -big=this -test:123 -test2=th_3' var r : RegExp= new RegExp( '(?:\s*)(?=[-|/])(?name\w*)[:|=](((?value.*?)(?!\\))|(?value[\w]*))'); var result : Object= r.exec( str ); result returns null... Maybe you can shed some light on what i am doing wrong here? Thanks... Karim ___ 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
Re: [Flashcoders] RegExp Help
I seem to be having some mixed results with this one: var tStr: String = '-path:c:\test path\temp -param spaced string -x' var patt: RegExp = new RegExp( '(?=[-{1,2}|/])(?Pname[a-zA-Z0-9]*)(?::|=)*(?Pvalue[\w|.|?|=||+| |:|/|\\]*)(?=[ |]|$)' , 'g'); var result : Object = patt.exec(tStr ); As it currently stands - it's not picking up Pvalue properly. it seems to be working in Grants RegExp tool. But am having issues picking up the groups in my code. This is my first attempt with RegExp, I guess it's not the easiest start. Maybe it would be better to write a parser for this one, but am curious to know if it can be done with AS3 RegExp. Cheers Karim On 13 Mar 2011, at 09:27, Karim Beyrouti wrote: This is great - thanks for explaining, helps a lot. the original expression I posted works this tool : http://gskinner.com/RegExr I would love to know what magic Grant is using to get it working in his RegExp utility. Thank you Anthony. On 11 Mar 2011, at 23:42, Anthony Pace wrote: Hi Karim and Ktu, Below is an explanation of what appears to be going on in the given pattern: (?:\s*) is a greedy non-capturing group of whitespace (?=[-|/]) is looking behind the next section of the expression, (?name\w*), for, what is in this case, a character set; as well, it does so without including it in the result. In this case the character set could also be written without the |, resulting in [-/] (?name\w*) is looking for name\w*, before the next expression [:|=] you may have wanted (?Pname\w*) [:|=] is a character set : or =, but again does not need the |, and could be [:=] or something like (?::|=) (((?value.*?)(?!\\))|(?value[\w]*)) is what I think you may have wanted to be an alternation, and in another language it would have worked; however, not in AS3. Apparently in AS3 in order to distinguish the syntax from a lookbehind ? you need to use the syntax ?PdesiredGroupName when defining a named group; as well, it is due to the fact that, as far as I know, in AS3 you cannot use names of the same group even a logical OR alternation. On 3/11/2011 2:37 PM, Ktu wrote: I just plugged it into RegExrhttp://www.regexr.com and I can't make sense of it. Try using that tool to build it. It really helps On Fri, Mar 11, 2011 at 5:56 AM, Karim Beyroutika...@kurst.co.uk wrote: Hello lovely list...I am trying to run a RegExp pattern on a String, and am not too sure why it's not working, and am not too sure why. Here is the code: var tStr: String= '/a:value -big=this -test:123 -test2=th_3' var r : RegExp= new RegExp( '(?:\s*)(?=[-|/])(?name\w*)[:|=](((?value.*?)(?!\\))|(?value[\w]*))'); var result : Object= r.exec( str ); result returns null... Maybe you can shed some light on what i am doing wrong here? Thanks... Karim ___ 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] RegExp Help
Hello lovely list...I am trying to run a RegExp pattern on a String, and am not too sure why it's not working, and am not too sure why. Here is the code: var tStr: String= '/a:value -big=this -test:123 -test2=th_3' var r : RegExp= new RegExp( '(?:\s*)(?=[-|/])(?name\w*)[:|=](((?value.*?)(?!\\))|(?value[\w]*))'); var result : Object= r.exec( str ); result returns null... Maybe you can shed some light on what i am doing wrong here? Thanks... Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] OT: Adobe Air Marketplace
Sorry for the OT post - once again, i was just wondering what your experiences with the Adobe Air marketplace have been like: i have had another app for pending approval since 23 Jan (http://swfrenderer.kurst.co.uk/) - and it's still not approved. Adobe says it takes about 1-2 weeks days to approve apps - however there are loads of people complaining on forums. Anyone know what's the deal with the approval process these days and why it's still taking so long? Cheers Karim___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Automatic quality toggle
I developed an AIR app to export SWF to PNG sequences: http://swfrenderer.kurst.co.uk We developed it because flash was skipping frames and animation was not overly smooth on CPU intensive movies (be it code or timeline). We also had a few issues with the CS5 PNG/Movie exporter. It works with timeline animation and dynamic / coded animations (AS2/3) - and works well as long as tweens use frames instead of timecode. (for tweenmax, it's the useFrame property for tweens). Hope it helps someone... - karim On 26 Feb 2011, at 14:02, Latcho wrote: I hate super heavy cpu supersucker vector animations online, I prefer streaming video :) And vector animations compress way nicer to video as photographic content does. I think it is simple to write a tool that onenterframe captures any (swf-loaded) animation frame to a bitmap, which you can save with AIR as a jpg or png. Easy to combine this jpg's to an mjpeg video stream in any reasonable videopackage or with ffmpeg ( http://www.ffmpeg.org/faq.html#SEC14 ). On 2/26/2011 11:10 AM, Henrik Andersson wrote: Christoffer Enedahl skriver: It sounds like it's time to encode the flash animation to video. For some of the cases, yeah. You are right in that encoding to video would solve the issue for local playback. Give me a shout when you find a tool that actually can do it properly. But it is not acceptable for online distribution. I myself hate people uploading video encodings of their vector animations. It's needlessly big files and the quality just isn't as good as the source material. ___ 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] Flash CS5 - Component Live Preview Disapearing
Hello live... I am currently developing a component for Flash CS5 (AS3), I have stumbled on an issue where the live preview disappears leaving a blank space where the component should be. This only happens when the component is turned into a complied clip. It's there but not visible, which obviously would not be a good thing for the designers. Has anyone found any solutions for this issue ? Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash CS5 - Component Live Preview Disapearing
Not sure that was it - i was just converting to symbol/component to a SWF library item. I am now using a SWF for live preview which did seem to fix it, also made sure it was embedded... thanks chris... On 28 Feb 2011, at 20:45, Chris Foster wrote: Hi Karim, This might happen if your Live Preview is linked to an external SWF, rather than embedded in your component (see your Component Definition dialog box). C: -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karim Beyrouti Sent: Tuesday, 1 March 2011 3:42 AM To: Flash Coders List Subject: [Flashcoders] Flash CS5 - Component Live Preview Disapearing Hello live... I am currently developing a component for Flash CS5 (AS3), I have stumbled on an issue where the live preview disappears leaving a blank space where the component should be. This only happens when the component is turned into a complied clip. It's there but not visible, which obviously would not be a good thing for the designers. Has anyone found any solutions for this issue ? Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. ___ 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] FaceBook, Posting Data allowScriptAccess
Thanks Kevin - yep - checked outgoing requests - and to be honest - I did not think i was going to get an answer anymore ... we got it working, it was a rather silly oversight on our side (too many cooks in the kitchen)... thank you for taking the time to answer... Best Karim On 10 Feb 2011, at 17:06, Kevin Newman wrote: Did you check firebug's net tab to make sure the request is indeed not going out (and if it is going out, that it is hitting the correct location)? I didn't think allowScriptAccess=never would prevent posting (it's been forever since I looked into it though). If it's really not going to allow you to load data, you could serialize all the data and shove it into a flashvar in the embed code, and then parse it within Flash at load. I'm working on a Facebook app right now that has 3 separate SWFs (2 of them loaded in iframes), that are able to communicate with one another over ExternalInterface, and are also able to pull data from a data source. I'm using unFocus.SwfHTML to embed them though, not using any special FB api. Kevin N. On 2/4/2011 8:20 PM, Karim Beyrouti wrote: php script. The php is on the same server as the SWF. I am 99% sure that facebook setting the allowScriptAccess='never' parameter when embedding with FBML is what's causing the flash not to submit the data to the script. I was wondering what techniques do you use to embed flash content in FaceBook, and how you'd get around this? Thanks, for your time. ___ 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] FaceBook, Posting Data allowScriptAccess
Hello list, I am currently trying to debug a SWF on FaceBook which is not posting data to back to a php script. The php is on the same server as the SWF. I am 99% sure that facebook setting the allowScriptAccess='never' parameter when embedding with FBML is what's causing the flash not to submit the data to the script. I was wondering what techniques do you use to embed flash content in FaceBook, and how you'd get around this? Thanks, for your time. - Karim___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] problem with adding two digits
It's an issue with floating point accuracy/calculations, Here is some info: http://joshblog.net/2007/01/30/flash-floating-point-number-errors/ saw more about it somewhere else... don't think it's an issue with the FP tho'. - Karim On 14 Dec 2010, at 15:15, tom rhodes wrote: same here compiling for flash player 10 and flash player 9, 8 and below give 0.3 as expected On 14 December 2010 15:42, Adrian Zając zajac.adr...@gmail.com wrote: trace (0.27 + 0.03); ___ 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] Testing display object if its MovieClip or BitMap?
Hopefully the line breaks here wont be too bad, pasting the code: CODE package { import flash.utils.describeType; import flash.utils.getQualifiedClassName; /** * @author karim @ kurst.co.uk */ public class ClassUtils { public static function getSuperClass( obj : Object ):String { var superClass : String= describeType(obj)@base; var isBase : Boolean = ( superClass == '' ) if ( isBase ) return getClassName( obj ); else return replaceChar(superClass, '::', '.') return ''; } public static function getFullClassPath( obj : * ) : String { var className : String = getQualifiedClassName( obj ); if ( className != null ){ if ( className.indexOf( '::' ) == -1 ){ return className; } else { return replaceChar(className, '::', '.') } } else { return ''; } } public static function getClassName( obj : * ) : String { var className : String = getQualifiedClassName( obj ); if ( className != null ){ if ( className.indexOf( '::' ) == -1 ){ return className; } else { return className.substr( className.indexOf( '::' ) + 2 , className.length ) } } else { return ''; } } public static function replaceChar( str : String, charToRemove : String , charToReplace : String) : String { var temparray:Array = str.split(charToRemove); return temparray.join(charToReplace); } } } /CODE On 2 Dec 2010, at 03:21, Micky Hulse wrote: Hi Karim! Many thanks for the reply and code sample! I really appreciate the help. :) On Wed, Dec 1, 2010 at 5:19 PM, Karim Beyrouti ka...@kurst.co.uk wrote: attached a class that does that, hope it helps... Doh! Looks like the Flash Coders List does not allow attachments! :( Do you have a server you could upload the AS file to? Maybe you could post it on GitHub, or create a Gist? I would love see your class. :) https://gist.github.com/ Thanks Karim! Cheers, Micky ___ 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] Testing display object if its MovieClip or BitMap?
attached a class that does that, hope it helps... example : trace( ClassUtils.getFullClassPath( canvas ) ); // flash.display.Bitmap trace( ClassUtils.getSuperClass( canvas ) ); // flash.display.DisplayObject On 1 Dec 2010, at 23:40, Micky Hulse wrote: On Wed, Dec 1, 2010 at 3:25 PM, Glen Pike postmas...@glenpike.co.uk wrote: If your downcast does not work - the as bit - your variable will be null -it does not throw exceptions. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html#as Excellent! Thanks for the clarification. Thanks Glen and Henrik! I really appreciate the pro help. :) Have a great day! Cheers, Micky ___ 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] Normalising Numbers
Wow thank you for the wonderful explanation Juan... very helpful to know all this. Thanks Again Karim On 30 Nov 2010, at 01:53, Juan Pablo Califano wrote: I think you're complicating the problem by introducing Math.abs which, I was once told by a mathematically inclined colleague, is an arithmetic atrocity (I've taken note of that since then and the nice thing is that almost always, signs just work they way out without any extra help). The formula is simpler than you probably think. You just need to find the size of the range, that is the difference between the max and the min values. Forget about signs, just take the max value and substract the min. Easy as that. If you have, say 10 and -4, the range size will be 14: 10 - (-4) -- 10 + 4 = 14 The signs don't matter, as long as you always substract the smaller value from the bigger one. Now, once you have this value, you just have to find how far the ranged value is from min and then scale it. Let's say your value is 3. I picked 3 because it's easy to see it's in the middle and that the result should be 0.5. So: rangeSize is 14 (max - min). min is -4 rangedValue is 3: How far is rangedValue from min? rangedValue - min That is: 3 - (-4) or 3 + 4 = 7 Now, the last step, scaling it: (rangedValue - min) / rangeSize Replacing the values: (3 - (-4) ) / 14 (3 + 4) / 14 7 / 14 = 0.5 And there you have it. So a function to normalize a ranged value could look like this: function rangedToNormal(ranged:Number,min:Number,max:Number):Number { var rangeSize:Number = max - min; return (ranged - min) / rangeSize; } Going the other way is simple too: function normalToRanged(normal:Number,min:Number,max:Number):Number { var rangeSize:Number = max - min; return min + normal * rangeSize; } (Though above you might want to validate that the normal value is actually normalized before converting it to the passed range) Also, I'm not sure how you are calculating the min and max values of your list, but if there aren't other specific requirements, you could just use Math.max and Math.min. They accept a variable number of arguments, not just two, so Function::apply comes handy here: var min:Number = Math.min.apply(null,list); This will give you the min value of the list with just one line, no loops, etc. So, to wrap it up, you could write your function in just a few lines, like this: function normalizeNumbers(list:Array):Array { var min:Number = Math.min.apply(null,list); var max:Number = Math.max.apply(null,list); var len:int = list.length; var result:Array = []; for(var i:int = 0; i len; i++) { result[i] = rangedToNormal(list[i],min,max); } return result; } Cheers Juan Pablo Califano 2010/11/29 Karim Beyrouti ka...@kurst.co.uk Hello FlashCoder... maybe it's because it's late but it's getting a little confusing, and google is not being friendly right now. seems to works fine with positive numbers, however - i am trying to normalise a range of positive and negative numbers... ( code simplified not to find min and max values ). I am currently am coming up a little short... hope this code does not give anyone a headache; if you fancy a stab, or if you can point me in the right direction ... otherwise ... will post results when i get there... Code: public function test() { trace('') trace( testNormalizeNumbers( [ 1 , 1.5 , 2 ] , 2 , 1 ).toString() ); trace('') trace( testNormalizeNumbers( [ 1 , 1.5 , 5 , 1 , 6.4 , 6, 3, -2.6, -1 , 3.5 ] , 6.4 , -2.6 ).toString() ); trace('') trace( testNormalizeNumbers( [ -1 , -1.5 , -5 , -1 , -6.4 , -6, -3, -2.6, -1 , -3.5 ] ,-1 , -6.4 ).toString() ); } public function testNormalizeNumbers( a : Array , max : Number , min : Number ) : Array { var result : Array = new Array(); var nMax: Number= ( min 0 ) ? max - min : max + Math.abs( min ); for ( var c : int = 0 ; c a.length ; c++ ){ var pRangedValue: Number = ( min 0 ) ? a[c] - min : a[c] + Math.abs( min ); var normalizedValue : Number = pRangedValue / nMax; result.push( normalizedValue ); } return result; } Thanks Karim ___ 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
Re: [Flashcoders] Normalising Numbers
For some reason, it did not like, a full array of negative numbers (returned an inverse normalisation), so added a case for that... not sure it's the most elegant solution... here it is: public function NormalizeArray() { trace( normalizeNumbers( [ 1 , 1.5 , 2 ] ).toString() ); trace( normalizeNumbers( [ 1 , 1.5 , 5 , 1 , 6.4 , 6 , 3 , -2.6 , -1 , 3.5 ] ).toString() ); trace( normalizeNumbers( [ -1 , -1.5 , -5] ).toString() ); //0,0.125,1 } public function normalizeNumbers( list : Array ) : Array { var min : Number= Math.min.apply( null , list ); var max : Number= Math.max.apply( null , list ); var len : int = list.length; var result : Array = []; var n : Boolean = ( min max 0 ) for (var i : int = 0; i len; i++) { result[i] = ( n ) ? 1 - rangedToNormal( list[i] , min , max ) : rangedToNormal( list[i] , min , max ) } return result; } public function rangedToNormal( ranged : Number , min : Number , max : Number ) : Number { var rangeSize : Number = max - min; return (ranged - min) / rangeSize; } On 30 Nov 2010, at 01:53, Juan Pablo Califano wrote: I think you're complicating the problem by introducing Math.abs which, I was once told by a mathematically inclined colleague, is an arithmetic atrocity (I've taken note of that since then and the nice thing is that almost always, signs just work they way out without any extra help). The formula is simpler than you probably think. You just need to find the size of the range, that is the difference between the max and the min values. Forget about signs, just take the max value and substract the min. Easy as that. If you have, say 10 and -4, the range size will be 14: 10 - (-4) -- 10 + 4 = 14 The signs don't matter, as long as you always substract the smaller value from the bigger one. Now, once you have this value, you just have to find how far the ranged value is from min and then scale it. Let's say your value is 3. I picked 3 because it's easy to see it's in the middle and that the result should be 0.5. So: rangeSize is 14 (max - min). min is -4 rangedValue is 3: How far is rangedValue from min? rangedValue - min That is: 3 - (-4) or 3 + 4 = 7 Now, the last step, scaling it: (rangedValue - min) / rangeSize Replacing the values: (3 - (-4) ) / 14 (3 + 4) / 14 7 / 14 = 0.5 And there you have it. So a function to normalize a ranged value could look like this: function rangedToNormal(ranged:Number,min:Number,max:Number):Number { var rangeSize:Number = max - min; return (ranged - min) / rangeSize; } Going the other way is simple too: function normalToRanged(normal:Number,min:Number,max:Number):Number { var rangeSize:Number = max - min; return min + normal * rangeSize; } (Though above you might want to validate that the normal value is actually normalized before converting it to the passed range) Also, I'm not sure how you are calculating the min and max values of your list, but if there aren't other specific requirements, you could just use Math.max and Math.min. They accept a variable number of arguments, not just two, so Function::apply comes handy here: var min:Number = Math.min.apply(null,list); This will give you the min value of the list with just one line, no loops, etc. So, to wrap it up, you could write your function in just a few lines, like this: function normalizeNumbers(list:Array):Array { var min:Number = Math.min.apply(null,list); var max:Number = Math.max.apply(null,list); var len:int = list.length; var result:Array = []; for(var i:int = 0; i len; i++) { result[i] = rangedToNormal(list[i],min,max); } return result; } Cheers Juan Pablo Califano 2010/11/29 Karim Beyrouti ka...@kurst.co.uk Hello FlashCoder... maybe it's because it's late but it's getting a little confusing, and google is not being friendly right now. seems to works fine with positive numbers, however - i am trying to normalise a range of positive and negative numbers... ( code simplified not to find min and max values ). I am currently am coming up a little short... hope this code does not give anyone a headache; if you fancy a stab, or if you can point me in the right direction ... otherwise ... will post results when i get there... Code: public function test() { trace('') trace( testNormalizeNumbers( [ 1 , 1.5 , 2 ] , 2 , 1 ).toString() ); trace('') trace( testNormalizeNumbers( [ 1 , 1.5 , 5 , 1 , 6.4 , 6, 3, -2.6, -1 , 3.5 ] , 6.4 , -2.6 ).toString() ); trace
Re: [Flashcoders] Normalising Numbers
Actually - ignore that last email - your solution worked a treat, thanks - karim public function NormalizeArray() { trace( normalizeNumbers( [ 1 , 1.5 , 2 ] ).toString() ); trace( normalizeNumbers( [ 1 , 1.5 , 5 , 1 , 6.4 , 6 , 3 , -2.6 , -1 , 3.5 ] ).toString() ); trace( normalizeNumbers( [ -1 , -1.5 , -5] ).toString() ); trace( normalizeNumbers( [0 , -0.25 , -.5] ).toString() ); trace( normalizeNumbers( [0 , 0.25 , .5] ).toString() ); } public function normalizeNumbers( list : Array ) : Array { var min : Number= Math.min.apply( null , list ); var max : Number= Math.max.apply( null , list ); var len : int = list.length; var result : Array = []; //var n : Boolean = ( min max = 0 ) //trace( n ) for (var i : int = 0; i len; i++) { //result[i] = ( n ) ? 1 - rangedToNormal( list[i] , min , max ) : rangedToNormal( list[i] , min , max ) result[i] = rangedToNormal( list[i] , min , max ) } return result; } public function rangedToNormal( ranged : Number , min : Number , max : Number ) : Number { var rangeSize : Number = max - min; return (ranged - min) / rangeSize; } On 30 Nov 2010, at 11:25, Karim Beyrouti wrote: Wow thank you for the wonderful explanation Juan... very helpful to know all this. Thanks Again Karim On 30 Nov 2010, at 01:53, Juan Pablo Califano wrote: I think you're complicating the problem by introducing Math.abs which, I was once told by a mathematically inclined colleague, is an arithmetic atrocity (I've taken note of that since then and the nice thing is that almost always, signs just work they way out without any extra help). The formula is simpler than you probably think. You just need to find the size of the range, that is the difference between the max and the min values. Forget about signs, just take the max value and substract the min. Easy as that. If you have, say 10 and -4, the range size will be 14: 10 - (-4) -- 10 + 4 = 14 The signs don't matter, as long as you always substract the smaller value from the bigger one. Now, once you have this value, you just have to find how far the ranged value is from min and then scale it. Let's say your value is 3. I picked 3 because it's easy to see it's in the middle and that the result should be 0.5. So: rangeSize is 14 (max - min). min is -4 rangedValue is 3: How far is rangedValue from min? rangedValue - min That is: 3 - (-4) or 3 + 4 = 7 Now, the last step, scaling it: (rangedValue - min) / rangeSize Replacing the values: (3 - (-4) ) / 14 (3 + 4) / 14 7 / 14 = 0.5 And there you have it. So a function to normalize a ranged value could look like this: function rangedToNormal(ranged:Number,min:Number,max:Number):Number { var rangeSize:Number = max - min; return (ranged - min) / rangeSize; } Going the other way is simple too: function normalToRanged(normal:Number,min:Number,max:Number):Number { var rangeSize:Number = max - min; return min + normal * rangeSize; } (Though above you might want to validate that the normal value is actually normalized before converting it to the passed range) Also, I'm not sure how you are calculating the min and max values of your list, but if there aren't other specific requirements, you could just use Math.max and Math.min. They accept a variable number of arguments, not just two, so Function::apply comes handy here: var min:Number = Math.min.apply(null,list); This will give you the min value of the list with just one line, no loops, etc. So, to wrap it up, you could write your function in just a few lines, like this: function normalizeNumbers(list:Array):Array { var min:Number = Math.min.apply(null,list); var max:Number = Math.max.apply(null,list); var len:int = list.length; var result:Array = []; for(var i:int = 0; i len; i++) { result[i] = rangedToNormal(list[i],min,max); } return result; } Cheers Juan Pablo Califano 2010/11/29 Karim Beyrouti ka...@kurst.co.uk Hello FlashCoder... maybe it's because it's late but it's getting a little confusing, and google is not being friendly right now. seems to works fine with positive numbers, however - i am trying to normalise a range of positive and negative numbers... ( code simplified not to find min and max values ). I am currently am coming up a little short... hope this code does not give anyone a headache; if you fancy a stab, or if you can point me in the right direction ... otherwise ... will post results when i get there... Code: public function test() { trace('') trace
[Flashcoders] Normalising Numbers
Hello FlashCoder... maybe it's because it's late but it's getting a little confusing, and google is not being friendly right now. seems to works fine with positive numbers, however - i am trying to normalise a range of positive and negative numbers... ( code simplified not to find min and max values ). I am currently am coming up a little short... hope this code does not give anyone a headache; if you fancy a stab, or if you can point me in the right direction ... otherwise ... will post results when i get there... Code: public function test() { trace('') trace( testNormalizeNumbers( [ 1 , 1.5 , 2 ] , 2 , 1 ).toString() ); trace('') trace( testNormalizeNumbers( [ 1 , 1.5 , 5 , 1 , 6.4 , 6, 3, -2.6, -1 , 3.5 ] , 6.4 , -2.6 ).toString() ); trace('') trace( testNormalizeNumbers( [ -1 , -1.5 , -5 , -1 , -6.4 , -6, -3, -2.6, -1 , -3.5 ] ,-1 , -6.4 ).toString() ); } public function testNormalizeNumbers( a : Array , max : Number , min : Number ) : Array { var result : Array = new Array(); var nMax: Number= ( min 0 ) ? max - min : max + Math.abs( min ); for ( var c : int = 0 ; c a.length ; c++ ){ var pRangedValue: Number = ( min 0 ) ? a[c] - min : a[c] + Math.abs( min ); var normalizedValue : Number = pRangedValue / nMax; result.push( normalizedValue ); } return result; } Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] ARgb to Rgb
Hello All, wondering if anyone has got the ARGB to RGB conversion conversion algorithm handy ? Thanks... - karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ARgb to Rgb
Thanks Karl, had seen that one, but it slightly confused me, i go this out of it which is kindof wrong: private function ARGBtoRGB( argb : uint ) : uint { var alpha:uint = (argb 24 0xFF ); return alpha % argb } Thanks again Karim On 23 Nov 2010, at 11:45, Karl DeSaulniers wrote: Hi Karim, http://www.autohotkey.com/forum/topic45543.html 3rd link on google searching for ARGB to RGB conversion conversion algorithm. :) HTH, Best, Karl On Nov 23, 2010, at 5:37 AM, Karim Beyrouti wrote: Hello All, wondering if anyone has got the ARGB to RGB conversion conversion algorithm handy ? Thanks... - karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.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] ARgb to Rgb
Having been playing with google...this one worked: public function ARGBtoRGB( value : uint ):uint { var a : uint= value 24 0xFF ; var r : uint= value 16 0xFF ; var g : uint = value 8 0xFF ; var b : uint = value0xFF ; return uint ( ( r 16 ) | ( g 8 ) | b ) } will also try henrik's one liner... sorry for hurting your brain with that odd code ... thanks again - karim On 23 Nov 2010, at 12:11, Karl DeSaulniers wrote: Google flash argb to rgb conversion class, or leave out class, I bet you'll find what your needing. Sry not much more help, I know about as much as you on the sub. Just google happy I guess.. Karl On Nov 23, 2010, at 6:02 AM, Karim Beyrouti wrote: Thanks Karl, had seen that one, but it slightly confused me, i go this out of it which is kindof wrong: private function ARGBtoRGB( argb : uint ) : uint { var alpha:uint = (argb 24 0xFF ); return alpha % argb } Thanks again Karim On 23 Nov 2010, at 11:45, Karl DeSaulniers wrote: Hi Karim, http://www.autohotkey.com/forum/topic45543.html 3rd link on google searching for ARGB to RGB conversion conversion algorithm. :) HTH, Best, Karl On Nov 23, 2010, at 5:37 AM, Karim Beyrouti wrote: Hello All, wondering if anyone has got the ARGB to RGB conversion conversion algorithm handy ? Thanks... - karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.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 Karl DeSaulniers Design Drumm http://designdrumm.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
[Flashcoders] getPixel32 - get alpha value
Hello All - anyone can point me in the right direction to get the alpha component of getPixel32 ? Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] getPixel32 - get alpha value
Thanks Sidney - can't believe I missed it in the docs. - k On 3 Nov 2010, at 14:22, Sidney de Koning - Funky Monkey Studios wrote: Hi Karim, Something along the lines of this: var bmd:BitmapData = new BitmapData(80, 40, true, 0xFF44AACC); var pixelValue:uint = bmd.getPixel32(0, 0); var alphaValue:uint = pixelValue 24 0xFF; var red:uint = pixelValue 16 0xFF; var green:uint = pixelValue 8 0xFF; var blue:uint = pixelValue 0xFF; trace(alphaValue.toString(16)); // ff trace(red.toString(16)); // 44 trace(green.toString(16)); // aa trace(blue.toString(16)); // cc Also check http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#getPixel32%28%29 Cheers, Sidney Hello All - anyone can point me in the right direction to get the alpha component of getPixel32 ? Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Sidney de Koning - If you're not prepared to be wrong, you'll never come up with something original Flash / AIR Developer @ www.funky-monkey.nl Actionscript 3 Teacher @ www.sae.nl Technical Writer @ www.insideria.com Blogger @ www.funky-monkey.nl/blog/ 3GB free storage you can sync with your mobile device or Mac or PC. Check out https://www.getdropbox.com/referrals/NTI1MjcxMzk ___ 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] Flash to Powerpoint
You might be better off looking for php/powerpoint libs - either that - or you might be able to write an exporter using bytearray in AS3. But just guessing on that one. Good luck. On 22 Oct 2010, at 17:00, Matt S. wrote: Honestly, I dont know if you're going to find an easy way to do that. Perhaps a PHP script, where you would export all the JPGs, pass them to the script, and then generate a PPS, but some cursory googling doesnt turn up anything to that effect. I suspect this is one of those things that sounds easy when you say it but will prove quite difficult to accomplish. .m On Fri, Oct 22, 2010 at 11:47 AM, Lehr, Theodore ted_l...@federal.dell.com wrote: I want to do it dynamically... the data in the movieclips will be changing From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [nat...@mynarcik.com] Sent: Friday, October 22, 2010 11:36 AM To: Flash Coders List Subject: Re: [Flashcoders] Flash to Powerpoint You could always go the oldschool route of taking screenshots and pasting on the slide(s). On Fri, Oct 22, 2010 at 10:40 AM, Lehr, Theodore ted_l...@federal.dell.comwrote: Anyone have a link to a tutorial or something that gives siome guidance on how to create a powerpoint presentation from Flash - like I want to click a button and then be given a prompt to open or save a pps - and the presentation would be made up of, say, an image (object) on each slide No - I have not googled yet but I will :-) ___ 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AIR 2 / 10.1 + Microphone
guess i should have mentioned that this project is all about music visualisation. On 2 Oct 2010, at 09:57, Henrik Andersson wrote: Trust me on this one, computeSpectrum is not useful for anything but music visualization. It provides no gurantees that it wont miss samples, in fact, it is highly likely that it will. That makes it unacceptable for any serious use. ___ 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] AIR 2 / 10.1 + Microphone
have been following your blog for a while - and forgot about the FFT / Audio analysis you did - it's very nice and useful thank you. - Karim On 2 Oct 2010, at 11:13, Gerry Beauregard wrote: You might want to check out my real-time spectrum analyzer here: http://gerrybeauregard.wordpress.com/2010/08/06/real-time-spectrum-analysis/ It uses the microphone input and an FFT that I wrote. All the code is freely available for download. -Gerry On 2010-10-02 , at 17:55 , Karim Beyrouti wrote: guess i should have mentioned that this project is all about music visualisation. On 2 Oct 2010, at 09:57, Henrik Andersson wrote: Trust me on this one, computeSpectrum is not useful for anything but music visualization. It provides no gurantees that it wont miss samples, in fact, it is highly likely that it will. That makes it unacceptable for any serious use. ___ 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] AIR 2 / 10.1 + Microphone
Wondering if the microphone - has a similar FFT output - like the one in 'computeSpectrum(ByteArray, FFTMode, stretchFactor )' . or would it just be best to wait for - SampleDataEvent - get the byteArray and read the values from there? Found this way of getting to the Mic sound data; http://pierrickpluchon.fr/blog/as3-how-to-plug-your-microphone-with-a-soundspectrum-in-flash-player-10-1/ There is little in the way of explanation of the code - so i could easily be wrong - he seems to be using the Mic.SAMPLE_DATA event to trigger a Sound and then get the computeSpectrum from that... this feels like a little of a roundabout way of getting at the FFT data - or is that the best way of going about it ? Thanks for any thoughts on this one... - karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] PureMVC or RoboLegs ?
Hi all, After having a few clients screaming for MVC capable developers - i am finally about to byte the bullet and learn an MVC framework. So, which framework is more popular - PureMVC, or RoboLegs? I guess that once you learn one, the other makes sense - if so - which would you recommend ? Thanks ! - Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] PureMVC or RobotLegs ?
Ah - yes, the cool icon must learn robotlegs... once you know an MVC framework - in theory i guess it more or less applies to another. Whatever the pros cons of using a framework for one man projects - there seems to be some demand for it out there; turned down a job today as i was not familiar with RobotLegs + short deadline. Another PureMVC one last week so, it's time to learn.. I can see that using a framework probably makes it easier to deal with someone else's code (and pass projects about) - but does it make the job easier on smaller jobs? ... anyway... I guess that's 1 vote for Robotlegs... PureMVC - anyone ?... - k On 13 Sep 2010, at 20:15, Merrill, Jason wrote: RobotLegs (not Robolegs) is the rage with all the kids these days. Plus, the icon for it is way cooler. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available to Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karim Beyrouti Sent: Monday, September 13, 2010 2:40 PM To: Flashcoders List Subject: [Flashcoders] PureMVC or RoboLegs ? Hi all, After having a few clients screaming for MVC capable developers - i am finally about to byte the bullet and learn an MVC framework. So, which framework is more popular - PureMVC, or RoboLegs? I guess that once you learn one, the other makes sense - if so - which would you recommend ? Thanks ! - Karim ___ 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
Re: [Flashcoders] PureMVC or RobotLegs ?
Thanks for the advise, guess that's a good reason to start with Pure MVC, then move onto RL. Do you use RL / MVC for all projects, or just in specific instances ? Cheers - karim On 13 Sep 2010, at 21:14, Matt Gitchell wrote: We're using RobotLegs a ton these days, it's fantastic. But I'd ultimately recommend learning MVC frameworks with PureMVC, as I think experience with it makes for stronger fundamentals. You end up wiring some stuff in with PureMVC manually that RobotLegs more or less automates. If the goal is to get the MVC patterns usage down correctly, that is. In practice I'm definitely finding RL faster to develop with (particularly with AS3 Signals), though with the caveat that handing off an RL project to a dev not familiar with it can spawn its own set of annoyances. --Matt On Mon, Sep 13, 2010 at 11:39 AM, Karim Beyrouti ka...@kurst.co.uk wrote: Hi all, After having a few clients screaming for MVC capable developers - i am finally about to byte the bullet and learn an MVC framework. So, which framework is more popular - PureMVC, or RoboLegs? I guess that once you learn one, the other makes sense - if so - which would you recommend ? Thanks ! - Karim ___ 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
Re: [Flashcoders] PureMVC or RobotLegs ?
Thanks ! - that helps make the decision. On 13 Sep 2010, at 21:24, Jesse Warden wrote: What Matt Gitchell said. On Mon, Sep 13, 2010 at 4:19 PM, Karim Beyrouti ka...@kurst.co.uk wrote: Ah - yes, the cool icon must learn robotlegs... once you know an MVC framework - in theory i guess it more or less applies to another. Whatever the pros cons of using a framework for one man projects - there seems to be some demand for it out there; turned down a job today as i was not familiar with RobotLegs + short deadline. Another PureMVC one last week so, it's time to learn.. I can see that using a framework probably makes it easier to deal with someone else's code (and pass projects about) - but does it make the job easier on smaller jobs? ... anyway... I guess that's 1 vote for Robotlegs... PureMVC - anyone ?... - k On 13 Sep 2010, at 20:15, Merrill, Jason wrote: RobotLegs (not Robolegs) is the rage with all the kids these days. Plus, the icon for it is way cooler. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available to Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karim Beyrouti Sent: Monday, September 13, 2010 2:40 PM To: Flashcoders List Subject: [Flashcoders] PureMVC or RoboLegs ? Hi all, After having a few clients screaming for MVC capable developers - i am finally about to byte the bullet and learn an MVC framework. So, which framework is more popular - PureMVC, or RoboLegs? I guess that once you learn one, the other makes sense - if so - which would you recommend ? Thanks ! - Karim ___ 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Best (fastest/memory efficient) way to animate bitmaps
found this method quite interesting: http://insideria.com/2010/08/advanced-blitting-bitmap-scrol.html not too sure it applies to mobile, but might help... On 12 Sep 2010, at 20:58, gamera wrote: make a benchmark and find out. On Sep 8, 2010, at 8:50 PM, Kevin Newman wrote: What is the fastest way to animate a series of bitmaps (say 20 frames). Here's a couple of ideas: A single big image behind a frame sized mask, move it one frame onEnterFrame. A series of memory cached Bitmap objs, swap them using addChild/removeChild (or set visible?) onEnterFrame. A series of memory cached BitmapData objs swap them by resetting bmp.bitmapData onEnterFrame. Anything faster is nice too - particularly on mobile. Thanks! Kevin N. ___ 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
Re: [Flashcoders] Link text indexes in a TextField
I have textfield link detection in this class - https://code.google.com/p/kurstcode/source/browse/trunk/libs/com/kurst/utils/TextFieldUtils.as using it for link roll-over / roll-out events. And I think it could be extended to get the link's start/end position. Have a look at the 'detectMouseOver' function - could be a good starting point... - karim On 30 Aug 2010, at 19:47, Andrew Murphy wrote: Hello. :) Thank you, but I think that will give me the link's text from within the htmlText property of the TextField. What I need are the beginning and ending indexes of the link within the text property of the TextField. That is, after the HTML has been rendered into the displayed text. I've thought of finding the index of the TextEvent's text property (ie: block1) within the htmlText property of the TextField and using that to determine the indexes, but those indexes would be relative to the TextField's htmlText property, rather than it's text property. -- Andrew Murphy Interactive Media Developer amur...@delvinia.com Delvinia 370 King Street West, 5th Floor, Box 4 Toronto Canada M5V 1J9 P (416) 364-1455 ext. 232 F (416) 364-9830 W www.delvinia.com -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik Sent: August 30, 2010 14:35 pm To: Flash Coders List Subject: Re: [Flashcoders] Link text indexes in a TextField You will have to cull out what you want: **Psuedo Code** var stuff:String = [a href=event:block1]dolor sit[/a]; stuff.substr(stuff.indexOf([a href=event:block1]), stuff.indexOf([/a])); Nathan Mynarcik nat...@mynarcik.com 254.749.2525 www.mynarcik.com On Mon, Aug 30, 2010 at 1:46 PM, Andrew Murphy amur...@delvinia.com wrote: Hi. :) Does anyone know of a way to get the beginning and ending index of a link within a TextField? I want the indexes of the beginning and ending of the text that makes up the link. For example if I pass the following HTML text into the TextField: [p]Lorem ipsum [a href=event:block1]dolor sit[/a] amet.[/p] What I want is the beginning and ending indexes of the dolor sit text when the user clicks on it. The TextEvent.LINK event passes out the value of the href within the link text (ie: block1), which isn't terribly useful in this case. ( ps: I used square brackets in the example HTML text rather than angle brackets to try avoiding issues with the list's mailer, which doesn't like HTML code in emails. ) -- Andrew Murphy Interactive Media Developer amur...@delvinia.com Delvinia 370 King Street West, 5th Floor, Box 4 Toronto Canada M5V 1J9 P (416) 364-1455 ext. 232 F (416) 364-9830 W www.delvinia.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 ___ 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] OT: FDT 4.0 M4
Hello list - Cannot sign up to bugs.powerflasher.com/jira - Captcha seems to be having problems. tried using Firefox / Chrome and Safary ( and on PC too ) - could not sign up to submit bug. Contacted the FDT team, but no reply yet... anyway thought i'd post it here - in case someone from powerflasher sees it: Bug: AIR not compiling when using file.extension - FDT 4.0 Pro Milestone 4 - ( 4.0.0.1140 ): ERROR /Users/karim/Documents/workspace/FileTest/src/FileTestMain.as[12:13]: Access of possibly undefined property extension through a reference with static type flash.filesystem:File. Code: code package { import flash.filesystem.File; import flash.display.Sprite; /** * @author karim */ public class FileTestMain extends Sprite { public function FileTestMain() { var f : File = new File( File.desktopDirectory.nativePath ); trace( f.extension ) } } } /code ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] A fast FFT in Flash?
Just a thought - try moving the variable declarations out of the loops: http://www.rozengain.com/blog/2007/05/01/some-actionscript-30-optimizations/ http://osflash.org/as3_speed_optimizations http://gamedevjuice.wordpress.com/2008/02/15/seven-tips-about-performance-optimization-in-actionscript-3/ Might help a little... do you have some test code lying about so we can compare / optimise? Best - karim On 3 Aug 2010, at 04:40, Gerry Beauregard wrote: On 2010-08-03 , at 06:07 , Patrick Matte wrote: Maybe check this http://blog.inspirit.ru/?p=405 Hey Patrick, thanks for the link (to Eugene Zatepyakin's Fast Fourier Transform for Flash). It looks like an interesting implementation, but it uses Alchemy. I've been reading up more on Alchemy, and according to Adobe it's pre-release, and they advise that it not be used to generate code for use in production. In any case, the Alchemy APIs make passing arbitrary data to/from the FFT a bit clunky, e.g. passing a Vector of Numbers requires conversion to a ByteArray first. For what it's worth, I've posted my pure-AS3 FFT implementation here: http://gerrybeauregard.wordpress.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
[Flashcoders] FaceBook / Flash
Hi All, I am trying to add a SWF to a Facebook group, and wondering if you know of any good an recent tutorial or can advise on best method to do so... Muchos thanks - karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OT: Adobe Air Marketplace
Thanks David, i moved this conversation to Air Tight list, and overall Marketplace feedback was quite positive ( well - there was not much feedback, but it was positive). I was just saying the same thing about a mobile 10.1 marketplace, which i think would be a good move forward. Also, my app got approved about 4 hours after my first email to the list: http://www.adobe.com/cfusion/marketplace/index.cfm?event=marketplace.offeringmarketplaceid=1offeringid=18609 thanks Karim On 19 Jul 2010, at 10:23, David Hunter wrote: I put an item on and didn't have any problems. Except when I tried to cash in my free developers certificate they were offering- they couldn't give it to me as my trading name is the same as my real name (self-employed in the UK). So they suggested I change my business name (!!!) and therefore all my business cards and websites etc just to satisfy their form for a free one year certificate! Oh well. For what its worth, Adobe should definitely be making more of that marketplace, especially considering the rise of Android. I'm sure they will, it could really take off with all the disaffected Flash people who got scuppered by Apple now having an outlet for their app ideas. Subject: Re: [Flashcoders] OT: Adobe Air Marketplace From: ka...@kurst.co.uk Date: Thu, 15 Jul 2010 17:49:56 +0100 To: flashcoders@chattyfig.figleaf.com Will do - Thank you ... On 15 Jul 2010, at 17:11, Dave Watts wrote: Sorry for the OT post - however i was just wondering what your experiences with the Adobe Air marketplace have been like? If you don't get a good answer here, you might want to post on the AIR-Tight list - lots of Adobe folks on it: http://groups.google.com/group/air-tight?hl=en Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ___ 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 _ http://clk.atdmt.com/UKM/go/195013117/direct/01/ ___ 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] OT: Adobe Air Marketplace
Sorry for the OT post - however i was just wondering what your experiences with the Adobe Air marketplace have been like? I have added an item on there about two weeks ago, and it's still not approved. The Adobe site says it takes about 2-3 working days to approve apps - but have read reports of apps taking about 2 months to get approved. Anyone know what's the deal with the approval process ? Cheers Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OT: Adobe Air Marketplace
Will do - Thank you ... On 15 Jul 2010, at 17:11, Dave Watts wrote: Sorry for the OT post - however i was just wondering what your experiences with the Adobe Air marketplace have been like? If you don't get a good answer here, you might want to post on the AIR-Tight list - lots of Adobe folks on it: http://groups.google.com/group/air-tight?hl=en Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ___ 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] FullScreen - not working
Kinda feel silly with this question, I can't get fullscreen mode to work: URL: http://clients.kurst.co.uk/ycommaz/12 HTML contains - allowFullScreen:'true' - and the fullscreen code is: private function ToggleFullScreen(event : MenuEvent) : void { stage.fullScreenSourceRect = new Rectangle( 0 ,0 , Capabilities.screenResolutionX , Capabilities.screenResolutionY); if (stage.displayState == StageDisplayState.NORMAL) { stage.displayState=StageDisplayState.FULL_SCREEN; } else { stage.displayState=StageDisplayState.NORMAL; } } Also using the latest version of swfobject... have been googling, and spending a fair bit of time for this one, but it's just not working for me. I get the following error: 'SecurityError: Error #2152: Full screen mode is not allowed. at flash.display::Stage/set_displayState() at flash.display::Stage/set displayState() at com.YcommaZ.navigation.main::Menu/ClickFullScreenButton()[/Users/karim/Documents/Work/Clients/YcommaZ/Site/src/com/YcommaZ/navigation/main/Menu.as:669] anyone has ideas for this one? Best Karim Beyrouti___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FullScreen - not working
Thanks for reply - already did this one fullscreen function was moved to a MouseEvent - Click handler: private function ClickFullScreenButton(event : MouseEvent) : void { //dispatchEvent( new MenuEvent( MenuEvent.FULL_SCREEN , false ) ) stage.fullScreenSourceRect = new Rectangle( 0 ,0 , Capabilities.screenResolutionX , Capabilities.screenResolutionY); if (stage.displayState == StageDisplayState.NORMAL) { stage.displayState=StageDisplayState.FULL_SCREEN; } else { stage.displayState=StageDisplayState.NORMAL; } } Pasted the wrong function before ( had just moved it )... still scratching my head on this one... also ( another oddity ) - Chrome for OsX does not seem to change the mouse when hovering over a button - but well - i can live with that - if i get Fullscreen working... Thanks again... On 23 Jun 2010, at 15:27, Merrill, Jason wrote: Launching full-screen has to be user-initiated - meaning a user event like a MouseEvent.CLICK on a button has to initiate the full-screen launch. Are you doing this? Not sure if that is the issue here, but worth looking into. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karim Beyrouti Sent: Wednesday, June 23, 2010 10:22 AM To: Flashcoders List Subject: [Flashcoders] FullScreen - not working Kinda feel silly with this question, I can't get fullscreen mode to work: URL: http://clients.kurst.co.uk/ycommaz/12 HTML contains - allowFullScreen:'true' - and the fullscreen code is: private function ToggleFullScreen(event : MenuEvent) : void { stage.fullScreenSourceRect = new Rectangle( 0 ,0 , Capabilities.screenResolutionX , Capabilities.screenResolutionY); if (stage.displayState == StageDisplayState.NORMAL) { stage.displayState=StageDisplayState.FULL_SCREEN; } else { stage.displayState=StageDisplayState.NORMAL; } } Also using the latest version of swfobject... have been googling, and spending a fair bit of time for this one, but it's just not working for me. I get the following error: 'SecurityError: Error #2152: Full screen mode is not allowed. at flash.display::Stage/set_displayState() at flash.display::Stage/set displayState() at com.YcommaZ.navigation.main::Menu/ClickFullScreenButton()[/Users/karim/D ocuments/Work/Clients/YcommaZ/Site/src/com/YcommaZ/navigation/main/Menu. as:669] anyone has ideas for this one? Best Karim Beyrouti___ 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
Re: [Flashcoders] FullScreen - not working
Cheers - however- it does not work Example with Boolean instead of string in param: http://clients.kurst.co.uk/ycommaz/13 - karim On 23 Jun 2010, at 15:32, Ángel Ambrosio Pazo wrote: Set the fullScreen param in boolean not in string. From your HTML code: var params = {}; params.wmode= opaque, params.menu = false; params.allowScriptAccess = 'always'; params.allowFullScreen = true; params.bgcolor = '#ff'; Ángel Ambrosio Interactive Developer angelambro...@gmail.com 2010/6/23 Karim Beyrouti ka...@kurst.co.uk Kinda feel silly with this question, I can't get fullscreen mode to work: URL: http://clients.kurst.co.uk/ycommaz/12 HTML contains - allowFullScreen:'true' - and the fullscreen code is: private function ToggleFullScreen(event : MenuEvent) : void { stage.fullScreenSourceRect = new Rectangle( 0 ,0 , Capabilities.screenResolutionX , Capabilities.screenResolutionY); if (stage.displayState == StageDisplayState.NORMAL) { stage.displayState=StageDisplayState.FULL_SCREEN; } else { stage.displayState=StageDisplayState.NORMAL; } } Also using the latest version of swfobject... have been googling, and spending a fair bit of time for this one, but it's just not working for me. I get the following error: 'SecurityError: Error #2152: Full screen mode is not allowed. at flash.display::Stage/set_displayState() at flash.display::Stage/set displayState() at com.YcommaZ.navigation.main::Menu/ClickFullScreenButton()[/Users/karim/Documents/Work/Clients/YcommaZ/Site/src/com/YcommaZ/navigation/main/Menu.as:669] anyone has ideas for this one? Best Karim Beyrouti___ 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
Re: [Flashcoders] FullScreen - not working
also - just for a note - it works in the standalone player, not the browser... - k On 23 Jun 2010, at 16:18, Ángel Ambrosio Pazo wrote: Your MenuEvent class extends from Event or from MouseEvent? Mix the two solutions: swfobject param in boolean type and your MenuEvent class extending from MouseEvent. Ángel Ambrosio Interactive Developer angelambro...@gmail.com 2010/6/23 Karim Beyrouti ka...@kurst.co.uk Cheers - however- it does not work Example with Boolean instead of string in param: http://clients.kurst.co.uk/ycommaz/13 - karim On 23 Jun 2010, at 15:32, Ángel Ambrosio Pazo wrote: Set the fullScreen param in boolean not in string. From your HTML code: var params = {}; params.wmode= opaque, params.menu = false; params.allowScriptAccess = 'always'; params.allowFullScreen = true; params.bgcolor = '#ff'; Ángel Ambrosio Interactive Developer angelambro...@gmail.com 2010/6/23 Karim Beyrouti ka...@kurst.co.uk Kinda feel silly with this question, I can't get fullscreen mode to work: URL: http://clients.kurst.co.uk/ycommaz/12 HTML contains - allowFullScreen:'true' - and the fullscreen code is: private function ToggleFullScreen(event : MenuEvent) : void { stage.fullScreenSourceRect = new Rectangle( 0 ,0 , Capabilities.screenResolutionX , Capabilities.screenResolutionY); if (stage.displayState == StageDisplayState.NORMAL) { stage.displayState=StageDisplayState.FULL_SCREEN; } else { stage.displayState=StageDisplayState.NORMAL; } } Also using the latest version of swfobject... have been googling, and spending a fair bit of time for this one, but it's just not working for me. I get the following error: 'SecurityError: Error #2152: Full screen mode is not allowed. at flash.display::Stage/set_displayState() at flash.display::Stage/set displayState() at com.YcommaZ.navigation.main::Menu/ClickFullScreenButton()[/Users/karim/Documents/Work/Clients/YcommaZ/Site/src/com/YcommaZ/navigation/main/Menu.as:669] anyone has ideas for this one? Best Karim Beyrouti___ 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FullScreen - not working
Done - but still no joy... starting to feel like ..errr... like chucking my laptop out of the window private function ClickFullScreenButton(event : MouseEvent) : void { if (stage.displayState == StageDisplayState.NORMAL) { stage.displayState=StageDisplayState.FULL_SCREEN; } else { stage.displayState=StageDisplayState.NORMAL; } } On 23 Jun 2010, at 16:18, Ángel Ambrosio Pazo wrote: Your MenuEvent class extends from Event or from MouseEvent? Mix the two solutions: swfobject param in boolean type and your MenuEvent class extending from MouseEvent. Ángel Ambrosio Interactive Developer angelambro...@gmail.com 2010/6/23 Karim Beyrouti ka...@kurst.co.uk Cheers - however- it does not work Example with Boolean instead of string in param: http://clients.kurst.co.uk/ycommaz/13 - karim On 23 Jun 2010, at 15:32, Ángel Ambrosio Pazo wrote: Set the fullScreen param in boolean not in string. From your HTML code: var params = {}; params.wmode= opaque, params.menu = false; params.allowScriptAccess = 'always'; params.allowFullScreen = true; params.bgcolor = '#ff'; Ángel Ambrosio Interactive Developer angelambro...@gmail.com 2010/6/23 Karim Beyrouti ka...@kurst.co.uk Kinda feel silly with this question, I can't get fullscreen mode to work: URL: http://clients.kurst.co.uk/ycommaz/12 HTML contains - allowFullScreen:'true' - and the fullscreen code is: private function ToggleFullScreen(event : MenuEvent) : void { stage.fullScreenSourceRect = new Rectangle( 0 ,0 , Capabilities.screenResolutionX , Capabilities.screenResolutionY); if (stage.displayState == StageDisplayState.NORMAL) { stage.displayState=StageDisplayState.FULL_SCREEN; } else { stage.displayState=StageDisplayState.NORMAL; } } Also using the latest version of swfobject... have been googling, and spending a fair bit of time for this one, but it's just not working for me. I get the following error: 'SecurityError: Error #2152: Full screen mode is not allowed. at flash.display::Stage/set_displayState() at flash.display::Stage/set displayState() at com.YcommaZ.navigation.main::Menu/ClickFullScreenButton()[/Users/karim/Documents/Work/Clients/YcommaZ/Site/src/com/YcommaZ/navigation/main/Menu.as:669] anyone has ideas for this one? Best Karim Beyrouti___ 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FullScreen - not working
Fixed - forgot the a param in the SWFObject code: swfobject.embedSWF(YZLoader.swf, flashcontent, 100%, 100%, 10.0.0 , false, flashvars, params ); Again - Thanks for taking the time to reply ... Regards Karim Beyrouti On 23 Jun 2010, at 16:30, Karim Beyrouti wrote: also - just for a note - it works in the standalone player, not the browser... - k On 23 Jun 2010, at 16:18, Ángel Ambrosio Pazo wrote: Your MenuEvent class extends from Event or from MouseEvent? Mix the two solutions: swfobject param in boolean type and your MenuEvent class extending from MouseEvent. Ángel Ambrosio Interactive Developer angelambro...@gmail.com 2010/6/23 Karim Beyrouti ka...@kurst.co.uk Cheers - however- it does not work Example with Boolean instead of string in param: http://clients.kurst.co.uk/ycommaz/13 - karim On 23 Jun 2010, at 15:32, Ángel Ambrosio Pazo wrote: Set the fullScreen param in boolean not in string. From your HTML code: var params = {}; params.wmode= opaque, params.menu = false; params.allowScriptAccess = 'always'; params.allowFullScreen = true; params.bgcolor = '#ff'; Ángel Ambrosio Interactive Developer angelambro...@gmail.com 2010/6/23 Karim Beyrouti ka...@kurst.co.uk Kinda feel silly with this question, I can't get fullscreen mode to work: URL: http://clients.kurst.co.uk/ycommaz/12 HTML contains - allowFullScreen:'true' - and the fullscreen code is: private function ToggleFullScreen(event : MenuEvent) : void { stage.fullScreenSourceRect = new Rectangle( 0 ,0 , Capabilities.screenResolutionX , Capabilities.screenResolutionY); if (stage.displayState == StageDisplayState.NORMAL) { stage.displayState=StageDisplayState.FULL_SCREEN; } else { stage.displayState=StageDisplayState.NORMAL; } } Also using the latest version of swfobject... have been googling, and spending a fair bit of time for this one, but it's just not working for me. I get the following error: 'SecurityError: Error #2152: Full screen mode is not allowed. at flash.display::Stage/set_displayState() at flash.display::Stage/set displayState() at com.YcommaZ.navigation.main::Menu/ClickFullScreenButton()[/Users/karim/Documents/Work/Clients/YcommaZ/Site/src/com/YcommaZ/navigation/main/Menu.as:669] anyone has ideas for this one? Best Karim Beyrouti___ 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 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] HTML TextFields - 'A HREF' RollOvers..
Hi All - Wondering if there are any hacks to trigger a 'RollOver' script when hovering over a 'a href' link in an html textfield. Currently using TextEvent.LINK,to trigger links - but would like to show a tooltip on rollover (of that part of text). So far the only solution i can think of is using : TextField.getCharIndexAtPoint(x:Number, y:Number) create this - but it seems like this could be quite long winded solution. Any other ways of achieving this? Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..
The HREF link is only part the the textfields content, and each textfield can have more than one link amongst other copy and need to show relevant tooltip only when user is hovering over the 'a HREF' parts of the html textfield. On 15 Jun 2010, at 13:49, Glen Pike wrote: Why not use the mouse coordinates? On 15/06/2010 13:24, Karim Beyrouti wrote: Hi All - Wondering if there are any hacks to trigger a 'RollOver' script when hovering over a 'a href' link in an html textfield. Currently using TextEvent.LINK,to trigger links - but would like to show a tooltip on rollover (of that part of text). So far the only solution i can think of is using : TextField.getCharIndexAtPoint(x:Number, y:Number) create this - but it seems like this could be quite long winded solution. Any other ways of achieving this? Thanks Karim ___ 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
Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..
Got it - that's the one - thanks for the great solution - karim On 15 Jun 2010, at 14:07, Ktu wrote: sorry, I tacked on that last if statement. It should probably read if (url.length 0) { // begin tooltip code } maybe you want to check if its an appropriate web url with a regExp first, but I think you get the idea. Ktu On Tue, Jun 15, 2010 at 9:05 AM, Ktu ktu_fl...@cataclysmicrewind.comwrote: This in a mouseMove or enterFrame event is what I've always used. var index = txt.getCharIndexAtPoint (txt.mouseX, txt.mouseY); var url = ; if (index = 0) { var fmt:TextFormat = txt.getTextFormat (index, index + 1); if (fmt.url) url = fmt.url; } if (url) { // begin tooltip code } ktu On Tue, Jun 15, 2010 at 8:49 AM, Glen Pike g...@engineeredarts.co.ukwrote: Why not use the mouse coordinates? On 15/06/2010 13:24, Karim Beyrouti wrote: Hi All - Wondering if there are any hacks to trigger a 'RollOver' script when hovering over a 'a href' link in an html textfield. Currently using TextEvent.LINK,to trigger links - but would like to show a tooltip on rollover (of that part of text). So far the only solution i can think of is using : TextField.getCharIndexAtPoint(x:Number, y:Number) create this - but it seems like this could be quite long winded solution. Any other ways of achieving this? Thanks Karim ___ 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
Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..
I've added a boolean - to save a few function calls - and also using a Timer ( instead of an enterframe) on a slowish delay - to save a few processor cycles. private var tooltipFlag : Boolean = false; /** * @method * @tooltip * @param * @return */ private function detectMouseOverLink( e : TimerEvent = null ) : void { var index : Number = label.getCharIndexAtPoint (label.mouseX, label.mouseY); var url : String = ; if (index 0) { var fmt:TextFormat = label.getTextFormat (index, index + 1); if (fmt.url) url = fmt.url; } if ( ( url.length 0 ) ( ! tooltipFlag ) ) { tooltipFlag = true; trace('show - url: ' + url + ' tooltipFlag: ' + tooltipFlag ); } else if ( url.length == 0 tooltipFlag ) { tooltipFlag = false; trace('hide - url: ' + url + ' tooltipFlag: ' + tooltipFlag ); } } If i get time - i might turn this into a utility class - so you can do something like: txtRollOverManger.addRollOverListener( txt , callback ) - or txtRollOverManger.removeRollOverListener( txt , callback ) i have a few textfields - quite a few timers might affect performance... thanks... - karim On 15 Jun 2010, at 14:33, Ktu wrote: Regardless of whether you are using multiple TextFormat objects or htmlText, using getTextFormat(begin, end), the textFormat will have the appropriate url. This is a quick dirty test. Glad I could help out. I'm posting the code for my test in case anyone else finds it useful. One thing to note! If text in a textfield does not fill the text field, a error can appear. In my code below you can see that error. A link on the bottom line will register when the cursor is in empty space below the link, but not directly over it. The x property of the mouse is triggering the rollover. Maybe someone else can explain this issue better. AS3 - Timeline code var txt:TextField = new TextField (); txt.width = txt.height = 150; txt.multiline = true; txt.wordWrap = true; txt.htmlText = when registered, all a href=\www.google.com\links/a in text fields will update a href=\www.theflashblog.com\the status bar./a hahahahah txt.border = true; txt.x = txt.y = 100; addChild(txt); addEventListener (Event.ENTER_FRAME, captureEnterFrame) function captureEnterFrame (e:Event):void { var index = txt.getCharIndexAtPoint (txt.mouseX, txt.mouseY); var url = ; if (index = 0) { var fmt:TextFormat = txt.getTextFormat (index, index + 1); if (fmt.url) url = fmt.url; } if (url) { displayTooltip(url, new Point (mouseX, mouseY)); } else { removeTooltip(); } } function displayTooltip(url:String, pos:Point):void { if (getChildByName(ToolTip)) return; var tf:TextField = new TextField (); tf.name = ToolTip; tf.autoSize = left; tf.text = url; tf.background = true; tf.border = true; tf.backgroundColor = 0x00FF; tf.x = pos.x + 5; tf.y = pos.y + 15; addChild(tf); } function removeTooltip ():void { var t:TextField = getChildByName(ToolTip) as TextField; if (t) removeChild(t); } On Tue, Jun 15, 2010 at 9:06 AM, Karim Beyrouti ka...@kurst.co.uk wrote: The HREF link is only part the the textfields content, and each textfield can have more than one link amongst other copy and need to show relevant tooltip only when user is hovering over the 'a HREF' parts of the html textfield. On 15 Jun 2010, at 13:49, Glen Pike wrote: Why not use the mouse coordinates? On 15/06/2010 13:24, Karim Beyrouti wrote: Hi All - Wondering if there are any hacks to trigger a 'RollOver' script when hovering over a 'a href' link in an html textfield. Currently using TextEvent.LINK,to trigger links - but would like to show a tooltip on rollover (of that part of text). So far the only solution i can think of is using : TextField.getCharIndexAtPoint(x:Number, y:Number) create this - but it seems like this could be quite long winded solution. Any other ways of achieving this? Thanks Karim ___ 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman
Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..
Yep... However I was trying to get roll overs to trigger a function. Am going to build a textfield roll over utility class... Will post the results here when it's done... Thanks... Karim On 15 Jun 2010, at 16:08, Kevin Newman capta...@unfocus.com wrote: a:hover works in a css style sheet: var ss:StyleSheet = new StyleSheet(); ss.parseCSS(a:link{color: #FF;}a:hover{text-decoration: underline;color: #FF;}); var tf:TextField = new TextField(); tf.autoSize = TextFieldAutoSize.LEFT; tf.styleSheet = ss; tf.htmlText = 'pA link: a href=http://www.unfocus.com;unFocus Projects/a/p'; addChild(tf); Kevin N. On 6/15/10 8:24 AM, Karim Beyrouti wrote: Hi All - Wondering if there are any hacks to trigger a 'RollOver' script when hovering over a 'a href' link in an html textfield. Currently using TextEvent.LINK,to trigger links - but would like to show a tooltip on rollover (of that part of text). So far the only solution i can think of is using : TextField.getCharIndexAtPoint(x:Number, y:Number) create this - but it seems like this could be quite long winded solution. Any other ways of achieving this? Thanks Karim ___ 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
Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..
TextEvents were a big improvement over asfunction (AS2 hack) - still - it would be nice if TextEvent had listeners for link rollovers / rollouts. I like the fact you can still get to the url through using textformat/getCharAtPoint. Tooltip data is stored in the link: a href=event:http://www.url.com/#this is a tooltip/a So it's easily updatable. thanks again very useful bit of code. @ Henrik - Not used the TextLineMirrorRegion or the flash.text.engine - but will look into it when i get some time - looks like that could provide the functionality for rollover / rollouts. http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/engine/TextLineMirrorRegion.html Cheers - karim On 15 Jun 2010, at 17:24, Ktu wrote: Did you know that for htmlText using a you can specify the href=event:myText Then register a TextEvent. This is how links inside of text fields can trigger functions http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/TextField.html#htmlText Ktu On Tue, Jun 15, 2010 at 12:14 PM, Karim Beyrouti ka...@kurst.co.uk wrote: Yep... However I was trying to get roll overs to trigger a function. Am going to build a textfield roll over utility class... Will post the results here when it's done... Thanks... Karim On 15 Jun 2010, at 16:08, Kevin Newman capta...@unfocus.com wrote: a:hover works in a css style sheet: var ss:StyleSheet = new StyleSheet(); ss.parseCSS(a:link{color: #FF;}a:hover{text-decoration: underline;color: #FF;}); var tf:TextField = new TextField(); tf.autoSize = TextFieldAutoSize.LEFT; tf.styleSheet = ss; tf.htmlText = 'pA link: a href=http://www.unfocus.com;unFocus Projects/a/p'; addChild(tf); Kevin N. On 6/15/10 8:24 AM, Karim Beyrouti wrote: Hi All - Wondering if there are any hacks to trigger a 'RollOver' script when hovering over a 'a href' link in an html textfield. Currently using TextEvent.LINK,to trigger links - but would like to show a tooltip on rollover (of that part of text). So far the only solution i can think of is using : TextField.getCharIndexAtPoint(x:Number, y:Number) create this - but it seems like this could be quite long winded solution. Any other ways of achieving this? Thanks Karim ___ 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] html in textfield
try trashing returns before setting the htmltext in your field: function trashReturns ( val:String , charToReplace:String = ) :String { return replaceChar( val, \r, charToReplace ) ; } function replaceChar( str : String, charToRemove : String , charToReplace : String) : String { var temparray:Array = str.split(charToRemove); return temparray.join(charToReplace); } On 15 Jun 2010, at 18:23, Lehr, Theodore wrote: I have bold tags causing line returns - the text is coming from xml any idea why that would be? ___ 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] HTML TextFields - 'A HREF' RollOvers..
Created a utility class for a href rollovers in html textfields - https://code.google.com/p/kurstcode/source/browse/trunk/libs/com/kurst/utils/TextFieldUtils.as Might be a little buggy - needs some testing, seems ok so far... usage: import com.kurst.utils.TextFieldUtils TextFieldUtils.addHTMLRollOver( label, htmlHrefEvent , this ); function htmlHrefEvent( dataItem : TextFieldDataItem ) : void { trace('MouseOverStatus: ' + dataItem.overFlag + ' htmlHrefEvent: ' + dataItem.href ) } Hope this helps someone... - karim On 15 Jun 2010, at 18:47, Karim Beyrouti wrote: TextEvents were a big improvement over asfunction (AS2 hack) - still - it would be nice if TextEvent had listeners for link rollovers / rollouts. I like the fact you can still get to the url through using textformat/getCharAtPoint. Tooltip data is stored in the link: a href=event:http://www.url.com/#this is a tooltip/a So it's easily updatable. thanks again very useful bit of code. @ Henrik - Not used the TextLineMirrorRegion or the flash.text.engine - but will look into it when i get some time - looks like that could provide the functionality for rollover / rollouts. http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/engine/TextLineMirrorRegion.html Cheers - karim On 15 Jun 2010, at 17:24, Ktu wrote: Did you know that for htmlText using a you can specify the href=event:myText Then register a TextEvent. This is how links inside of text fields can trigger functions http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/TextField.html#htmlText Ktu On Tue, Jun 15, 2010 at 12:14 PM, Karim Beyrouti ka...@kurst.co.uk wrote: Yep... However I was trying to get roll overs to trigger a function. Am going to build a textfield roll over utility class... Will post the results here when it's done... Thanks... Karim On 15 Jun 2010, at 16:08, Kevin Newman capta...@unfocus.com wrote: a:hover works in a css style sheet: var ss:StyleSheet = new StyleSheet(); ss.parseCSS(a:link{color: #FF;}a:hover{text-decoration: underline;color: #FF;}); var tf:TextField = new TextField(); tf.autoSize = TextFieldAutoSize.LEFT; tf.styleSheet = ss; tf.htmlText = 'pA link: a href=http://www.unfocus.com;unFocus Projects/a/p'; addChild(tf); Kevin N. On 6/15/10 8:24 AM, Karim Beyrouti wrote: Hi All - Wondering if there are any hacks to trigger a 'RollOver' script when hovering over a 'a href' link in an html textfield. Currently using TextEvent.LINK,to trigger links - but would like to show a tooltip on rollover (of that part of text). So far the only solution i can think of is using : TextField.getCharIndexAtPoint(x:Number, y:Number) create this - but it seems like this could be quite long winded solution. Any other ways of achieving this? Thanks Karim ___ 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 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] JPG Encoder - Issue: file may be truncated or incomplete
Hi All, I have a little bug with JPGs encoded through flash ( AIR app ). The application exports resized JPG's, which seem fine and display correctly in the browser - also all good when loaded back into flash. However when opening them with photoshop i get the following error : This document may be damaged ( the file may be truncated or incomplete ). Continue? The JPG opens (in photoshop) with a missing strip at the end of the image. Sample encoded Image: http://gedit.kurst.co.uk/images/test/3.jpg I am using the Asynchronous - ru.inspirit.utils.JPGEncoder . Anyone come across this bug with JPG's encoded in flash? Project: https://code.google.com/p/kurstcode/source/checkout Code: https://code.google.com/p/kurstcode/source/browse/trunk/libs/com/kurst/air/ImageImporter.as Currently going to try using the AS3 Core lib encoder to see if the inspirit encoder is the issue (or if it's me). Many thanks Karim___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AIR - ByteArray to BitmapData
Thanks for your help - uploaded the finished code to the google SVN - so it's free for all... https://code.google.com/p/kurstcode/source/browse/trunk/libs/com/kurst/air/utils/ImageUtils.as Regards Karim On 24 May 2010, at 20:44, Karim Beyrouti wrote: Perfect - thank you for the extended and most useful the answer - had started thinking along these lines but it's good to know there was no other way ( apart for the loader ) - as i just need width and height - think i am going to extract that from the ByteArray... thanks again... - k On 24 May 2010, at 20:09, Juan Pablo Califano wrote: If you want to convert it back to pixels, I'd say go with the Loader approach. Other than that, you'd have to write a JPEG decoder (seems like a waste of time, considering you can already use a Loader, which would also be faster, probably). Now, if you are only interested in getting the width and height, that data is in the SOFO block (SOFO stands for start of frame 0). SOFO is marked by this sequence of bytes: 0xFF 0xC0 So, basically, you can loop through your bytearray until you find this sequence. Then offset your current position as necessary and read the height and width. If you take a look at the JPEG encoder from as3CoreLib, you can see you have to skip 5 bytes from the beggining of the SOFO marker to get the height (2 bytes) and the width (2 bytes). http://code.google.com/p/as3corelib/source/browse/trunk/src/com/adobe/images/JPGEncoder.as Now, I haven't read the JPEG spec, so I'm not sure if this is a fixed offset. I'm assuming it is, but you'd better check it if you want to use this code. I've tried it with a couple of JPEG's and it worked fine, though. Also, you might want to validate if what you've got is a JPEG (check the first 2 bytes for 0xff, 0xd8); you might also want to check that you're not reading out of the buffer bounds. function readJPEGSize(data:ByteArray):void { var len:int = 0; var i:int = 0; var offset:int = 0; while(data.bytesAvailable 1) { // look for 0xffc0 if(data[i] == 0xFF data[i + 1] == 0xC0) { offset = i; break; } i++; } /* writeSOF0(image.width,image.height); writeWord(0xFFC0); // marker writeWord(17); // length, truecolor YUV JPG writeByte(8);// precision writeWord(height); writeWord(width); Skip 5 bytes: 2 SOFO marker 2 length 1 precision */ var h:int = 0; var w:int = 0; if(offset 0) { offset += 5; data.position = offset; h = data.readUnsignedShort(); w = data.readUnsignedShort(); trace(w,h); } } Cheers Juan Pablo Califano 2010/5/24 Karim Beyrouti ka...@kurst.co.uk Hi All do any of you how to convert a ByteArray (of a JPG) back into a BitmapData object? Actually - i just need to get the dimensions of the bitmap before trashing it. I know you can do 'myloader.loadBytes( byteArray )' - but i am avoiding that for now - as i just need to get the size of the image. Any pointers? mucho thanks - karim ___ 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
Re: [Flashcoders] AIR - ByteArray to BitmapData
it's a pleasure - missed a file in my upload to svn - now corrected and updated. I have also included a sample/test Flash Builder / Air 1.5 application that resizes Jpegs above a certain size - and copies the result to a 'temp' folder in the application directory. work in progress, but functional. I will be using that as an image importer in for an application i am working on... Spent quite a while making sure memory is cleared after each image resize/copy batch operation ( i do wish Flash Player had better memory management / Control over the GC). Also tried the Alchemy complied JPG encoders out there, which were much faster, but I think they created a memory leak - although that's probably me not finding the clean-up functions.Ended up using the 'inspirit' async Jpg encoder here (thanks - http://blog.inspirit.ru/ - love his work ). hmm... that's quite a rant for me... enjoy... - karim On 10 Jun 2010, at 23:01, Juan Pablo Califano wrote: No worries! And thanks for sharing. Cheers Juan Pablo Califano 2010/6/10 Karim Beyrouti ka...@kurst.co.uk Thanks for your help - uploaded the finished code to the google SVN - so it's free for all... https://code.google.com/p/kurstcode/source/browse/trunk/libs/com/kurst/air/utils/ImageUtils.as Regards Karim On 24 May 2010, at 20:44, Karim Beyrouti wrote: Perfect - thank you for the extended and most useful the answer - had started thinking along these lines but it's good to know there was no other way ( apart for the loader ) - as i just need width and height - think i am going to extract that from the ByteArray... thanks again... - k On 24 May 2010, at 20:09, Juan Pablo Califano wrote: If you want to convert it back to pixels, I'd say go with the Loader approach. Other than that, you'd have to write a JPEG decoder (seems like a waste of time, considering you can already use a Loader, which would also be faster, probably). Now, if you are only interested in getting the width and height, that data is in the SOFO block (SOFO stands for start of frame 0). SOFO is marked by this sequence of bytes: 0xFF 0xC0 So, basically, you can loop through your bytearray until you find this sequence. Then offset your current position as necessary and read the height and width. If you take a look at the JPEG encoder from as3CoreLib, you can see you have to skip 5 bytes from the beggining of the SOFO marker to get the height (2 bytes) and the width (2 bytes). http://code.google.com/p/as3corelib/source/browse/trunk/src/com/adobe/images/JPGEncoder.as Now, I haven't read the JPEG spec, so I'm not sure if this is a fixed offset. I'm assuming it is, but you'd better check it if you want to use this code. I've tried it with a couple of JPEG's and it worked fine, though. Also, you might want to validate if what you've got is a JPEG (check the first 2 bytes for 0xff, 0xd8); you might also want to check that you're not reading out of the buffer bounds. function readJPEGSize(data:ByteArray):void { var len:int = 0; var i:int = 0; var offset:int = 0; while(data.bytesAvailable 1) { // look for 0xffc0 if(data[i] == 0xFF data[i + 1] == 0xC0) { offset = i; break; } i++; } /* writeSOF0(image.width,image.height); writeWord(0xFFC0); // marker writeWord(17); // length, truecolor YUV JPG writeByte(8);// precision writeWord(height); writeWord(width); Skip 5 bytes: 2 SOFO marker 2 length 1 precision */ var h:int = 0; var w:int = 0; if(offset 0) { offset += 5; data.position = offset; h = data.readUnsignedShort(); w = data.readUnsignedShort(); trace(w,h); } } Cheers Juan Pablo Califano 2010/5/24 Karim Beyrouti ka...@kurst.co.uk Hi All do any of you how to convert a ByteArray (of a JPG) back into a BitmapData object? Actually - i just need to get the dimensions of the bitmap before trashing it. I know you can do 'myloader.loadBytes( byteArray )' - but i am avoiding that for now - as i just need to get the size of the image. Any pointers? mucho thanks - karim ___ 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
Re: [Flashcoders] Question about approximate vowel detection in AS3
Yeh - not sure this will help however - a (very talented) colleague of mine worked on a simple speech recognition software for mobile - it was built to recognise about 20 commands with 90% success rate. His approach (in my simplistic terms) was: 1) get recordings / audio samples of the commands (in your case vowels - it should be easier as it's generated so you wont have to compare against too many/different intonations ) - 2) create / store a graph of the audio commands ( this used FFT (s) - to abstract and simplify, the pattern of the commands - the result was a square voice print graph ) 3) The stored patterns/voiceprints were then compared against the users voice recording. The trickiest part of this whole business were the Fast Fourier Transforms - these things get very complicated, and confuse the life out of me. Anyway, hopefully this will help you - seems like it might be the best approach. if you do crack it - you will end up with a simple voice recognition system. Which would be a brilliant and useful thing bit of code to have... hope this was of any use.. - karim On 4 Jun 2010, at 01:23, Karl DeSaulniers wrote: I would try using that to figure out a way of maping the sounds and then translate that to your project. You are able to see the wave forms in soundbooth? Haven't used it. If so, can you run your cursor over it at any point to get the readings? Might be a little trivial, but may yeild a pattern that you can utilize. JAT Karl Sent from losPhone On Jun 3, 2010, at 6:18 PM, Eric E. Dolecki edole...@gmail.com wrote: SoundBooth On Thu, Jun 3, 2010 at 6:39 PM, Karl DeSaulniers k...@designdrumm.comwrote: Do you have SoundEdit? Or the like? Karl On Jun 3, 2010, at 5:09 PM, Eric E. Dolecki wrote: I think I might make waveform bitmaps and then try and compare against the current waveform (block EQ) - and if it's a close match, then fire off specific vowel events. If that works, I could do consonants too. If this works, I'll do jumping jacks and shots of Jack. So how would I compare two bitmaps to see if a waveform ( On Thu, Jun 3, 2010 at 5:18 PM, Karl DeSaulniers k...@designdrumm.com wrote: If you need any of these files or can't find them, lmk and I can send off list. Best, Karl On Jun 3, 2010, at 3:37 PM, Karl DeSaulniers wrote: Don't know if this will help, but have you looked into WaveAnalyzer.as or Flash MX - Audio: Sound completion event (The source files for this can be found in the Flash MX/Samples folder.) They both let you control the sound. I am thinking this will point you in a good direction. Its AS2 though. HTH, Karl On Jun 3, 2010, at 2:42 PM, Eric E. Dolecki wrote: Ya - I have the data for both things, but they extend over time and are difficult to compare. It's the boiling down the signatures into something simple and being able to read the playing audio looking for the match (or near match). I thought about using bitmap data and trying to match up waveforms, etc. but I don't know enough about it to pull that off. It seems like a hack in a way, but if it worked, who cares I suppose. On Thu, Jun 3, 2010 at 3:31 PM, Juan Pablo Califano califa010.flashcod...@gmail.com wrote: I'm not Henrik, but I've done some lip-synch stuff for Disney. We did it pretty much the way Eric described--we just used amplitude. It's not as accurate as Disney would demand on a film, but it's ok in the kids' game market. I see, amplitudes could be just good enough for some stuff. Although the speed and the intensitiy of the speech could give misleading results, I think. I'm under the impression that you should somehow try to compare the shape of the waves (somehow simplifiy your input to some value of sets of values that are easier to compare, possibly in a time window) and compare it in some meaningful way to precalculated samples to find a matching pattern. That's the part I have no clue about! Cheers Juan Pablo Califano 2010/6/3 Kerry Thompson al...@cyberiantiger.biz Juan Pablo Califano wrote: Wow. That was really uncalled for. That was my reaction, too. I didn't see Eric as complaining--just asking. Maybe Henrik was just having a bad day. For me, the hard part, which you seem to imply is rather simple here, is *matching+ the input audio against said profiles. Admitedly, I don't know anything about digital signal processing and audio programming in general, but matching sounds a bit vague. Perhaps you could enlighten us, I you feel like. I'm not Henrik, but I've done some lip-synch stuff for Disney. We did it pretty much the way Eric described--we just used amplitude. It's not as accurate as Disney would demand on a film, but it's ok in the kids' game market. Doing something more accurate would probably involve at least 6 mouth positions, and if you're doing it in real
[Flashcoders] AIR - ByteArray to BitmapData
Hi All do any of you how to convert a ByteArray (of a JPG) back into a BitmapData object? Actually - i just need to get the dimensions of the bitmap before trashing it. I know you can do 'myloader.loadBytes( byteArray )' - but i am avoiding that for now - as i just need to get the size of the image. Any pointers? mucho thanks - karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] swfObject, flashVars, loaded swf
how you pass the flash vars to flash depends on the version of SWFObject you are using - however - from flash - you can access the variable like so (as3): stage.loaderInfo.parameters.myflashparam However - you might need to make sure the swf has been 'AddedToStage' - k On 24 May 2010, at 18:22, Mendelsohn, Michael wrote: Hi list... I'm having difficulty getting flashvars to work in a swfObject on a web page. I have a swf that loads another swf. I am trying to send some flashvars to the loaded swf but I can't seem to get that wired up. How does a loaded swf access flash vars on the root of the swf that loaded it? Thanks, - Michael M. ___ 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] AIR - ByteArray to BitmapData
Perfect - thank you for the extended and most useful the answer - had started thinking along these lines but it's good to know there was no other way ( apart for the loader ) - as i just need width and height - think i am going to extract that from the ByteArray... thanks again... - k On 24 May 2010, at 20:09, Juan Pablo Califano wrote: If you want to convert it back to pixels, I'd say go with the Loader approach. Other than that, you'd have to write a JPEG decoder (seems like a waste of time, considering you can already use a Loader, which would also be faster, probably). Now, if you are only interested in getting the width and height, that data is in the SOFO block (SOFO stands for start of frame 0). SOFO is marked by this sequence of bytes: 0xFF 0xC0 So, basically, you can loop through your bytearray until you find this sequence. Then offset your current position as necessary and read the height and width. If you take a look at the JPEG encoder from as3CoreLib, you can see you have to skip 5 bytes from the beggining of the SOFO marker to get the height (2 bytes) and the width (2 bytes). http://code.google.com/p/as3corelib/source/browse/trunk/src/com/adobe/images/JPGEncoder.as Now, I haven't read the JPEG spec, so I'm not sure if this is a fixed offset. I'm assuming it is, but you'd better check it if you want to use this code. I've tried it with a couple of JPEG's and it worked fine, though. Also, you might want to validate if what you've got is a JPEG (check the first 2 bytes for 0xff, 0xd8); you might also want to check that you're not reading out of the buffer bounds. function readJPEGSize(data:ByteArray):void { var len:int = 0; var i:int = 0; var offset:int = 0; while(data.bytesAvailable 1) { // look for 0xffc0 if(data[i] == 0xFF data[i + 1] == 0xC0) { offset = i; break; } i++; } /* writeSOF0(image.width,image.height); writeWord(0xFFC0); // marker writeWord(17); // length, truecolor YUV JPG writeByte(8);// precision writeWord(height); writeWord(width); Skip 5 bytes: 2 SOFO marker 2 length 1 precision */ var h:int = 0; var w:int = 0; if(offset 0) { offset += 5; data.position = offset; h = data.readUnsignedShort(); w = data.readUnsignedShort(); trace(w,h); } } Cheers Juan Pablo Califano 2010/5/24 Karim Beyrouti ka...@kurst.co.uk Hi All do any of you how to convert a ByteArray (of a JPG) back into a BitmapData object? Actually - i just need to get the dimensions of the bitmap before trashing it. I know you can do 'myloader.loadBytes( byteArray )' - but i am avoiding that for now - as i just need to get the size of the image. Any pointers? mucho thanks - karim ___ 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] AIR - AS3 Badge
Hi All, I've not been able to find anything on this one, and am wondering if there is an AS3 AIR installer badge - so i can embed it in a flash site? Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Error #2101 - String passed to URLVariables.decode() ... must be URL encoded...
Hello List - I am using 'URLLoader' to get some data from the server and get an error: Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs. The dataFormat is set to : URLLoaderDataFormat.VARIABLES; The Data source is here: http://www.100fair-trades.com/widget/getTradeInfo.php it works if i set the dataFormat to TEXT, however it does not split the values not sure why this is happening here Thank you in advance... Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Resizing Bitmap - Preserving Alpha
Hi All - I have this code that resizes a bitmap, which works very well. However - it does not preserve the alpha channel. I am not sure where i am going wrong: public static function resizeBitmap( originalBitmap : Bitmap , scaleFactor : Number ) : BitmapData{ var originalBitmapData:BitmapData=originalBitmap.bitmapData; var newWidth:Number=originalBitmapData.width*scaleFactor; var newHeight:Number=originalBitmapData.height*scaleFactor; var scaledBitmapData:BitmapData=new BitmapData(newWidth,newHeight,true,0x); var scaleMatrix:Matrix=new Matrix(); scaleMatrix.scale(scaleFactor,scaleFactor); scaledBitmapData.draw(originalBitmapData , scaleMatrix); return scaledBitmapData; } I am more than likely missing something obvious - so any clues would be very welcome... Many kind regards Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: Resizing Bitmap - Preserving Alpha
Hmmm - figured it out a minute after posting... Conclusion: I am a bit of an idiot... sorry for the noise Here is the fix for the archives: var scaledBitmapData : BitmapData = new BitmapData( newWidth , newHeight , true , 0x00FF ); Hope you are all having a nice weekend... - k On 23 Aug 2009, at 16:56, Karim Beyrouti wrote: Hi All - I have this code that resizes a bitmap, which works very well. However - it does not preserve the alpha channel. I am not sure where i am going wrong: public static function resizeBitmap( originalBitmap : Bitmap , scaleFactor : Number ) : BitmapData{ var originalBitmapData:BitmapData=originalBitmap.bitmapData; var newWidth:Number=originalBitmapData.width*scaleFactor; var newHeight:Number=originalBitmapData.height*scaleFactor; var scaledBitmapData:BitmapData=new BitmapData(newWidth,newHeight,true,0x); var scaleMatrix:Matrix=new Matrix(); scaleMatrix.scale(scaleFactor,scaleFactor); scaledBitmapData.draw(originalBitmapData , scaleMatrix); return scaledBitmapData; } I am more than likely missing something obvious - so any clues would be very welcome... Many kind regards Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Image loader problem
I went for bulkloader over making my own queued loader - as it has so many tested features. Here is a little code to help get you started ( if you need it )... Instantiate the loader... code // New Bulk Loader imgLoader = new BulkLoader( 'NameOfLoaderInstance'); imgLoader.addEventListener(BulkLoader.COMPLETE, AllItemsLoaded , false , 0 , true ); /code Load images: code // Clear the loader of any previously loaded images imgLoader.removeAll(); // Add all the images to the loading queue for ( var i : int = 0 ; i _data.length ; i ++ ){ var record : Object= _data.getItemAt( i ); var item: LoadingItem = imgLoader.add( record['uri'] ); item.addEventListener( Event.COMPLETE , completeHandler , false , 0 , true ); item.addEventListener( ProgressEvent.PROGRESS , progressHandler , false , 0 , true ); } // start loading - one item at a item - this will load images in the order you added them imgLoader.start( 1 ); /code Image Loaded Event Handler: code private function completeHandler( e : Event ) : void { // // remove event listeners and reference the bitmap var item:LoadingItem= e.target as LoadingItem; item.removeEventListener( Event.COMPLETE , completeHandler ); item.removeEventListener( ProgressEvent.PROGRESS, progressHandler ); var sURL : String = item.url.url; var record : Object = getRecordByKey( sURL, 'uri' ); record.loadid = sURL; view.addImage( imgLoader.getBitmap( record.loadid ) , record ); } /code hope this helps... Regards Karim On 26 Jul 2009, at 09:58, Cor wrote: Thank guys!!! It is an eye opener to see all kinds of different approaches. I will definitely look at the bulkloader but Muzak's method makes a lot of sence to me in my project for now. @Muzak, I normally only use the XML class. I notice you using XMLList. Could you explain when XML is appropriate and when to use XML. I read the help, but this does not explain the nitty-gritty. Thanks again!! Cor PS. I love this list ___ 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] FDT SVN + Code Assist
Hello All, I am using eclipse SVN with FDT - and for the most part it really works a treat. However, I am getting all the SVN paths appearing in my code hinting. Do you know a way to get code assist to ignore svn paths? Regards Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FDT SVN + Code Assist
Thanks for the reply - i have set the filter to ignore .svn files, however that does not seem to filter the folders from the code hinting... - karim On 14 Feb 2009, at 17:24, ekameleon wrote: Hello :) in eclipse in the FlashExplorer panel in the top right menu of the panel you must choose the item filters and select the .svn files. PS : you use Subclipse ? for me the best solution in eclipse to work with SVN EKA + :) 2009/2/14 Karim Beyrouti ka...@kurst.co.uk Hello All, I am using eclipse SVN with FDT - and for the most part it really works a treat. However, I am getting all the SVN paths appearing in my code hinting. Do you know a way to get code assist to ignore svn paths? Regards Karim ___ 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
Re: [Flashcoders] Controlling Sound in the timeline - AS3
This worked - thanks - however - my sound is triggered on the timeline ( event - loop ) , is there a way i can control the sound position - i.e. restart the sound or skip to a certain position in the audio? Or maybe this is asking a little too much from timeline triggered sounds. Many thanks... On 14 Nov 2008, at 21:30, Kenneth Kawamoto wrote: Shouldn't it be more like: var stfm:SoundTransform = theMC.soundTransform; stfm.volume = 0; theMC.soundTransform = stfm; Kenneth Kawamoto http://www.materiaprima.co.uk/ Karim Beyrouti wrote: Hi ! Another simple AS3 question - well at least I hope so. I am trying to set the volume of a sound that has been embedded in the 'root' timeline of a loaded movieclip (as3). So I tried: Themc.soundTransform.volume = 0; But nothing happened - no mute or anything in AS2 we used to be able to do: s:Sound = new Sound( themc ). s.volume = 0; but this does not work in AS3... It's probably something simple but I am really scratching my head with this one. Also, it's a little odd, but there is no chapter on Sound in Colin Mook's Essential ActionScript 3.0 book... Thanks Karim ___ 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] Controlling Sound in the timeline - AS3
Hi ! Another simple AS3 question - well at least I hope so. I am trying to set the volume of a sound that has been embedded in the 'root' timeline of a loaded movieclip (as3). So I tried: Themc.soundTransform.volume = 0; But nothing happened - no mute or anything in AS2 we used to be able to do: s:Sound = new Sound( themc ). s.volume = 0; but this does not work in AS3... It's probably something simple but I am really scratching my head with this one. Also, it's a little odd, but there is no chapter on Sound in Colin Mook's Essential ActionScript 3.0 book... Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Yeh - this might not work - I already have a similar structure, and as the ComboBox adds the List to the stage. I tried to find a 'lockRoot' type of solution for AS3 - but no joy there. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: 12 November 2008 23:03 To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 This might be a bit cumbersome but less processor intensive. Instead of using MOUSE_MOVE, create two Sprites on the stage. One as a content pane and other as a custom cursor pane. Then add all content including the combo box to the content pane and the cursor to the cursor pane. I can't say for sure if the combo box will still display on top but may be worth a shot if you're big on freeing up resources. On Wed, Nov 12, 2008 at 5:47 PM, karim beyrouti [EMAIL PROTECTED] wrote: Perfect - thank you ! it seems a little odd that the ComboBox adds the List to the stage and not one of its own children. Maybe memory/resource managment. h. On 12 Nov 2008, at 16:26, Keith Reinfeld wrote: Karim, Try adding the following line of code to your MOUSE_MOVE event listener function: stage.addChildAt(customCursor, stage.numChildren); Of course, you must substitute your custom cursor's instance name for 'customCursor'. HTH Regards, -Keith http://keithreinfeld.home.comcast.net ___ 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 -- --Joel ___ 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] ComboBox + Custom Cursor , AS3
Some other way... but will look into CursorManager Thanks Karim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Hall Sent: 12 November 2008 13:01 To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Are you using CursorManager or adding the cursor in some other way? Peter On Wed, Nov 12, 2008 at 12:42 PM, Karim Beyrouti [EMAIL PROTECTED] wrote: Hello All - I am a little stumped by this one. I am using a custom cursor ( added to the stage ), one of my loaded SWF's has a drop down comboBox - The problem: The List gets added to the stage and goes over the custom mouse cursor. Do you guys know of any fixes for this one? Regards Karim Beyrouti ___ 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] ComboBox + Custom Cursor , AS3
Hello All - I am a little stumped by this one. I am using a custom cursor ( added to the stage ), one of my loaded SWF's has a drop down comboBox - The problem: The List gets added to the stage and goes over the custom mouse cursor. Do you guys know of any fixes for this one? Regards Karim Beyrouti ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Did not find it in Docs, so googled it - and it's a Flex thing no?... Using flash CS3... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Hall Sent: 12 November 2008 13:01 To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Are you using CursorManager or adding the cursor in some other way? Peter On Wed, Nov 12, 2008 at 12:42 PM, Karim Beyrouti [EMAIL PROTECTED] wrote: Hello All - I am a little stumped by this one. I am using a custom cursor ( added to the stage ), one of my loaded SWF's has a drop down comboBox - The problem: The List gets added to the stage and goes over the custom mouse cursor. Do you guys know of any fixes for this one? Regards Karim Beyrouti ___ 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
Re: [Flashcoders] ComboBox + Custom Cursor , AS3
Perfect - thank you ! it seems a little odd that the ComboBox adds the List to the stage and not one of its own children. Maybe memory/resource managment. h. On 12 Nov 2008, at 16:26, Keith Reinfeld wrote: Karim, Try adding the following line of code to your MOUSE_MOVE event listener function: stage.addChildAt(customCursor, stage.numChildren); Of course, you must substitute your custom cursor's instance name for 'customCursor'. HTH Regards, -Keith http://keithreinfeld.home.comcast.net ___ 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] Text field - input caret..
Hi groovy list... just wondering how I move the input caret to end of a textfield in as3? Regards Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Text field - input caret..
Thank you -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: 07 November 2008 16:21 To: 'Flash Coders List' Subject: RE: [Flashcoders] Text field - input caret.. Karim, myTextField.setSelection(myTextField.length, myTextField.length); Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Karim Beyrouti Sent: Friday, November 07, 2008 8:37 AM To: 'Flash Coders List' Subject: [Flashcoders] Text field - input caret.. Hi groovy list... just wondering how I move the input caret to end of a textfield in as3? Regards Karim ___ 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] MP4
Hello ! - just wondering what is the lowest version of flash that plays MP4?... Kind regards Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] MP4
Thanks... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth Kawamoto Sent: 04 November 2008 17:33 To: Flash Coders List Subject: Re: [Flashcoders] MP4 H.264 playback capability was added in Flash Player 9 Update 3, Version 9.0.115.0 - a.k.a. MovieStar Kenneth Kawamoto http://www.materiaprima.co.uk/ Karim Beyrouti wrote: Hello ! - just wondering what is the lowest version of flash that plays MP4?... Kind regards Karim ___ 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] ComboBox not dropping down in browser?
The problem with the drop down not working could be you removing some needed assets from the styling MovieClips. I suggest if you need to remove some bits of components you just test a lot and try to set the alpha to 0 from the palette if you need to remove something... As for the fonts - I had some issues. This code worked for me (AS3 FP9): Note GothamMedium is embedded in the lib. code var tClass:Class= getDefinitionByName(GothamMedium) as Class; Font.registerFont(tClass); var tf:TextFormat = new TextFormat(); tf.font = Gotham Medium; tf.size = 12; tf.bold = false; cmb_mc.dropdown.setRendererStyle(embedFonts , true); cmb_mc.dropdown.setRendererStyle(textFormat , tf); cmb_mc.textField.setStyle(fontFamily , Gotham Medium ); cmb_mc.textField.setStyle(embedFonts , true ); dob_txt.embedFonts = true; dob_txt.setTextFormat( tf); StyleManager.setStyle( textFormat , tf) /code Hope this helps Karim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Preston Parris Sent: 31 October 2008 16:53 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] ComboBox not dropping down in browser? I have a combo box that I just styled, everything works perfectly in the flash ide, all of the data populates, it drops down, is styled fine, Now when I open it in the browser, I click to drop it down, nothing happens. If I click it then tab to the box it shows the yellow outline of wear the content should be yet nothing is there, also my font styling for this box seems to have no effect in the browser, yet like I said in the ide, everything is perfect. thank you to anyone who can help, I will continue my struggle, haha. -- Preston Parris [EMAIL PROTECTED] cell: 704.450.9299 www.modevisual.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] AS3 - Checking if a Function Exists
This is great - thank you -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: 28 October 2008 08:46 To: Flash Coders List Subject: Re: [Flashcoders] AS3 - Checking if a Function Exists Method: public static function refExists(obj:Object,name:String):Boolean { try { if (obj[name]!=null) return true; } catch (e:ReferenceError) {} return false; } HTH, Ian On Tue, Oct 28, 2008 at 8:36 AM, Ian Thomas [EMAIL PROTECTED] wrote: Or, thinking about it, you could catch the reference error in a try/catch block. It's more of a kludge, but might give you much higher performance! Ian ___ 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 - Checking if a Function Exists
Hello Group - This should be really easy. I am trying to find out how to check if a function exists or not in AS3 - I tried this: code If ( currentSection.refresh != null ) { currentSection.refresh(); } /code But I get ReferenceError: Error #1069: Property refresh not found when the function does not exist. Any clues? Kind Regards Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] FLVPlayback - Buffering
Hello groovy list... I can't seem to find a property for buffering percentage in the FLVPlayback component - there must be something as there is a bufferingBar property. any thoughts? Kind regards Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] FLVPlayback - Buffering
Hi Leandro - thanks for the reply - However I am looking to get the Percentage of buffering - so something like: bufferLoaded/bufferTime So far I have found this: flvPlayer.getVideoPlayer(flvPlayer.activeVideoPlayerIndex).netStream.bufferL ength / flvPlayer.getVideoPlayer(flvPlayer.activeVideoPlayerIndex).netStream.bufferT ime; but it's not spitting out the correct values - I guess I am miss-interpreting them. Regards Karim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leandro Ferreira Sent: 21 October 2008 12:57 To: Flash Coders List Subject: Re: [Flashcoders] FLVPlayback - Buffering Let me get this: you want to set the buffer or just get its percentage? If so, you expect a percentage from what? If you want to change the buffer length, try bufferTime. Leandro Ferreira On Tue, Oct 21, 2008 at 10:14 AM, Karim Beyrouti [EMAIL PROTECTED] wrote: Hello groovy list... I can't seem to find a property for buffering percentage in the FLVPlayback component - there must be something as there is a bufferingBar property. any thoughts? Kind regards Karim ___ 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
RE: [Flashcoders] ComBox Box - Font Issues
I am setting everything before I add the data. However I have sorted the issue out by setting the global style. I don't think its optimal - but it works. Here is my working code for reference: code var tClass:Class= getDefinitionByName(GothamMedium) as Class; Font.registerFont(tClass); var tf:TextFormat = new TextFormat(); tf.font = Gotham Medium; tf.size = 12; tf.bold = false; cmb_mc.dropdown.setRendererStyle(embedFonts , true); cmb_mc.dropdown.setRendererStyle(textFormat , tf); cmb_mc.textField.setStyle(fontFamily , Gotham Medium ); cmb_mc.textField.setStyle(embedFonts , true ); dob_txt.embedFonts = true; dob_txt.setTextFormat(tf); StyleManager.setStyle(textFormat , tf) /code Many thanks for all your help Karim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Glen Pike Sent: 19 October 2008 21:59 To: Flash Coders List Subject: Re: [Flashcoders] ComBox Box - Font Issues Hi, Are you setting these values before or after you add the data? That may have a bearing. Have a look at this article: http://blogs.adobe.com/pdehaan/2008/03/using_embedded_fonts_with_the_3.html Which may / may not help? Glen T karim beyrouti wrote: Hi Glen - thanks for the answer.. Yep - i remember that one - I tried this at first and sadly it did not work... however to make things stranger - the fonts work in the textfield when i use the keys to select from the drop down (then mouse selection works). But it does not work initially. hmmm... On 18 Oct 2008, at 17:38, Glen Pike wrote: Hi, Try putting a text field off the stage set and embed your chosen font into it - that used to do the trick with AS2. Glen karim beyrouti wrote: Hi list - I am using the flash CS3 components - and have hit a little snag - when testing in the IDE ( or just running the SWF ) all the fonts show up fine - no problem. However the moment the site goes in the browser - the font does not show up in the ComboBox textField, however they show up no in the dropdown menu. I have embedded the font in my library - and well - i have no clue as to why this is not working in the browser. this is the code i am using to format the combobox: code var tf:TextFormat = new TextFormat(); tf.font = Gotham Medium; tf.size = 12; tf.bold = false; cmb_mc.dropdown.setRendererStyle(embedFonts, true); cmb_mc.dropdown.setRendererStyle(textFormat, tf); cmb_mc.textField.setStyle(embedFonts, true); cmb_mc.textField.setStyle(textFormat, tf); /code Kind regards Karim Beyrouti ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01326 218440 www.glenpike.co.uk http://www.glenpike.co.uk ___ 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 -- Glen Pike 01326 218440 www.glenpike.co.uk http://www.glenpike.co.uk ___ 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] ComBox Box - Font Issues
Hi list - I am using the flash CS3 components - and have hit a little snag - when testing in the IDE ( or just running the SWF ) all the fonts show up fine - no problem. However the moment the site goes in the browser - the font does not show up in the ComboBox textField, however they show up no in the dropdown menu. I have embedded the font in my library - and well - i have no clue as to why this is not working in the browser. this is the code i am using to format the combobox: code var tf:TextFormat = new TextFormat(); tf.font = Gotham Medium; tf.size = 12; tf.bold = false; cmb_mc.dropdown.setRendererStyle(embedFonts, true); cmb_mc.dropdown.setRendererStyle(textFormat, tf); cmb_mc.textField.setStyle(embedFonts, true); cmb_mc.textField.setStyle(textFormat, tf); /code Kind regards Karim Beyrouti ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComBox Box - Font Issues
Hi Glen - thanks for the answer.. Yep - i remember that one - I tried this at first and sadly it did not work... however to make things stranger - the fonts work in the textfield when i use the keys to select from the drop down (then mouse selection works). But it does not work initially. hmmm... On 18 Oct 2008, at 17:38, Glen Pike wrote: Hi, Try putting a text field off the stage set and embed your chosen font into it - that used to do the trick with AS2. Glen karim beyrouti wrote: Hi list - I am using the flash CS3 components - and have hit a little snag - when testing in the IDE ( or just running the SWF ) all the fonts show up fine - no problem. However the moment the site goes in the browser - the font does not show up in the ComboBox textField, however they show up no in the dropdown menu. I have embedded the font in my library - and well - i have no clue as to why this is not working in the browser. this is the code i am using to format the combobox: code var tf:TextFormat = new TextFormat(); tf.font = Gotham Medium; tf.size = 12; tf.bold = false; cmb_mc.dropdown.setRendererStyle(embedFonts, true); cmb_mc.dropdown.setRendererStyle(textFormat, tf); cmb_mc.textField.setStyle(embedFonts, true); cmb_mc.textField.setStyle(textFormat, tf); /code Kind regards Karim Beyrouti ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01326 218440 www.glenpike.co.uk http://www.glenpike.co.uk ___ 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