<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2512115034711442237</id><updated>2011-12-09T18:38:20.605+01:00</updated><title type='text'>Whizzkids corner</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-6564162136402615523</id><published>2011-04-26T10:10:00.003+02:00</published><updated>2011-04-26T10:16:33.478+02:00</updated><title type='text'>rcBoats</title><content type='html'>Our latest iPad game has been approved and is now for sale on the appstore!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://itunes.apple.com/us/app/rcboats/id432285442?mt=8&amp;ls=1"&gt;rcBoats&lt;/a&gt; for iPad.&lt;br /&gt;&lt;br /&gt;It's a fun little 2 player game where you can boat around in your own virtual pond. &lt;br /&gt;&lt;br /&gt;Game idea, graphics, sound and programming all done by me :)&lt;br /&gt;&lt;br /&gt;Don't forget to give it a (good) review if you pick it up ;)&lt;br /&gt;&lt;br /&gt;Here's some screenshots:&lt;br /&gt;&lt;img src=http://whizzkid.nu/blog/rcboats1.jpg&gt;&lt;img src=http://whizzkid.nu/blog/rcboats2.jpg&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-6564162136402615523?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/6564162136402615523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2011/04/rcboats.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/6564162136402615523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/6564162136402615523'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2011/04/rcboats.html' title='rcBoats'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-5338375298193252719</id><published>2010-12-03T13:45:00.003+01:00</published><updated>2010-12-03T14:32:21.901+01:00</updated><title type='text'>Air for iPhone - loading external .swf files</title><content type='html'>If you are creating apps for iPhone with Air, you might have the need to load external .swf files. &lt;br /&gt;In my case, it was the need to be able to have downloadable content.&lt;br /&gt;I can't really think of another reason why you would want to do this, normally using .swc files is the way to go.&lt;br /&gt;&lt;br /&gt;Anyways..&lt;br /&gt;&lt;br /&gt;When you want to load an .swf file from an Air for iPhone application, there's some things you need to know.&lt;br /&gt;&lt;br /&gt;Your .swf file cannot contain &lt;strong&gt;ANY&lt;/strong&gt; actionscript whatsoever. Symbols in your library must also &lt;strong&gt;NOT&lt;/strong&gt; be exported for Actionscript.&lt;br /&gt;&lt;br /&gt;Adobe's &lt;a href="http://labs.adobe.com/wiki/index.php/Applications_for_iPhone:Developer_FAQ#Can_applications_dynamically_load_SWFs_at_runtime.3F"&gt;documentation&lt;/a&gt; states that the scripting will simply be ignored, but that isn't exactly accurate.&lt;br /&gt;&lt;br /&gt;If your .swf file contains Actionscript, &lt;strong&gt;the entire load will be ignored.&lt;/strong&gt; &lt;br /&gt;Which means you won't receive an Event.COMPLETE or even an IOErrorEvent.IO_ERROR when you try to load the file.&lt;br /&gt;&lt;br /&gt;So, with no symbols exported to actionscript, all you're left with is animation on the timeline. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But I wanted to use it like a kind of library, where you could neatly pack all your graphics and animations and sounds in 1 swf,  load it,  and use the assets in your main program.&lt;br /&gt;&lt;br /&gt;I've created a basic class to help with this.&lt;br /&gt;&lt;a href="http://whizzkid.nu/users.amercom.nl/whizzkid/files/iPhoneStageLibraryTest.zip"&gt;Download StageLibrary with example project (flashdevelop)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This also works for android, but you have to change the path of the swf file.&lt;br /&gt;Convenient if you create apps for android and iPhone that use the same assets.. if you're only creating android apps, you don't have the .swf scripting barrier that Apple enforces and can use library symbols like you usually do.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To create a swf file that will work with this class, create a .fla file of 1 frame in size.&lt;br /&gt;and place all the symbols you want to use on stage and give them an instance name.&lt;br /&gt;&lt;br /&gt;If you want to create a soundclip, make a movieclip, keep frame 1 empty, and place your sound on frame 2, making sure to add enough frames for the duration of the audio. If you don't add the extra frames, you wont be able to detect when the sound stopped playing.&lt;br /&gt;&lt;br /&gt;StageLibrary takes care of loading the swf and collecting all instance names and allows you to quickly 'grab' a clip from stage, to use somewhere else in your app. (You can simply addChild() a clip from the library to your own stage/displayobjectcontainers)&lt;br /&gt;I've also added a function to easily play a sound clip, that also has a callback when the sound is finished. &lt;br /&gt;&lt;br /&gt;You can't reuse an object though, you aren't creating new objects, you're just moving them from stage to your app.&lt;br /&gt;You can put more than 1 instance of a symbol on stage though, just make sure you give them a unique instance name.&lt;br /&gt;&lt;br /&gt;It is also possible to use more than 1 frame in your main movie, but this has the effect of killing all animation of your objects (except for subclips with animations)&lt;br /&gt;&lt;br /&gt;Check out the example project. It should be self explanatory, I even commented the code!&lt;br /&gt;If not, post your questions/remarks here and I'll see what I can do :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks to &lt;a href="http://renaun.com/" target="_blank"&gt;Renaun Erickson&lt;/a&gt;, &lt;a href="http://sebleedelisle.com/" target="_blank"&gt;Seb Lee-Delisle&lt;/a&gt; and Joe Chung. &lt;br /&gt;&lt;br /&gt;Also check out Renaun's blog entry with another loading example which helped me figure out what was wrong &lt;a href="http://renaun.com/blog/2010/11/loading-external-swf-with-packager-for-iphone/" target="_blank"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And finally, for those of you who like to tinker some more:&lt;br /&gt;I've found that you CAN create multiple copies of an object on stage by changing frames of your main animation.  &lt;br /&gt;get a symbol from stage,  go to frame2,  go to frame 1 again,   now you can get that same symbol again, and now you have 2  yaay.&lt;br /&gt;Unfortunately, it screws up the animation in your object, except for subclips.  But it could be useful to know ;)&lt;br /&gt;&lt;br /&gt;Happy coding!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-5338375298193252719?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/5338375298193252719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2010/12/air-for-iphone-loading-external-swf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/5338375298193252719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/5338375298193252719'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2010/12/air-for-iphone-loading-external-swf.html' title='Air for iPhone - loading external .swf files'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-7193465859087517379</id><published>2010-10-22T10:57:00.003+02:00</published><updated>2010-10-22T10:59:08.263+02:00</updated><title type='text'>Raceportal, our 2nd iPhone App</title><content type='html'>Hey people,&lt;br /&gt;&lt;br /&gt;Another quick note to let you know that our 2nd app "Raceportal" has been approved for the appstore and is now available to buy :)&lt;br /&gt;&lt;br /&gt;Check it out here : &lt;a target="_blank" href="http://itunes.apple.com/app/raceportal/id396109306?mt=8"&gt;http://itunes.apple.com/app/raceportal/id396109306?mt=8&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-7193465859087517379?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/7193465859087517379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2010/10/raceportal-our-2nd-iphone-app.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/7193465859087517379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/7193465859087517379'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2010/10/raceportal-our-2nd-iphone-app.html' title='Raceportal, our 2nd iPhone App'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-706939321671923080</id><published>2010-09-14T13:01:00.004+02:00</published><updated>2010-09-14T13:06:50.958+02:00</updated><title type='text'>My first Iphone App</title><content type='html'>&lt;img src="http://webcomicsnl.omg.bs/images/blog/iphoneapppreview.jpg" align=right&gt;Just a quick note to tell you guys that my first Iphone app is now available for free on the itunes appstore.&lt;br /&gt;&lt;br /&gt;&lt;a href=http://tinyurl.com/3a2xuhg&gt;click here to download&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's a webcomic reader for Dutch webcomic artists (some comics can be in English)&lt;br /&gt;&lt;br /&gt;Artists can upload their comics on my website &lt;a href=http://webcomicsnl.omg.bs&gt;webcomicsnl.omg.bs&lt;/a&gt; and get their comics featured in the app :)&lt;br /&gt;&lt;br /&gt;Hope you guys (those of you who have iphone/ipad's or ipod touches) enjoy it :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-706939321671923080?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/706939321671923080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2010/09/my-first-iphone-app.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/706939321671923080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/706939321671923080'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2010/09/my-first-iphone-app.html' title='My first Iphone App'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-8966671293560664318</id><published>2010-08-16T10:08:00.002+02:00</published><updated>2010-08-16T10:18:02.065+02:00</updated><title type='text'>Definefont error</title><content type='html'>Changing the look and feel of a game I developed in FlashDevelop, I suddenly got the following error when trying to compile the project in FlashDevelop:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;WARNING: end of tag DefineFont3 is @55343, should be @58327&lt;br /&gt;Build halted with errors (swfmill)."&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To make a long story short, this was caused by a textfield that didn't embed any characters. Thanks to &lt;a href="http://philippe.elsass.me/" target="_blank"&gt;Philippe&lt;/a&gt; for providing the answer.&lt;br /&gt;&lt;br /&gt;So, If you get this error (the numbers after the @ will probably be different) check your movieclips for textarea's without embedded characters.&lt;br /&gt;&lt;br /&gt;And to make this short story a little longer: (for those of you who are still reading ;)&lt;br /&gt;My problem in finding this was that I used 1 font library, and had all my textarea's set to use that as the font...   &lt;br /&gt;But I still had 2 buttons, with the same font, but not using the font library.&lt;br /&gt;So the error occured when I changed the font in the library. &lt;br /&gt;Now the 2 buttons didn't share a font that other textarea's used, and had characters embedded for them.&lt;br /&gt;&lt;br /&gt;And due to the fact that it wouldn't compile, I couldn't visually verify all textarea's to be the same at runtime.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flashdevelop.org/community/viewtopic.php?f=13&amp;t=7079&amp;start=0" target="_blank"&gt;Click here&lt;/a&gt; to see my thread about it on Flashdevelop.org.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-8966671293560664318?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/8966671293560664318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2010/08/definefont-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/8966671293560664318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/8966671293560664318'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2010/08/definefont-error.html' title='Definefont error'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-4793435120756122926</id><published>2010-07-11T23:45:00.002+02:00</published><updated>2010-07-11T23:47:53.808+02:00</updated><title type='text'>Lightning strikes!</title><content type='html'>I bought a Casio Exilim EX FH-100 camera a while ago because it could shoot video at highspeed.&lt;br /&gt;&lt;br /&gt;Yesterday we had a pretty heavy thunderstorm here in the Netherlands, and it turns out that you can make some pretty nice video shots of lightning with the highspeed camera function. check it out  : &lt;a href=http://tinyurl.com/37gccks&gt;http://tinyurl.com/37gccks&lt;/a&gt; on youtube.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-4793435120756122926?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/4793435120756122926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2010/07/lightning-strikes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/4793435120756122926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/4793435120756122926'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2010/07/lightning-strikes.html' title='Lightning strikes!'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-173532001159082199</id><published>2009-04-08T13:50:00.004+02:00</published><updated>2009-04-08T14:05:39.263+02:00</updated><title type='text'>UPC Racing Game</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_2V50K1aVeV0/SdyTD9R1zQI/AAAAAAAAAH8/dyDJy1XZgjA/s1600-h/speedracerthumb.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 242px;" src="http://3.bp.blogspot.com/_2V50K1aVeV0/SdyTD9R1zQI/AAAAAAAAAH8/dyDJy1XZgjA/s320/speedracerthumb.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5322290555843366146" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Just a quick post today.&lt;br /&gt;&lt;br /&gt;We've just finished working on a racing game in flash for UPC, a big Cable internet company in Holland.&lt;br /&gt;&lt;br /&gt;Technically the game is a nice mix of optimization and user (designer) friendliness.&lt;br /&gt;&lt;br /&gt;My Collegue &lt;a href=http://www.strieder.nl/artwork/ target=_blank&gt;Martin Strieder&lt;/a&gt; was responsible for all the artwork, and I did the all the programming.&lt;br /&gt;&lt;br /&gt;It's Actionscript 2 code (Due to time restrictions and my relative noob-ness in As3)&lt;br /&gt;&lt;br /&gt;The game prerenders all frames to bitmaps for the scenery at runtime during the 'loader' you see after clicking "start". So the artwork in the FLA file are just vectors, no bitmaps, and are easy to modify in the timeline. (which is good for re-use of gfx building blocks)&lt;br /&gt;This gave us a BIG performance boost during the game.&lt;br /&gt;&lt;br /&gt;The opponents have a simple AI to keep the speed up and only do basic avoidance of eachother and the player (if they're behind you)&lt;br /&gt;&lt;br /&gt;Since this is a pretty cpu intensive game, I've also added a framerate watcher, which will turn down the renderquality of flash a notch when it detects a low framerate.&lt;br /&gt;&lt;br /&gt;On my develop and testcomputer (which is a lot slower) this meant that I could keep playing the game at 30 fps.&lt;br /&gt;&lt;br /&gt;&lt;a href=http://www.upc.nl/internet/snel_internet/speedracer/ target=_blank&gt;Click here to play the game&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let me know what you think :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-173532001159082199?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/173532001159082199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2009/04/upc-racing-game.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/173532001159082199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/173532001159082199'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2009/04/upc-racing-game.html' title='UPC Racing Game'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_2V50K1aVeV0/SdyTD9R1zQI/AAAAAAAAAH8/dyDJy1XZgjA/s72-c/speedracerthumb.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-4433845661471845950</id><published>2008-11-19T17:42:00.007+01:00</published><updated>2009-06-18T12:38:59.149+02:00</updated><title type='text'>Opensocial Flash Example</title><content type='html'>&lt;strong&gt;UPDATE 6/18/2009 Hyves does no longer accept parameters in its opensocial xml-url's so the trick I describe below, won't work anymore.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;One of our clients wanted a flash widget to be embedded by OpenSocial.&lt;br /&gt;Try as I might, but I couldn't find a website that gave just a simple example of embedding a flash movie on your page/blog, without trying to communicate with it.&lt;br /&gt;&lt;br /&gt;So I've searched around a bit more and got the code out of some existing widgets and I'm placing it here to maybe help some other people, who are also trying to look for a simple tutorial :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In short, to make a widget for OpenSocial, you need to have an XML file that contains xml and javascript that actually loads and places the widget on the blog/community page you desire.&lt;br /&gt;&lt;br /&gt;I've put up an example XML file &lt;a href="http://tinustekent.whizzkid.nu/files/widget.xml"&gt;Here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Example, Adding it to IGoogle&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;In your Igoogle homepage, click on 'add stuff'&lt;br /&gt;&lt;li&gt;then enter the url to your xmll file there.&lt;br /&gt;For example : http://tinustekent.whizzkid.nu/files/widget.xml&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;If you want to pass through parameters to your widget, you will need to make a script on your webserver which will put the needed parameters into the xml in the flashvars.&lt;br /&gt;Note for &lt;a href=www.hyves.nl target=_blank&gt;Hyves&lt;/a&gt; users, Hyves expects the url to end with &lt;b&gt;.xml&lt;/b&gt;&lt;br /&gt;So it will fail when you put parameters in your url, but this is easily fixed if you just add  &lt;b&gt;&amp;mode=.xml&lt;/b&gt; to your url. &lt;br /&gt;The "mode" name doesnt matter, Hyves only checks the entire url-string to see if it ends with ".xml" :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The xml for this widget (which is a little commercial for my comic site, plug plug):&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="javascript"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" ?&amp;gt; &lt;br /&gt;&amp;lt;Module&amp;gt;&lt;br /&gt;&amp;lt;ModulePrefs title="Square and Circle" title_url="" description="Square and Circle" author="Martijn Croezen" author_email="sacwidget@whizzkid.nu" author_link="http://tinustekent.whizzkid.nu" height="190" width="160" scaling="false" scrolling="false" screenshot="" thumbnail=""&amp;gt;&lt;br /&gt;&amp;lt;Require feature="dynamic-height" /&amp;gt; &lt;br /&gt;&amp;lt;/ModulePrefs&amp;gt;&lt;br /&gt;&amp;lt;Content type="html"&amp;gt;&lt;br /&gt;&amp;lt;![CDATA[ &lt;br /&gt;&lt;br /&gt;&amp;lt;div id="wdiv__MODULE" style="width:190;height:160"&amp;gt;Loading...&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt; function SetWidgetContent(div, content) {&lt;br /&gt;      div.innerHTML = content;&lt;br /&gt;    } &lt;br /&gt;     window.onload = function(evt) {&lt;br /&gt;            var content = '&amp;lt;embed src="http://tinustekent.whizzkid.nu/files/widget.swf" width="190" height="160" quality="high" bgcolor="ffffff" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="" type="application/x-shockwave-flash"&amp;gt;';&lt;br /&gt;            var div = GetDiv();&lt;br /&gt;            if (true)&lt;br /&gt;            {&lt;br /&gt;              SetWidgetContent(div, content);&lt;br /&gt;            }&lt;br /&gt;           _IG_AdjustIFrameHeight();&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt; function SetWidgetContent(div, content) {&lt;br /&gt;      div.innerHTML = content;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function GetDiv() {&lt;br /&gt;        return document.getElementById("wdiv__MODULE");&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  ]]&amp;gt; &lt;br /&gt;  &amp;lt;/Content&amp;gt;&lt;br /&gt;  &amp;lt;/Module&amp;gt;&lt;br /&gt; &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-4433845661471845950?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/4433845661471845950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/11/opensocial-flash-example.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/4433845661471845950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/4433845661471845950'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/11/opensocial-flash-example.html' title='Opensocial Flash Example'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-4662046128538494941</id><published>2008-09-15T16:31:00.004+02:00</published><updated>2008-09-17T13:01:37.536+02:00</updated><title type='text'>We're digital too</title><content type='html'>For those of you who can read Dutch, the tutorial Rob and I wrote for &lt;a href=http://www.webdesignermagazine.nl/ target=_blank&gt;Webdesigner Magazine&lt;/a&gt; has now been posted online on their website.&lt;br /&gt;&lt;br /&gt;&lt;a target=_blank href=http://www.webdesignermagazine.nl/wd-workshop/maak-een-360-panorama-in-silverlight/&gt;Click here to see it.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-4662046128538494941?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/4662046128538494941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/09/were-digital-doo.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/4662046128538494941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/4662046128538494941'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/09/were-digital-doo.html' title='We&apos;re digital too'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-5887438021008584121</id><published>2008-07-22T21:40:00.002+02:00</published><updated>2008-07-22T21:45:03.290+02:00</updated><title type='text'>We're in print</title><content type='html'>Our panocube component is now featured in the dutch Webdesigner magazine (although, it might appear in english too, keep me posted if you find it ;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Rob has a picture up on how it looks :)&lt;br /&gt;&lt;br /&gt;&lt;a href=http://web-snippets.blogspot.com/2008/07/panocube-in-webdesigner-magazine.html target=_blank&gt;Check it out&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=http://www.webdesignermagazine.nl/toon-nummer/toon/web-designer-08/terug-naar/web-designer-magazine-het-magazine-voor-webdesigners/ target=_blank&gt;Get the magazine&lt;/a&gt; if you want the full tutorial!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-5887438021008584121?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/5887438021008584121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/07/were-in-print.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/5887438021008584121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/5887438021008584121'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/07/were-in-print.html' title='We&apos;re in print'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-4168012538562007314</id><published>2008-07-15T09:47:00.004+02:00</published><updated>2008-07-15T10:00:22.843+02:00</updated><title type='text'>360 degree Panorama tutorial</title><content type='html'>I've been asked how I made the pictures for the &lt;a href=http://whizzkid74.blogspot.com/2008/06/panoramacube-for-silverlight-2beta2.html&gt;PanoCube&lt;/a&gt;, so I've thrown together a short tutorial.&lt;br /&gt;&lt;br /&gt;For the example image in the panocube demo I used a tripod and a normal digital camera on which I could lock the exposure time. &lt;br /&gt;&lt;br /&gt;This is important because ground and air, or if you’re inside, the walls and windows/lights, differ quite a lot there.&lt;br /&gt;&lt;br /&gt;If your camera automatically adjusts the exposure, the stitcher tool will have a hard time understanding this. (Autostitch doesn't handle this too well, autopanopro is more powerful in this respect, but if you can use the same exposure for every picture, you'll get better results)&lt;br /&gt;&lt;br /&gt;Take pictures, rotating the camera a little after each one, make sure you have about 1/3 or 1/4  overlap with the previous picture. It takes me about 30 pictures to make 1 rotation.&lt;br /&gt;&lt;br /&gt;When you’ve done a 360 degree turn,  tilt the camera up a little (again 1/3 or 1/4 overlap), make pictures all around and repeat until you’re pointing all the way up.  &lt;br /&gt;Go back to the very first position and repeat that again, but this time tilting the camera down every round.&lt;br /&gt;&lt;br /&gt;After you’re done, stitch them together with autostitch (free &lt;a href=http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html target=_blank&gt;http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html&lt;/a&gt; ) or autopano pro (better than autostitch, but not free &lt;a href=http://www.autopano.net/ target=_blank&gt;http://www.autopano.net/&lt;/a&gt;) this will save the file as pano.jpg.&lt;br /&gt;Be sure to set the rendering options (resolution etc) before you load the pictures, because autostitch will start rendering immediately)&lt;br /&gt;&lt;br /&gt;When the stitcher has finished, you’re got yourself a nice 360 degree panorama image. (Autostitch doesn't ask for a filename to render to, it will just create 'pano.jpg' in the same folder as where your original pictures are)&lt;br /&gt;You can use this picture as-is in most panorama viewers (like PTViewer) but for our Silverlight Panocube, we need cubic projection images.&lt;br /&gt;&lt;br /&gt;Don’t worry too much if you’ve got ‘holes’ in your picture right now, they’re hard to fix in this format.&lt;br /&gt;&lt;br /&gt;As said, we need to convert it to a cubic projection format. I did this using Bixorama, you can download a trial here &lt;a href=http://www.outerspace-software.com/bixorama.html target=_blank&gt;http://www.outerspace-software.com/bixorama.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In bixorama, import the pano.jpg file as a ‘latitude longtitude’ file.&lt;br /&gt;Press f6, or ‘view – single files’ and you should see the 6 sides of the cube.&lt;br /&gt;Export these as ‘single files’  and you’re done.&lt;br /&gt;The exported files are easier to fix if you have holes because now there’s no spherical distortion. &lt;br /&gt;&lt;br /&gt;You can use these images in the example provided in the panocube post.&lt;br /&gt;&lt;br /&gt;Have fun, and let me know what you think.&lt;br /&gt;I'd love to see some examples of what you guys are doing with &lt;a href=http://whizzkid74.blogspot.com/2008/06/panoramacube-for-silverlight-2beta2.html&gt;PanoCube&lt;/a&gt; :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-4168012538562007314?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/4168012538562007314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/07/360-degree-panorama-tutorial.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/4168012538562007314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/4168012538562007314'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/07/360-degree-panorama-tutorial.html' title='360 degree Panorama tutorial'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-5223477504863435644</id><published>2008-06-19T17:18:00.002+02:00</published><updated>2008-06-19T17:26:33.556+02:00</updated><title type='text'>Panoramacube for Silverlight 2beta2</title><content type='html'>&lt;a href=http://web-snippets.blogspot.com&gt;Rob&lt;/a&gt; and I have cleaned up the Panorama viewer code and made it into a Silverlight Component which can now be easily used in your projects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The antialias lines have been removed using overlapping, which I've wanted to do for my first version, but hadn't gotten it right quite yet.&lt;br /&gt;&lt;br /&gt;After seeing that &lt;a href=http://www.planet-xaml.net/ target=_blank&gt;Florian Krüsch&lt;/a&gt; pulled it off in his texture triangle control,  I decided to give it another try myself and it worked!&lt;br /&gt;&lt;br /&gt;Also added are camera and zoom functions so you can control the panorama from c#&lt;br /&gt;&lt;br /&gt;&lt;a href=http://www.codeplex.com/PanoCube target=_blank&gt;Go to the project page on Codeplex&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=http://www.amercom.nl/showcase/silverlight/panoramacube2/PanoramaCubeTestPage.html target=_blank&gt;View the example if you have Silverlight 2beta2 installed.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-5223477504863435644?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/5223477504863435644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/06/panoramacube-for-silverlight-2beta2.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/5223477504863435644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/5223477504863435644'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/06/panoramacube-for-silverlight-2beta2.html' title='Panoramacube for Silverlight 2beta2'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-3665188439357018537</id><published>2008-05-30T16:15:00.003+02:00</published><updated>2008-05-30T16:25:47.286+02:00</updated><title type='text'>Involuntary language change in FlashDevelop</title><content type='html'>This is more of a reminder for myself, but can be useful if you're a non-english developer who uses FlashDevelop :)&lt;br /&gt;&lt;br /&gt;Due to some networking updates, I had to update my FlexSdk3 to the nightly build.&lt;br /&gt;After installing however, the compiler errormessages I got in FlashDevelop suddenly where partially Dutch instead of English.&lt;br /&gt;&lt;br /&gt;It was quite a horrible combination and so I needed to change it back to English badly, but unfortunately could find no documentation about it.&lt;br /&gt;&lt;br /&gt;After asking on &lt;a href=http://www.adobeforums.com/webx/.59b54d64/4 target=_blank&gt;Adobe forums&lt;/a&gt; the answer was provided:&lt;br /&gt;&lt;br /&gt;Change the jvm.config file and alter the line java.args line to this:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="javascript"&gt;&lt;br /&gt;java.args=-Xmx384m -Dsun.io.useCanonCaches=false -Duser.language=en -Duser.country=US &lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-3665188439357018537?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/3665188439357018537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/05/involuntary-language-change-in.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/3665188439357018537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/3665188439357018537'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/05/involuntary-language-change-in.html' title='Involuntary language change in FlashDevelop'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-2379620500534715773</id><published>2008-05-22T00:52:00.006+02:00</published><updated>2010-06-10T15:26:48.332+02:00</updated><title type='text'>3 x 3 ledcube simulator</title><content type='html'>A friend of mine is making a 3x3 ledcube (&lt;a href=http://video.google.nl/videoplay?docid=-764443478703123180&amp;q=led+cube&amp;ei=U6g0SPSdDI7eiQKWzbjXCQ&amp;hl=nl target=_blank&gt;see video&lt;/a&gt;) and asked me to write a little routine to do a snake in a 3x3x3 matrix.&lt;br /&gt;&lt;br /&gt;I came up with a quick 'n dirty random snake routine, which is kinda like the routine I used for my &lt;a href=http://whizzkid74.blogspot.com/2008/02/3d-cube-space.html  target=_blank&gt;3d cube demo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To see what it looks like, I've also thrown together a little 3x3 led emulator :)&lt;br /&gt;&lt;a href=http://whizzkid.nu/users.amercom.nl/whizzkid/files/ledcube.html target=_blank&gt;3x3 ledcube snake&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And you can check out the source if you want (nothing fancy) &lt;a href=http://whizzkid.nu/users.amercom.nl/whizzkid/files/ledcube.fla&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-2379620500534715773?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/2379620500534715773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/05/3-x-3-ledcube-simulator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/2379620500534715773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/2379620500534715773'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/05/3-x-3-ledcube-simulator.html' title='3 x 3 ledcube simulator'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-9193029084416295555</id><published>2008-05-02T10:58:00.010+02:00</published><updated>2010-06-10T15:19:13.426+02:00</updated><title type='text'>Render to Texture, or Texture baking in 3dStudio max for Papervision3d</title><content type='html'>Here's a small tutorial on how to Bake a texture in 3d studio Max (2009) for use with papervision3d.&lt;br /&gt;&lt;br /&gt;&lt;a target=_blank href=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/bin/test1.htm&gt;Show the result&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First off, let me state that I am not particularly skilled in 3dMax, I'm more of a lightwave person myself, but since Lightwave cannot produce content I can use in Papervision, 3dMax it is :)&lt;br /&gt;&lt;br /&gt;This tutorial shows you how to do Texture baking very basically. It doesn't go into Mental Ray or Vray. It's just to show you how its done, so you can use it as a starting point for more detailed experimentation :)&lt;br /&gt;&lt;br /&gt;I'll sum up the steps I do to make objects, light them and render them to texture. I've tried to use Mental ray and Vray too, but today for some reason 3dMax only wishes to spit out completely white texture maps, while it displays them correctly in the render preview window.&lt;br /&gt;&lt;br /&gt;We'll be exporting our scene as a .3ds file, because I've tried using Collada export (using http://www.feelingsoftware.com/ 's Collada exported. But as soon as I started baking textures, my scenes won't render correctly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1 - make your model&lt;/b&gt;&lt;br /&gt;&lt;a target=_blank href=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking1.png&gt;&lt;img src=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking1.jpg&gt;&lt;/a&gt;&lt;br /&gt;I've created 3 boxes and an omni light. In this Tutorial I haven't given them a material, this will be automatically done when we're baking the texture. You can do this manually as well if you wish.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2 - Set the filetype to PNG&lt;/b&gt;&lt;br /&gt;You can skip this step if your 3dMax already renders to PNG, or if you like using .TGA's and arent using Papervision3d :)&lt;br /&gt;&lt;br /&gt;In my setup, 3dMax automatically renders all files as Targa (.tga), but I want to use PNG's which Papervision can read so we need to change this.&lt;br /&gt;&lt;br /&gt;I use the following method. &lt;br /&gt;1 - select only 1 object in the scene.&lt;br /&gt;2 - open the "Render to Texture" dialog (press 0)&lt;br /&gt;3 - under "Output" Delete any entries if present.&lt;br /&gt;4 - ADD a "Diffuse map"&lt;br /&gt;5 - click on the dots-button to the right of "File name and Type"&lt;br /&gt;6 - Select a filename, and select PNG as a filetype.&lt;br /&gt;7 - After the file dialog is closed, you'll see that the file extension is .png now.&lt;br /&gt;8 - Delete the output entry again, 3dMax will now save .png's as default when you create new Output maps.&lt;br /&gt;&lt;br /&gt;In my case, 3dMax only goes back to saving .tga's after the program has quit/crashed and has been restarted. So If you clear your scene, and render to texture again, the output should still be .png  and you can skil this step.&lt;br /&gt;&lt;br /&gt;If there's a setting somewhere where you can change this in 3dMax, please let me know :)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3 - Render to Texture dialog&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Select all your objects on stage and press the 0 key, or use the menu "Rendering - Render to Texture" to bring up the "Render to texture" Dialog.&lt;br /&gt;Here you can select where your textures will be saved.&lt;br /&gt;Because you selected all your objects, they should all appear in the "Objects to bake" tab. If the list is empty, you apparantly havent selected any objects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Make sure "Use Automatic unwrap" is selected. You can also use manually created UV-mappings if you wish (Make sure to set it to the correct channel if you do), but this example has no UVmapping yet, so we'll leave this to Automatic.&lt;br /&gt;&lt;a target=_blank  href=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking2.png&gt;&lt;img src=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking2.jpg&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 4 - Selecting which type of map&lt;/b&gt;&lt;br /&gt;Make sure "All selected" is checked, because we want to make a map for every object in the scene.&lt;br /&gt;Click on the ADD button, and select "Diffuse map"&lt;br /&gt;&lt;br /&gt;Since we'll be exporting to .3ds, you need to know that 3dMax automatically renames texture filenames to a 8.3 filename type. So that means 8 characters for the filename, 3 for the extention.&lt;br /&gt;This is a problem, because our baked textures arent limited to that specification and will happily render out to filenames that won't fit in this scheme.&lt;br /&gt;Result : Your 3ds file will want to open  box01Dif.png while your texture was rendered to box01DiffuseMap.png.&lt;br /&gt;&lt;br /&gt;To fix this we do the following :&lt;br /&gt;1 - Make sure your object names are smaller than 8 characters.&lt;br /&gt;2 - In the "Selected Element Common Settings"-tab, clear the "DiffuseMap" from the 'Name' inputbox.&lt;br /&gt;&lt;br /&gt;&lt;a target=_blank  href=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking3.png&gt;&lt;img src=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking3.jpg&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So your window should look like this:&lt;br /&gt;&lt;a target=_blank  href=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking4.png&gt;&lt;img src=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking4.jpg&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Select the map size you want, we'll use 256x256 in this tutorial.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 5 - preparing the render&lt;/b&gt;&lt;br /&gt;Select  "Output into Source" and "Keep Source Materials"&lt;br /&gt;&lt;br /&gt;This will replace the material of your objects when you bake the textures. We need this because we'll be exporting this scene, with the baked materials for Papervision.&lt;br /&gt;&lt;br /&gt;Also select "Lighting" and "Shadows" in the "Selected Elements Unique setting" tab.&lt;br /&gt;This will enable the texture to be rendered with, you guessed it, shadows and lighting :)&lt;br /&gt;&lt;br /&gt;&lt;a target=_blank  href=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking5.png&gt;&lt;img src=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking5.jpg&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 6 - Render the texture&lt;/b&gt;&lt;br /&gt;This is the easiest step.&lt;br /&gt;Click on "Render" and wait for 3dMax to finish.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 7 - Export to a .3ds file.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;All done in 3dMax,  if you take a look at your Materials editor, you can see that the materials now contain texturemaps with lighting and shadows.&lt;br /&gt;If you dont see your materials, select an object in your scene and click on the eyedropper button to get the material from the object.&lt;br /&gt;&lt;br /&gt;&lt;a target=_blank  href=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking6.png&gt;&lt;img src=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/baking6.jpg&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Finished.&lt;br /&gt;You can now load your .3ds file into your Papervision flash, make sure it knows where to find the texture images, and it should work.&lt;br /&gt;&lt;br /&gt;I've included a small example, made with FlashDevelop.&lt;br /&gt;&lt;a target=_blank  href=http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20080502/bakedTutorial.rar&gt;Click here to download it&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I've found an error/missing feature in the 3dsParser in papervision. Apparantly a "LOAD_COMPLETE" event was missing from the 3dsParser, so I've added that.&lt;br /&gt;&lt;br /&gt;To do this, edit org.papervision3d.objects.parsers.Max3DS.as&lt;br /&gt;&lt;pre class="jscript" name="code"&gt;&lt;br /&gt;and change the OnFileLoadComplete function to : &lt;br /&gt;&lt;code&gt;&lt;br /&gt; private function onFileLoadComplete(event:Event=null):void&lt;br /&gt;  {&lt;br /&gt;   var loader:URLLoader = event.target as URLLoader;&lt;br /&gt;  &lt;br /&gt;   parse(ByteArray(loader.data));&lt;br /&gt;   // added by whizzkid&lt;br /&gt;   var fileEvent:FileLoadEvent = new FileLoadEvent( FileLoadEvent.LOAD_COMPLETE, filename );&lt;br /&gt;   this.dispatchEvent( fileEvent );&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And if you're not using FlashDevelop, manually add the following import as well:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import org.papervision3d.events.FileLoadEvent;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I've included this file in my example.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is my first tutorial ever, so please let me know what you think about it, and if you find an error or have any suggestions, leave a message :)&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Martijn&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-9193029084416295555?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/9193029084416295555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/05/render-to-texture-or-texture-baking-in.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/9193029084416295555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/9193029084416295555'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/05/render-to-texture-or-texture-baking-in.html' title='Render to Texture, or Texture baking in 3dStudio max for Papervision3d'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-483522722271766615</id><published>2008-04-03T10:59:00.007+02:00</published><updated>2008-04-03T17:18:29.361+02:00</updated><title type='text'>Texturemapping in Silverlight 2beta1</title><content type='html'>&lt;a href=#panoviewer&gt;Click here if you want to see the example and skip my development log :) &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A while ago I was asked the following: "Can you make a 360 degree panorama viewer in Silverlight?"&lt;br /&gt;Naively I answered: "I think so, I have the sourcecode for a texturemap routine in Flash, and that should be reusable in Silverlight"&lt;br /&gt;&lt;br /&gt;Sounded easy enough, but unfortunately I was wrong.&lt;br /&gt;&lt;br /&gt;My colleague &lt;a target=_blank href=http://web-snippets.blogspot.com&gt;Rob Houweling&lt;/a&gt; helped me get started in Silverlight and helped me out when I got Stuck in C# and I set off to work in Silverlight 1.1a&lt;br /&gt;&lt;br /&gt;Now Flash does not support texturemapping, but you can fake this with some clever routines. &lt;a target=_blank href=http://www.sebleedelisle.com/?page_id=7&gt;Seb Lee-Delisle explains how this works visually&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have Flash &lt;a target=_blank href=http://www.flashsandy.org/blog/distordimage-the-way-to-distord-bitmaps-by-code.html&gt;sourcecode&lt;/a&gt; that does just that. This code unfortunately uses 2 matrix calculations, Matrix.invert and a concatenate function which simply arent supported in Silverlight.&lt;br /&gt;(Hmm, I also just discovered that there's a &lt;a href=http://www.flashsandy.org/blog/distortimage-20-the-fastest-way-to-freely-distort-image-with-flash-in-actionscript.html&gt;newer version&lt;/a&gt; of this class which does not use these calculations, and could have saved me a lot of work.. ahwell, live and learn.. Anyway, it still uses 2 matrices though)&lt;br /&gt;&lt;br /&gt;After porting the code and adding my own invert functions, I discovered that the matrix transformations in Silverlight had a big bug. When using the exact same matrix that Flash uses, Silverlight didn't draw the transformation correctly, It seemed that matrix accuracy was completely incorrect. Using Javascript and silverlight, you apparantly don't have this problem. See &lt;a href=http://www.markdawson.org/Kit3D target=_blank&gt;Kit3d&lt;/a&gt;. But Javascript is a lot slower than c# so that was not an option.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Did you ever notice that several people started working on 3d engines in c#, got as far as flat-shading and then development halted? I think this is because of this lame Matrix-problem..:)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Anyway, we decided to wait 2 weeks until the release of Silverlight 2.0.&lt;br /&gt;Now the matrix worked properly and I continued work on the texture mapper.&lt;br /&gt;Unfortunately I couldn't get the function to work with 2 matrices. All the output was simply wrong. So I decided to try again and see if I could write the same code with only 1 matrix (inverting + concatenating 2 matrices also results in 1 matrix, so this should work)&lt;br /&gt;&lt;br /&gt;I found some code that did exactly that, but the code was next to unreadable and had a weird coordinate space that was unusable for me so I simplified the heck out of it and modified it to suit my needs.&lt;br /&gt;That worked!&lt;br /&gt;&lt;br /&gt;I now had the correct output. &lt;br /&gt;&lt;br /&gt;I could split up my texture in triangles, and plot them back to the screen, as long as I didn't rotate anything.&lt;br /&gt;Which is not quite right.&lt;br /&gt;&lt;br /&gt;This had to do with the way Silverlight draws out transformed bitmaps, it uses the topmost and leftmost pixel coordinate to start. Flash uses the first pixel you draw in your shape.&lt;br /&gt;&lt;br /&gt;Luckily this was solveable by checking for this location and changing the texture's offset.&lt;br /&gt;&lt;br /&gt;After this was done, creating a panorama viewer (a 3d cube with an observer in the middle) was quite easy.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a name=panoviewer&gt;Online Example&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;So Ladies and Gentlemen, without further ado I now present: &lt;br /&gt;&lt;br /&gt;The (to our knowledge) &lt;b&gt;first&lt;/b&gt; 3d texturemapper in Silverlight using C#&lt;br /&gt;&lt;br /&gt;&lt;a target=_blank href=http://www.amercom.nl/showcase/silverlight/panoramacube/PanoramaCubeTestPage.html&gt;Panorama viewer in Silverlight 2.0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You need Silverlight 2beta1 &lt;a href=http://silverlight.net/GetStarted/default.aspx target=_blank&gt;get it here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I've also put up the sourcecode &lt;a href=http://www.amercom.nl/showcase/silverlight/panoramacube/PanoramaCube.rar&gt;here.&lt;/a&gt;&lt;br /&gt;(Mind you, the code is quite messy and not optimised.)&lt;br /&gt;&lt;br /&gt;Please let me know what you think. &lt;br /&gt;&lt;br /&gt;And to all 3d-engine coders out there,  go on,  add texturemapping!&lt;br /&gt;(and fix my code, because its probably crap ;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;One problem still remains as you can see in the panorama viewer. Silverlight insists on anti-aliasing. This Cannot be switched off. So we're stuck with ugly white-ish lines around every triangle we draw.&lt;br /&gt;&lt;br /&gt;I've tried fixing this by making the triangles overlap slightly, but havent pulled it off quite right, it distorts the rendered image, so I gave up that attempt.&lt;br /&gt;&lt;br /&gt;Microsoft, please fix this, it's annoying.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Martijn&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-483522722271766615?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/483522722271766615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/04/texturemapping-in-silverlight-20b.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/483522722271766615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/483522722271766615'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/04/texturemapping-in-silverlight-20b.html' title='Texturemapping in Silverlight 2beta1'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-2911553445659682257</id><published>2008-02-25T23:10:00.005+01:00</published><updated>2010-06-10T15:25:41.594+02:00</updated><title type='text'>3d Cube Space</title><content type='html'>&lt;a href=http://whizzkid.nu/users.amercom.nl/whizzkid/files/3dCubespace.htm&gt;Here's&lt;/a&gt; my second &lt;a target=_blank href=http://www.papervision3d.org&gt;Papervision3d&lt;/a&gt; routine.&lt;br /&gt;&lt;br /&gt;This is actually the first time since school that I used linked lists. wow.&lt;br /&gt;My first attempt had a garbage collection problem, in that it didn't garbage collect, so the memory usage just kept growing, eventhough Flashplayer should've kept it in check.  Gotta dive deeper into that, cuz this stuff is fun :)&lt;br /&gt;&lt;br /&gt;I've solved it by recycling the objects in my list, works fine and is probably not as memory-fragmenting as the 'correct way'...&lt;br /&gt;&lt;br /&gt;It's probably been done before, you know,  snake, but now in 3d- whee... But it has not yet been done by me, unil now. :P&lt;br /&gt;&lt;br /&gt;&lt;a href=http://whizzkid.nu/users.amercom.nl/whizzkid/files/3dCubespace.htm&gt;Click to view&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Oh yeah, I've made this using &lt;a target=_blank href=http://flashdevelop.org&gt;FlashDevelop&lt;/a&gt;, and I like it, so I'm gonna use it more in the future :)&lt;br /&gt;&lt;br /&gt;Let me know what you think&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-2911553445659682257?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/2911553445659682257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/02/3d-cube-space.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/2911553445659682257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/2911553445659682257'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/02/3d-cube-space.html' title='3d Cube Space'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-2024250335392592418</id><published>2008-02-21T11:59:00.003+01:00</published><updated>2010-06-10T15:29:53.189+02:00</updated><title type='text'>Papervision test</title><content type='html'>For some reason I'm really crap at finding documentation about stuff online.&lt;br /&gt;&lt;br /&gt;So it took me a while to download Papervision3d, and get started, but as soon as I got the sources installed I was ready to go to mess around a bit, and finally make this little test.&lt;br /&gt;&lt;br /&gt;&lt;a href=http://whizzkid.nu/users.amercom.nl/whizzkid/files/papervisiontest1/&gt;Simple papervision scene navigation&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can navigate around the scene using the cursor keys,  press shift and left-right for strafing, and if you press space you go up :)&lt;br /&gt;&lt;br /&gt;Unfortunately, after I made this, I found out that the source I downloaded from the papervision site was the OLD version of papervision.  V1.5 or something, while 2alpha was already out. But for some reason, not available on the papervision site itself.&lt;br /&gt;&lt;br /&gt;Or.. i was just looking in the wrong spot?&lt;br /&gt;&lt;br /&gt;Anyway, I had to download the new version from &lt;a href=http://www.unitzeroone.com/blog/papervision3d/papervision3d_20_public_alpha.html target=_blank&gt;Ralph's blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Haven't been able to mess with it yet though, hopefully soon :)&lt;br /&gt;&lt;br /&gt;I've setup &lt;a href=http://www.flashdevelop.org/ target=_blank&gt;FlashDevelop&lt;/a&gt; at home now, which looks promising, but haven't gotten round to using it yet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-2024250335392592418?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/2024250335392592418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/02/papervision-test.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/2024250335392592418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/2024250335392592418'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/02/papervision-test.html' title='Papervision test'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-801059047902150241</id><published>2008-02-07T10:37:00.000+01:00</published><updated>2008-02-07T11:19:03.079+01:00</updated><title type='text'>int bug</title><content type='html'>I found a little bug in actionscript 2, which apparantly has been fixed in actionscript 3 but which I found funny enough to show you guys.&lt;br /&gt;&lt;br /&gt;Trying to fix a bug in an older source, where I took part of a symbolname "Button037", and cut out the 035 part as a substring,  which I then used to flip to some page in a pageflipper component.&lt;br /&gt;After the pageflipper bugged out (trying to add 5  to "037" which ended up with "0375" instead of 37 ..duh, I know) I put an int() around the value I got from the symbol name. &lt;br /&gt;(Never having looked at the manual entry for int() but beeing used to its function from ASP/vbscript, I didn't know it was deprecated and I should use Math.floor() instead ...lesson learned :)&lt;br /&gt;&lt;br /&gt;Anywho. &lt;br /&gt;&lt;br /&gt;Whats the bug you ask?&lt;br /&gt;Well.. If you use int()  to convert a string to a number,  it doesn't always work correctly in actionscript 2.0 if you have leading zero's.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;trace(int("037"));  returns 31  for example&lt;/code&gt;&lt;br /&gt;I plotted the values out in a graph to see if there was some kind of pattern to it, and there was. &lt;a target=_blank href=http://users.amercom.nl/whizzkid/files/int_bug.swf&gt;Click here to see it&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Sourcecode for that is:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;_root.lineStyle(1,0x000000);&lt;br /&gt;for (intT=0; intT&lt;400; intT++)&lt;br /&gt;{&lt;br /&gt; trace(intT + " : " + int("0" + intT));&lt;br /&gt; _root.moveTo(intT,0);&lt;br /&gt; _root.lineTo(intT, int("0" + intT));&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Anyway.. it's fixed in actionscript 3, and you shouldn't use int() anyway, but hey, it might come in handy to know this if you're still using int() in your code, and it doesnt work the way it should :)&lt;br /&gt;&lt;br /&gt;&lt;B&gt;Edit&lt;/b&gt; : My Collegue Hugo asked if Number() had the same bug.  Apparantly it does, BUT. its not what I thought it was.&lt;br /&gt;&lt;br /&gt;When you use Number() to convert a string to a number, you can use a leading zero to indicate you're using an OCTAL value just like 0x denotes a hexadecimal value.&lt;br /&gt;&lt;br /&gt;So the bug actually isn't that int() works incorrectly,  but that the manual doesn't say that you can use a leading 0 to indicate an octal value.&lt;br /&gt;So why does it seem to be 'fixed' in as3.0? Well, you can use octal notation in as2.0,  but this doesnt work anymore in as3.0.&lt;br /&gt;&lt;br /&gt;Not sure why anyone would want to use octal notation, but to prove this, try this little example in as3.0 and as2.0&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;for (var intT=00; intT&lt; 020; intT++)&lt;br /&gt;{&lt;br /&gt;trace(intT);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;as2.0 will count to 15&lt;br /&gt;as3.0 will count to 19&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-801059047902150241?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/801059047902150241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/02/int-bug.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/801059047902150241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/801059047902150241'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/02/int-bug.html' title='int bug'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-5686056959198192400</id><published>2008-02-02T01:02:00.001+01:00</published><updated>2010-06-10T15:26:11.675+02:00</updated><title type='text'>Water ripple source</title><content type='html'>Here's the sourcecode for the water ripple effect.&lt;br /&gt;Let me know what you think.&lt;br /&gt;&lt;br /&gt;&lt;a href=http://whizzkid.nu/users.amercom.nl/whizzkid/files/blockParticles.rar&gt;Download source&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-5686056959198192400?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/5686056959198192400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/02/water-ripple-source.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/5686056959198192400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/5686056959198192400'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/02/water-ripple-source.html' title='Water ripple source'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-1023934519111665776</id><published>2008-01-31T11:35:00.000+01:00</published><updated>2008-01-31T11:39:10.905+01:00</updated><title type='text'>Comment mails</title><content type='html'>I thought I had turned on the 'send me an email when someone comments'  but I hadn't. Silly me.&lt;br /&gt;&lt;br /&gt;(Not that a lot of people comment on my posts yet... hint hint. ;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, sorry pCreate, I didn't see your comment until now. But I will post the sourcecode for the water-ripple when I get home tonight :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-1023934519111665776?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/1023934519111665776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/01/comment-mails.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/1023934519111665776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/1023934519111665776'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/01/comment-mails.html' title='Comment mails'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-1872461209635754712</id><published>2008-01-26T15:55:00.001+01:00</published><updated>2010-06-10T15:29:17.365+02:00</updated><title type='text'>Particle Fun</title><content type='html'>Using particles is fun, I've started working on my own Particle class for as2.0 (WHY as2.0 ?  well, we have fidgety customers who still demand flashmovies in flash 8 or even flash 7 or 6 to be published by us :( )&lt;br /&gt;&lt;br /&gt;Instead of the usual fireworks, sparks, explosions, clouds, etc, I've put together a small pseudo-game that was only meant for my collegues to show what other stuff you can do with particls. I've created a small game with it.&lt;br /&gt;&lt;br /&gt;What it does :&lt;br /&gt;- star particles, that move according to the relative position of the mouse compared to the middle of the screen. And that stretch to fake a motion-blur effect as they go faster. &lt;br /&gt;- fake depth,  slower stars are less bright. &lt;br /&gt;- asteroid particles, which are the same as star-particles, but they dont rotate and stretch.&lt;br /&gt;- missile - a plain particle with movement that gets shot out from the spaceship when you press the mousekey.&lt;br /&gt;- spaceship - asteroid collision detection... hit an asteroid, and boom. your ship will explode in a fiery explosion... well it would have, if i had any graphics skills ;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What it does NOT do:&lt;br /&gt;- garbage collection.  leave the movie on too long and it will just slow down your system :)&lt;br /&gt;- the missile is just for show, it wont hit anything,  and the movement is not correct. To have 'working' missiles you'd need to make the coordinates and speed in 'particle space' relative to the spaceship,  take velocity into account etc... this is just a particle that moves like a rocket... as long as you dont turn away after you've fired :P&lt;br /&gt;- no score or anything.&lt;br /&gt;- 'tis just a particle demo.&lt;br /&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="300" height="200" id="particle_Test" align="middle"&gt;&lt;br /&gt; &lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt; &lt;param name="allowFullScreen" value="false" /&gt;&lt;br /&gt; &lt;param name="movie" value="http://whizzkid.nu/users.amercom.nl/whizzkid/files/particle_Test.swf" /&gt;&lt;param name="quality" value="high" /&gt;&lt;param name="bgcolor" value="#000000" /&gt; &lt;embed src="http://whizzkid.nu/users.amercom.nl/whizzkid/files/particle_Test.swf" quality="high" bgcolor="#000000" width="300" height="200" name="particle_Test" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /&gt;&lt;/embed&gt;&lt;br /&gt; &lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-1872461209635754712?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/1872461209635754712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2008/01/particle-fun.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/1872461209635754712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/1872461209635754712'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2008/01/particle-fun.html' title='Particle Fun'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-650096513595336475</id><published>2007-12-15T00:36:00.001+01:00</published><updated>2010-06-10T15:28:38.454+02:00</updated><title type='text'>Iso, Particle, easing and water</title><content type='html'>I've wanted to do some AS3 stuff, never got round to do it yet so I finally set down and created this little thing.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://whizzkid.nu/users.amercom.nl/whizzkid/flash/blog/20071215/blocks.html" target=_blank&gt;Click to view&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It shows 5000 little isometric bar-type thingies. and if you click and drag on them, they will simulate water ripples.&lt;br /&gt;The bars ease to the ripple-data to make it all wobble around a bit smoother then by just using the ripple effect.&lt;br /&gt;&lt;br /&gt;There's some bugs if you splash around too much at the top and bottom, but I couldn't be arsed to fix it. I'm coding this with my laptop actually on my lap, and its not the most convenient way to code thats for sure :)&lt;br /&gt;Let me know what you think.&lt;br /&gt;&lt;br /&gt;I got the water ripple routine from &lt;a href=http://www.gamedev.net/reference/articles/article915.asp target=_blank&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-650096513595336475?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/650096513595336475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2007/12/iso-particle-easing-and-water.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/650096513595336475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/650096513595336475'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2007/12/iso-particle-easing-and-water.html' title='Iso, Particle, easing and water'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-2224121640424935546</id><published>2007-11-21T00:58:00.001+01:00</published><updated>2007-11-21T01:21:01.640+01:00</updated><title type='text'>A Game with Balls</title><content type='html'>&lt;p&gt;For a new type of Prodent toothpaste, we've made a game where you walk around a club/disco trying to pick up girls or guys (yes, we're gay-friendly :) &lt;/p&gt;&lt;p&gt;Your breath smells, because you didn't brush your teeth, whenever you touch someone, they pass out from your death-breath and you lose a life. But when you pick up a tube of toothpaste, or a Menthol-ball (ahh.. 'a game with Balls' now I get it) then you can approach the guys or gals and 'score' but be careful, your fresh-breath only lasts a small amount of time.&lt;/p&gt;&lt;p&gt;Everytime you score, more characters come into the club, so the place just keeps on getting busier.&lt;/p&gt;&lt;p&gt;The characters in the game move around the club semi-randomly, with a very simple route-planning logic.&lt;/p&gt;&lt;p&gt;Basically, they pick a random direction and distance to walk to, then check if that trip is actually reachable (no obstacles in between), and if it is, walk to the new location.&lt;/p&gt;&lt;p&gt;I've used a bitmap to also guide the characters around the club, and made them follow this path roughly 'most of the time' while sometimes they pick a completely random destination. This way you don't get characters walking around the club in the same way all the time.&lt;br /&gt;In this bitmap, I colored the pixels in a certain way, using the Blue value to tell the characters where they should move (or color 0 = not allowed to be here)&lt;/p&gt;&lt;p&gt;0x000011 means, move right&lt;br /&gt;0x000022 means move down and right&lt;br /&gt;0x000033 means move down&lt;br /&gt;etc. &lt;/p&gt;&lt;p&gt;Usin this bitmap means that you dont have to draw a lot of obstacles and do collision detection on those to make sure the character only go where they're supposed to, and not walk through walls for example. Now I can just check for a pixelcolor, which is a lot faster.&lt;/p&gt;&lt;p&gt;To play the game, first, pick if you're a boy or a girl, then pick if you like boys or girls.&lt;/p&gt;&lt;p&gt;Move around using cursor keys, press space to pick up a tube of toothpaste or menthol ball. &lt;/p&gt;&lt;p&gt;Play the game : &lt;a href="http://www.betereopeningszin.nl/index.php?id=13" target="_blank"&gt;A game with balls &lt;/a&gt;&lt;/p&gt;&lt;p&gt;And let me know what you think :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-2224121640424935546?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/2224121640424935546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2007/11/game-with-balls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/2224121640424935546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/2224121640424935546'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2007/11/game-with-balls.html' title='A Game with Balls'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-400186361949868496</id><published>2007-11-21T00:52:00.000+01:00</published><updated>2007-11-21T01:18:30.847+01:00</updated><title type='text'>Mokpads sjoelen</title><content type='html'>&lt;p&gt;For Kanis&amp;amp;Gunnink (a big coffee brand in Holland) we made a shuffleboard-type game using basic physics. The game also shows the 2 spokespersons for this brand (known in Holland from the tv-commercials) who watch your game and give funny coments while you play.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The game controls are (I think) very intuitive. you pick up Mokpads (Coffee pads for big mugs) and throw them using the mouse.&lt;br /&gt;This way, you don't have an abstract 'place the pad on the board, then aim, determine speed of throw, and throw' like you usually see in games.&lt;/p&gt;&lt;p&gt;The goal is to slide the pads into the little slots at the end.&lt;br /&gt;There's also a special glowing Mokpad, which is heavier, and is more slippery. Also, you can use the talkcon/chalk can, to make the board smoother, so your Mokpads don't slow down so fast.&lt;/p&gt;&lt;p&gt;This game also lets you challenge a friend by E-mail, and after your friend played, you get the result back so you can put on you own little leage.&lt;/p&gt;&lt;p&gt;Oh and that hand you see in the game, thats mine,  altered a bit to make less hairy and stuff :P&lt;/p&gt;&lt;p&gt;Play the game : &lt;a href="http://www.mokpads.nl/" target="_blank"&gt;Mokpads sjoelen&lt;/a&gt; &lt;/p&gt;&lt;p&gt;And let me know what you think :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-400186361949868496?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/400186361949868496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2007/11/mokpads-sjoelen.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/400186361949868496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/400186361949868496'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2007/11/mokpads-sjoelen.html' title='Mokpads sjoelen'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2512115034711442237.post-7719765235684944799</id><published>2007-11-21T00:28:00.000+01:00</published><updated>2007-11-21T00:52:21.129+01:00</updated><title type='text'>First!</title><content type='html'>Hi and welcome to my flash-blog.&lt;br /&gt;&lt;br /&gt;After attending &lt;a href="http://www.flashonthebeach.com/"&gt;Flash on the Beach 2007&lt;/a&gt; in Brighton, I've met some new flash developer friends, who showed interest in what I made, and asked for my blog address, which I didn't have at the time..&lt;br /&gt;&lt;br /&gt;I've been wanting to put some of my work online, maybe even write a tutorial or two, but I needed a website for that first and I never got 'round to making one.&lt;br /&gt;&lt;br /&gt;Then, at Flash on the Beach, my new friends pointed out to me that I should just signup for a free blog somewhere and start putting stuff online, without having to write a whole new website for it first :)&lt;br /&gt;&lt;br /&gt;So here we are.&lt;br /&gt;&lt;br /&gt;I shall now make some posts about the last couple of games I made at work.&lt;br /&gt;Artwork is usually not done by me, we have our own skilled artists at our company, I just do the coding bit :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512115034711442237-7719765235684944799?l=whizzkid74.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizzkid74.blogspot.com/feeds/7719765235684944799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizzkid74.blogspot.com/2007/11/first.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/7719765235684944799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512115034711442237/posts/default/7719765235684944799'/><link rel='alternate' type='text/html' href='http://whizzkid74.blogspot.com/2007/11/first.html' title='First!'/><author><name>Whizzkid</name><uri>http://www.blogger.com/profile/17561198058379463952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://whizzkid.nu/whizzkid.jpg'/></author><thr:total>1</thr:total></entry></feed>
