archive-com.com » COM » K » KENNYBUNCH.COM

Total: 200

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Kenny Bunch | thoughts from a software dev and business owner
    sat on this code base for about 5 years without sharing it I guess it is better late than never So today we are releasing the framework under an MIT license for anyone who still has to dabble in ActionScript 2 What is in the framework AS3 style event framework with bubbling priorities scoping phases formal events display package with DisplayObject Graphics Sprite Stage etc that hold the same AS3 APIs NetStream NetConnection SoundTransform Timer Where do I get it All the code is up on https github com dreamsocket actionscript as3for2 So go grab it now It may be something useful on a project fun for a stroll down memory lane or educational as you port things over to JavaScript Written by kbunch No comments Posted in Uncategorized December 21 2010 Simplifying StageVideo with StageVideoProxy Adobe recently took a large step in changing the way video gets rendered in the Flash player For the most part the player has always taken a large role in rendering video to the screen With the release of Flash player 10 2 this has all changed Now if you explicitly tell the player to you can offload the video completely to the hardware which decreases CPU usage literally to 0 lowers memory usage enables higher frame rates and overall enables greater pixel fidelity and video quality Obviously with all the upcoming phones tablets and connected TVs this has an even higher impact on a video applications experience At Dreamsocket we ve been fortunate enough to be an early adopter with projects on these platforms From developing video player s tailored for Android phones to creating Cartoon Network and Adult Swim s GoogleTV apps we ve been able to see the impact this new change has in addition to figuring out the best way to integrate it into existing applications All that said the one thing that really struck us was how unique the new StageVideo API is I say unique because it is a completely new API and is completely different than working with the Video object I understand the differences however do you really need to force someone to go back and recode everything just to use it I know it forces a user to explicitly think and spend time putting StageVideo into an app but why It should be EASY I mean really EASY Enter StageVideoProxy We wanted to go into all of our video applications and simply swap out a Video object reference for a new Class that would use StageVideo if present and fallback to using a standard Video object if it failed By having a simple class that extended Video we could just swap out the instance and proxy all the calls to StageVideo when it was available This made it EXTREMELY easy to retro fit any existing application with StageVideo functionality In addition we kept all 10 2 API references in places that would not get called in players below 10 2 making the code backwards compatible Super right Well we did find a few limitations First StageVideo doesn t really have a way to clear the video so we had set the size to 0 width and 0 height to clear it Second we don t really know depth of display objects vs other display objects easily so we don t have a way to determine z depth for the videos The second step doesn t really matter though given the implementation currently only supports a single StageVideo instance I d like to add support for multi videos but I m still unclear on how many I can have and what dictates that I understand how to know when they are there and when you hit your limit but I d still like to fully understand it before I add it in Regardless this is super useful code so merry nerdmas Here you go in all its MIT licensed glory Copyright c 2010 Dreamsocket Incorporated All rights reserved Permission is hereby granted free of charge to any person obtaining a copy of this software and associated documentation files the Software to deal in the Software without restriction including without limitation the rights to use copy modify merge publish distribute sublicense and or sell copies of the Software and to permit persons to whom the Software is furnished to do so subject to the following conditions The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software THE SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE package com dreamsocket media import flash events Event import flash events StageVideoEvent import flash events StageVideoAvailabilityEvent import flash events VideoEvent import flash geom Rectangle import flash media StageVideo import flash media StageVideoAvailability import flash media Video import flash net NetStream public class StageVideoProxy extends Video protected var m netStream NetStream protected var m stageVideo Object public function StageVideoProxy p width int 320 p height int 240 super p width p height this addEventListener Event ADDED TO STAGE this onAddedToStage this addEventListener Event REMOVED FROM STAGE this onRemovedFromStage override public function set height p value Number void if p value this height super height p value this layoutView override public function get videoHeight int return this m stageVideo this m stageVideo videoHeight super videoHeight override public function get videoWidth int return this m stageVideo this m stageVideo videoWidth super videoWidth override public function set width p value Number void if p value this width super width p value this layoutView override public function set x p value Number void if p value this x super x

    Original URL path: http://www.kennybunch.com/ (2016-04-28)
    Open archived version from archive

  • Augusta Half Ironman | Kenny Bunch
    it and thinking I was faster than them Went over to the bike and tried to get it off myself Stuck Pulled and pulled and pulled Nothing finally got it off and it yanked my timing chip off Didn t know it headed out then realized had to head back got it Lost time for silliness time 5 27 Bike Got on the bike I love to bike its fun I ve been doing around 100 miles in about 5 hours without pushing it hard and figured I d go easy and keep it the same Not many folks past me even at that rate except the disc crews which seemed to be like gangs At one point a lone disc went by I glanced over and had to take a second take Noticed davemirra ahead of me Thought I was back at Jaycee or the BD bowl for hot minute on my board Cool to see someone from a similar background dealing with the horrors of spandex However something tells me he wasn t checking out the scenery like me I turned into that guy you know the one was totally jabbering with folks as I rode The ride was a lot of fun and leisurely but the sun beat on me with no sunscreen and I didn t have enough fluids stored on my bike time 2 47 30 20mph Transition 2 Something about going from one thing to the other your brain gets hog tied or something Went into transition got my gear on fast running out where s the strap for my heart rate monitor Feel off had to run back and look in the chute for it Found it and ran out Lost time for silliness time 4 41 Run So I m now into the run at my standard pace finish the first mile with a sub 7 minute mile Then the big boom I reach back to get my nutrition salt tablets etc and find my ziplock back had opened up All my stuff is lost or unusable right at the point I need it My bike doesn t carry enough fluids and I didn t swap them out on the course so I knew I had better slow down since I didn t have what I needed earlier to prep for this I ended up dropping way back from even a normal pace After running for a bit I tried to take an alternate grabbed a few of the perform drinks but they tasted like sugar cough syrup I totally don t get why they don t have decent stuff on the course I really don t like taking in garbage Since there wasn t a really good solution I kept it turtle time My family was on the course a few times and got to give hi fives to the kids I loved seeing the in retrospect maybe there is something I can do when I see them to make the

    Original URL path: http://www.kennybunch.com/2013/10/augusta-half-ironman/ (2016-04-28)
    Open archived version from archive

  • kbunch | Kenny Bunch
    21 2010 Embedding JavaScript into a SWF September 25 2009 Bear on a Wire previously Poor Bear IPhone game released September 1 2009 Older posts subscribe Search for Archives Archives Select Month October 2013 December 2010 September 2009 April 2009 March 2009 February 2009 January 2009 May 2008 April 2008 March 2008 February 2008 January 2008 October 2007 July 2007 June 2007 May 2007 February 2007 January 2007 December 2006

    Original URL path: http://www.kennybunch.com/author/kbunch/ (2016-04-28)
    Open archived version from archive

  • Uncategorized | Kenny Bunch
    to run back and look in the chute for it Found it and ran out Lost time for silliness time 4 41 Run So I m now into the run at my standard pace finish the first mile with a sub 7 minute mile Then the big boom I reach back to get my nutrition salt tablets etc and find my ziplock back had opened up All my stuff is lost or unusable right at the point I need it My bike doesn t carry enough fluids and I didn t swap them out on the course so I knew I had better slow down since I didn t have what I needed earlier to prep for this I ended up dropping way back from even a normal pace After running for a bit I tried to take an alternate grabbed a few of the perform drinks but they tasted like sugar cough syrup I totally don t get why they don t have decent stuff on the course I really don t like taking in garbage Since there wasn t a really good solution I kept it turtle time My family was on the course a few times and got to give hi fives to the kids I loved seeing the in retrospect maybe there is something I can do when I see them to make the boys excited time 1 56 40 8 54 mile Overall final time 5 21 56 Overall the race was a blast I had no real goals for the race other than to get a feel for it and go at a regular easy pace I didn t want to get hurt since it was practice for a bigger event I did mess up royally in both transitions but really took it on the run The transitions should have been 1 2 of what they were I would have liked to have had a normal run just to see what my time would have been without dropping pace down I really didn t care though since it was fun and I was trying to just figure things out I m waaaay faster on the run and bike so I d love to do it again and actually go for speed now that I m more comfortable with it Going forward I know getting the wetsuit off is an issue I need better fluid storage on the bike and I ABSOLUTELY need a backup plan for my nutrition and better way to store it I m already continuing with the craziness of getting ready for the big one and its crazy a bit to crazy for me Just a few more weeks to the real race Written by kbunch No comments Posted in Uncategorized December 22 2010 Introducing the as3for2 framework an AS3 emulation layer in AS2 Is ActionScript 2 still used We rarely have ActionScript 2 based projects these days at Dreamsocket but a few still pop up now and again Most of

    Original URL path: http://www.kennybunch.com/category/uncategorized/ (2016-04-28)
    Open archived version from archive

  • Introducing the as3for2 framework (an AS3 emulation layer in AS2) | Kenny Bunch
    random banner ad that needed to play nice in foreign environments In both cases we turned to our as3for2 framework What is as3for2 The moment ActionScript 3 came out it was clear the new language was much simpler and cleaner to work with Having a lot of large ActionScript 2 projects at the time that we wanted to port we created a framework that wrapped ActionScript 2 to emulate the new ActionScript 3 objects and interfaces It enabled us to slowly port chunks of code over to the point we just had to change a few syntax points and the code was now running atop ActionScript 3 That definitely was helpful but it was more of a short term transitional usage of the framework Where it has been invaluable are projects like the ones mentioned above where we have to step back in time because of limitations that won t allow us to use ActionScript 3 The sad thing is we ve sat on this code base for about 5 years without sharing it I guess it is better late than never So today we are releasing the framework under an MIT license for anyone who still has to dabble in ActionScript 2 What is in the framework AS3 style event framework with bubbling priorities scoping phases formal events display package with DisplayObject Graphics Sprite Stage etc that hold the same AS3 APIs NetStream NetConnection SoundTransform Timer Where do I get it All the code is up on https github com dreamsocket actionscript as3for2 So go grab it now It may be something useful on a project fun for a stroll down memory lane or educational as you port things over to JavaScript Written by kbunch Posted in Uncategorized Post a comment Cancel reply Comment You may use the following

    Original URL path: http://www.kennybunch.com/2010/12/introducing-the-as3for2-framework-an-as3-emulation-layer-in-as2/ (2016-04-28)
    Open archived version from archive

  • Simplifying StageVideo with StageVideoProxy | Kenny Bunch
    set the size to 0 width and 0 height to clear it Second we don t really know depth of display objects vs other display objects easily so we don t have a way to determine z depth for the videos The second step doesn t really matter though given the implementation currently only supports a single StageVideo instance I d like to add support for multi videos but I m still unclear on how many I can have and what dictates that I understand how to know when they are there and when you hit your limit but I d still like to fully understand it before I add it in Regardless this is super useful code so merry nerdmas Here you go in all its MIT licensed glory Copyright c 2010 Dreamsocket Incorporated All rights reserved Permission is hereby granted free of charge to any person obtaining a copy of this software and associated documentation files the Software to deal in the Software without restriction including without limitation the rights to use copy modify merge publish distribute sublicense and or sell copies of the Software and to permit persons to whom the Software is furnished to do so subject to the following conditions The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software THE SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE package com dreamsocket media import flash events Event import flash events StageVideoEvent import flash events StageVideoAvailabilityEvent import flash events VideoEvent import flash geom Rectangle import flash media StageVideo import flash media StageVideoAvailability import flash media Video import flash net NetStream public class StageVideoProxy extends Video protected var m netStream NetStream protected var m stageVideo Object public function StageVideoProxy p width int 320 p height int 240 super p width p height this addEventListener Event ADDED TO STAGE this onAddedToStage this addEventListener Event REMOVED FROM STAGE this onRemovedFromStage override public function set height p value Number void if p value this height super height p value this layoutView override public function get videoHeight int return this m stageVideo this m stageVideo videoHeight super videoHeight override public function get videoWidth int return this m stageVideo this m stageVideo videoWidth super videoWidth override public function set width p value Number void if p value this width super width p value this layoutView override public function set x p value Number void if p value this x super x p value this layoutView override public function set y p value Number void if p value this y super y p value this layoutView

    Original URL path: http://www.kennybunch.com/2010/12/simplifying-stagevideo-with-stagevideoproxy/ (2016-04-28)
    Open archived version from archive

  • ActionScript | Kenny Bunch
    SWF Developers that have been using Flex should be pretty familiar by now with the Embed metadata tag which allows you to embed assets into a SWF like images SWFs XML etc This option has also been added to CS4 CS4 uses the Flex SDK to complete this task What some of you may not know or though of is that you can actually embed JavaScript libraries into your SWF and have your SWF write those libs to the pages DOM We ve been using this technique for a while However when someone asked for a reference on the subject I searched the web and didn t find one So here we are This technique is quite simple The basics of it are that you embed the JavaScript library using the embed syntax then create a Class that references it when instantiated instantiate that class get the string representation of the instance and send that string to the page to be embedded using a JavaScript eval statement To illustrate this lets create a JavaScript file called hello js which has a single function hello that throws an JS alert Hello js function hello alert hello Now lets create the ActionScript file that embeds the JS into a SWF writes it to the page and calls the hello function in the lib package import flash display Sprite import flash external ExternalInterface public class EmbeddedJavaScriptExample extends Sprite embed the JavaScript into the SWF Embed source hello js mimeType application octet stream create a class that can instantiate the JavaScript for embedding private static const HelloJS Class public function EmbeddedJavaScriptExample if ExternalInterface available embed the JavaScript to the page ExternalInterface call eval new HelloJS toString the embedded JavaScript has a function call named hello now that it has been embedded to the page call it ExternalInterface call hello You can download the full example here Pretty nifty eh Hope this shows you a neat little trick to use in distributing some of your SWF JS libraries Written by kbunch No comments Posted in ActionScript Flash February 18 2009 Event type naming qualifying vs simple I have put a lot of thought into event naming recently In my research I ve seen a few developers fully qualifying their event type names This is something I actually debated myself when writing our Media Framework but opted not to do The subject is debatable so let me describe what I mean by fully qualified names and why I decided not to use them Based on the points I outline you can make your own decision of whether to use them yourself What is a fully qualified event type name ActionScript 3 has a formal event framework where objects dispatch events and others subscribe to them and react accordingly Each event dispatched is represented by an event object All of the native AS3 event objects follow a formal convention of defining the types of events they can be dispatched as This convention places a static constant representing

    Original URL path: http://www.kennybunch.com/category/flash/actionscript/ (2016-04-28)
    Open archived version from archive

  • Flash | Kenny Bunch
    SWF Developers that have been using Flex should be pretty familiar by now with the Embed metadata tag which allows you to embed assets into a SWF like images SWFs XML etc This option has also been added to CS4 CS4 uses the Flex SDK to complete this task What some of you may not know or though of is that you can actually embed JavaScript libraries into your SWF and have your SWF write those libs to the pages DOM We ve been using this technique for a while However when someone asked for a reference on the subject I searched the web and didn t find one So here we are This technique is quite simple The basics of it are that you embed the JavaScript library using the embed syntax then create a Class that references it when instantiated instantiate that class get the string representation of the instance and send that string to the page to be embedded using a JavaScript eval statement To illustrate this lets create a JavaScript file called hello js which has a single function hello that throws an JS alert Hello js function hello alert hello Now lets create the ActionScript file that embeds the JS into a SWF writes it to the page and calls the hello function in the lib package import flash display Sprite import flash external ExternalInterface public class EmbeddedJavaScriptExample extends Sprite embed the JavaScript into the SWF Embed source hello js mimeType application octet stream create a class that can instantiate the JavaScript for embedding private static const HelloJS Class public function EmbeddedJavaScriptExample if ExternalInterface available embed the JavaScript to the page ExternalInterface call eval new HelloJS toString the embedded JavaScript has a function call named hello now that it has been embedded to the page call it ExternalInterface call hello You can download the full example here Pretty nifty eh Hope this shows you a neat little trick to use in distributing some of your SWF JS libraries Written by kbunch No comments Posted in ActionScript Flash February 18 2009 Event type naming qualifying vs simple I have put a lot of thought into event naming recently In my research I ve seen a few developers fully qualifying their event type names This is something I actually debated myself when writing our Media Framework but opted not to do The subject is debatable so let me describe what I mean by fully qualified names and why I decided not to use them Based on the points I outline you can make your own decision of whether to use them yourself What is a fully qualified event type name ActionScript 3 has a formal event framework where objects dispatch events and others subscribe to them and react accordingly Each event dispatched is represented by an event object All of the native AS3 event objects follow a formal convention of defining the types of events they can be dispatched as This convention places a static constant representing

    Original URL path: http://www.kennybunch.com/category/flash/ (2016-04-28)
    Open archived version from archive



  •