archive-com.com » COM » C » CRAFTYMIND.COM

Total: 161

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

Or switch to "Titles and links view".
  • RegExp pattern for creating file safe names | Craftymind
    specific characters from being used in file and folder names The following code snippet will allow you to trim those special characters when creating File references in AIR var fileSafePattern RegExp new RegExp gi var fileSafeName String myString replace fileSafePattern

    Original URL path: http://www.craftymind.com/regexp-pattern-for-creating-file-safe-names/ (2016-04-27)
    Open archived version from archive

  • eBay Desktop demo | Craftymind
    on watching the results of the beta very closely and trying to interact with a lot of users to get their opinions Weâ ve got an amazing opportunity to rebuild eBays interface from the ground up and want to make sure every aspect of using eBay gets improved in the process So feel free to send me your thoughts through this blog or on the beta site If you want

    Original URL path: http://www.craftymind.com/ebay-desktop-demo/ (2016-04-27)
    Open archived version from archive

  • Craftymind | Hacking away at UI development | Page 9
    3 2008 Sean Christmann For eBay Desktop we wrote a simple utility for reading and writing classes directly to disk Using this method we re able to load the users existing data from disk or if its unavailable create a new class with all the defaults First up is the utility class AIRUtils package com effectiveui util import flash filesystem File import flash filesystem FileMode import flash filesystem FileStream public class AIRUtils public static function readFileObject fil File Object var amf Object if fil exists var stream FileStream new FileStream stream open fil FileMode READ amf stream readObject stream close return amf public static function writeFileObject fil File obj Object Object var stream FileStream new FileStream stream open fil FileMode WRITE stream writeObject obj stream close return obj These 2 static methods act as simple helper wrappers to read and write classes out to disk The example class we want to save below looks very similar to the type of class we use inside eBay Desktop package com ebay model import com ebay model SearchPreferences Bindable RemoteClass alias com ebay model UserPreferencesModel public class UserPreferencesModel public static const STANDARD String standard public static const SKINNY String skinny public var logoutOnClose Boolean false public var viewState STANDARD public var globalSearchFilters SearchPreferences new SearchPreferences private var maxHistoryItems uint 1000 public function set maxHistoryItems max uint void maxHistoryItems max public function get maxHistoryItems uint return maxHistoryItems In order to write a class out to disk and read it back in you have to add RemoteClass metadata to it It doesn t matter what the value is it just needs to be unique to the application This provides Flash with an identifier for linking amf data to class definitions when its loaded back in It doesn t matter what value you put in the

    Original URL path: http://www.craftymind.com/page/9/ (2016-04-27)
    Open archived version from archive

  • Blowing up HTML5 video and mapping it into 3D space | Craftymind
    d say you did an amazing job of conserving resources It ain t your fault Firefox is underfunded compared to chrome Brilliant proof of concept Bookmarked your sight you crafty mind yanshuhao says March 16 2011 at 8 25 am akhmad fathur says April 1 2011 at 12 44 am Veri nice we are want develov our web with flatform HTML 5 Barbara says April 7 2011 at 12 06 pm very useful tips about HTML5 love it SoberVc says July 5 2011 at 4 07 am I Like this asad says July 30 2011 at 1 56 am i Like it tiger says August 20 2011 at 12 46 am that is great Gonzalo Viñas says October 10 2011 at 11 26 am I remember double buffering technics of 90 s sanctus says October 14 2011 at 11 19 am PERO SI ESA BASURA LA HAGO IGUALITA EN FLASH 8 Y MAS RAPIDA Y MENOS NPESADA CUAL ES LA VENTAJA DE ESSA RIDICULES DE HTML5 YA LOE STUVE PROBANDO Y ES UN PROBLEMA PARA TODO CREO QUE LOS QUE LO ESTAN APOYANDO SON GAYS TRISTES HAHAAHH EL FLASH NUNCA MORIRA SANCTUS says October 14 2011 at 11 21 am HTML5 IS FUCK GARBAGE HAHAHAH Bob john says October 19 2011 at 3 31 am Pretty cool Might try using this somewhere in my website later when HTML5 is supported by more browsers witek says October 21 2011 at 9 39 pm Works with Opera without any problem full support no crashes very smooth even on my slow computer xuying says October 27 2011 at 7 56 pm xuying says October 27 2011 at 7 57 pm wo bu hui ying wen neng fen yi cheng zhong wen bu HOTSTEAL says November 12 2011 at 10 09 pm It is a wonderful work YoonjuLee says November 16 2011 at 1 26 am Looks great Pedro99 says November 28 2011 at 3 59 am Actually it works pretty fast with the newest version of Opera v 12 00 Yordan says January 10 2012 at 3 21 pm WOW Very Impressive effect Very nice seouk says January 12 2012 at 4 24 am amazing style nice post Www 63 Need Cash Now Com says February 10 2012 at 1 27 pm The change time for open standards for example html 5 is simply too slow and never everybody switches into them exactly the same In the current rate it ll be another ten years before its up to date with expensive with that time we d have managed to move on aluasamen says February 18 2012 at 9 17 am AED AED aluasamen says February 18 2012 at 9 38 am http touch dailymotion com ref bookmark refid 0 Tom says February 21 2012 at 6 37 pm Has anyone got these examples to work on an iphone yet I have money waiting to pay someone if they have Contact me here or at thomasseidl at devitek com Beben Koben says February 23 2012 at 2 58 pm perfecto awesome m web design nepal says March 16 2012 at 5 55 am Wow such a great tutorials dude I was searching for such a awesome tuts Thanks for sharing ghafoor says March 17 2012 at 6 08 am i m going in html6game says March 19 2012 at 1 01 pm This is brilliant anwar says March 20 2012 at 5 56 pm cool video this works in my chrome Hip Hop says March 27 2012 at 7 55 pm awesome Sean Hard code is there live demo from your project Mary Eliason says March 29 2012 at 2 13 am Agreed with you Quite a good post I do love it http 9pillsonline com html6game says April 1 2012 at 5 47 pm Gosh this is not what is the invention you say this is definitely Marc Jacobs outlet says April 9 2012 at 3 01 am I love your stories really much because they are published in an understandable comprehensible So I can study them although I come from Germany and have some problems to translate English stories kelly bag says May 14 2012 at 2 02 am I like a good video Jimmy Choo says May 14 2012 at 5 38 am Your Blog Very Nice Thanks For Share It Thank You jljkl says May 19 2012 at 12 31 am fantastic man Herc says June 7 2012 at 10 40 am Is it possible to have same effect on simple image Rory Sellers says June 12 2012 at 5 15 am Hi Is it possible to use a webcam or IP camera as the video source for what you are doing inside of video and canvas joshmarinacci points to your exploding video in his very nice piece on canvasdeepdive but while he mentions webcams at the beginning of his piece he never goes back to it Please can u help just tell me it s not possible OR if it can be done how do you set up the source for those inputs Thank you very much for any help here Rory Sellers says June 12 2012 at 5 16 am Oops previous post meant to write on his very nice piece on canvasdeepdive but while Rory Sellers says June 12 2012 at 5 17 am Oh sorry I see I am putting canvas into brackets so the input control is filtering it out OK that previous post was supposed to be on his very nice piece on the canvas tag canvasdeepdive but while tour in nepal says June 25 2012 at 4 57 am really nice share Alex says June 27 2012 at 2 36 am Very cool demo like it fotovoltaika says June 30 2012 at 6 52 am Html5 just killed flash i like it JokerXu says July 6 2012 at 4 44 am Its Awesome Herve Leger says July 6 2012 at 6 51 pm mapping it into 3D space means you need more

    Original URL path: http://www.craftymind.com/blowing-up-html5-video-and-mapping-it-into-3d-space/comment-page-2/ (2016-04-27)
    Open archived version from archive

  • AIR | Craftymind | Page 2
    needed to be unhooked with Timers like the HTML component One last tweak to our garbage collection cycle and we were home free private var gcCount int private function startGCCycle void gcCount 0 addEventListener Event ENTER FRAME doGC private function doGC evt Event void flash system System gc if gcCount 1 removeEventListener Event ENTER FRAME doGC setTimeout lastGC 40 private function lastGC void flash system System gc We were now able to successfully garbage collect any objects that have been dereferenced in Flash We had three things we had to look out for in the app now All display objects that added listeners on to model data had to be weakly referenced or they wouldn t be automatically dereferenced This is because our architecture kept model data alive while individual window stages were being destroyed I feel like I should point out that contrary to some beliefs it is not a good idea to apply weak references by default throughout your entire app Trust me when I say that its alot easier to debug an application with memory leaks due to strong listeners then it is to debug an app in which users report random failures because underneath the hood weakly referenced objects are getting accidentally destroyed when the GC kicks in You can never avoid bugs so you should program in a way that makes them consistent to find All asynchronous events needed to be explicitly shut down This included Timers Loaders File and DB transactions Setting these to be weakly referenced is not enough as all asyncronous objects in AS3 register themselves to the Flash player while they are running It is impossible to access objects that have been dereferenced in code but continue to be referenced by the player like a running timer No anonymous closures allowed After all this was taken care of we began to learn that garbage collecting objects in Flash didn t translate so easily to releasing memory back to the OS If you ever look at the memory graph in the Flex debugger and then open up the Task Manger or Activity Monitor to compare memory usage you ll notice a huge disparity between the two FlexBuilder reports only 15mb of AS3 object data AIR private memory really takes up 65mb on the system The difference you re seeing is Object Memory vs Rendering Memory and the bulk of all memory used by the Flash player goes toward rendering Displaying an empty stage in Flash can take up anywhere between 10mb and 20mb depending on the width and height and then it climbs by roughly 4k for each display object attached to the stage This can add up quickly when using the Flex framework where even a simple button uses several display objects What we ultimately found was that even though we could successfully release AS3 objects we couldn t reliably get the Flash player to release render data So an app that started at 20mb would climb to 100mb and when

    Original URL path: http://www.craftymind.com/category/air/page/2/ (2016-04-27)
    Open archived version from archive

  • AIR | Craftymind | Page 3
    has remained just a â œprototypeâ Iâ m finally able to talk openly about the product and the fact that weâ re moving into an official eBay application with a beta program coming soon The beta signup is public now so if your interested in getting involved early on and getting your feedback heard you can sign up over at http www sandimasproject com Iâ m planning on watching the

    Original URL path: http://www.craftymind.com/category/air/page/3/ (2016-04-27)
    Open archived version from archive

  • Sean Christmann | Craftymind | Page 4
    so much in Firefox Firefox doesn t appear to have any hardware acceleration for Ogg decoding so I had to drop the video size in half in order to run at acceptable framerates Even still Firefox chokes pretty badly on my Macbook Pro Update I ve changed the ogg video to be 640 x 360 prepare to see firefox weep Lessons learned There s a couple hints I found out along the way that are good to know if you want to play around with drawing video First you need a bit of hackish code to get this to work effeciently and it flows like this Video playing Draw Video onto Canvas 1 Draw fragments of Canvas 1 onto Canvas 2 Don t ask me why but copying pixel data out of a video tag is expensive so expensive that drawing it into a temporary canvas and then drawing pieces of that temp canvas onto a final canvas is faster then just referencing the video tag repeatedly within the same loop That s why you ll see 2 Canvases in the source code for the demos I m sure there s a technical reason for this duplication process but it s a lazy reason Secondly don t try copying individual pixels around You can still see the remnants of my first code attempt inside the explosion demo with getPixel and setPixel This turned out to be horribly slow and completely unnecessary Canvas drawImage matrix transforms on the canvas space is far more efficient then handcrafted pixel pushing On the other hand pixel manipulation allows you to do things like runtime chroma keying get ready for a new wave of clippy style videos with full transparency popping over websites to help you out Lastly I m learning very quickly that not

    Original URL path: http://www.craftymind.com/author/admin/page/4/ (2016-04-27)
    Open archived version from archive

  • Sean Christmann | Craftymind | Page 9
    AIR March 3 2008 Sean Christmann For eBay Desktop we wrote a simple utility for reading and writing classes directly to disk Using this method we re able to load the users existing data from disk or if its unavailable create a new class with all the defaults First up is the utility class AIRUtils package com effectiveui util import flash filesystem File import flash filesystem FileMode import flash filesystem FileStream public class AIRUtils public static function readFileObject fil File Object var amf Object if fil exists var stream FileStream new FileStream stream open fil FileMode READ amf stream readObject stream close return amf public static function writeFileObject fil File obj Object Object var stream FileStream new FileStream stream open fil FileMode WRITE stream writeObject obj stream close return obj These 2 static methods act as simple helper wrappers to read and write classes out to disk The example class we want to save below looks very similar to the type of class we use inside eBay Desktop package com ebay model import com ebay model SearchPreferences Bindable RemoteClass alias com ebay model UserPreferencesModel public class UserPreferencesModel public static const STANDARD String standard public static const SKINNY String skinny public var logoutOnClose Boolean false public var viewState STANDARD public var globalSearchFilters SearchPreferences new SearchPreferences private var maxHistoryItems uint 1000 public function set maxHistoryItems max uint void maxHistoryItems max public function get maxHistoryItems uint return maxHistoryItems In order to write a class out to disk and read it back in you have to add RemoteClass metadata to it It doesn t matter what the value is it just needs to be unique to the application This provides Flash with an identifier for linking amf data to class definitions when its loaded back in It doesn t matter what value you put

    Original URL path: http://www.craftymind.com/author/admin/page/9/ (2016-04-27)
    Open archived version from archive



  •