text inside...
Posted on 2010 Jul 20 by Daniel

Found a memory leak in my code last week, and thought this one might be a good one to share.I have been really careful about any memory leaks, but missed this one.

I've created a class that generated views that I could attach as child to another view, this would get cached as a bitmap, animated, replaced with original then animated again as a bitmap and destroyed. While in this worked fine, I've found that the cleared views weren't being destroyed properly. After a bit of trial and error (I suspected the bitmap caching first) I've found that externally loaded SWFs were the culprit. so I added an REMOVED_FROM_STAGE listener to the function that generates the views, and get it to remove each added child. This allows for the items to be easily garbage collected.
Posted on 2010 Jul 19 by Daniel

I was having a hard time getting [+next+] to work
after a while I finally figured it out
I was using an id in the ditto call that needs to be in the placeholder as well
If the id is `video`, the placeholder needs to be[+video_next+]
Posted on 2010 May 30 by Daniel

This little plugin with and onPagePrerender hook will eliminate the backslashes from the br tags

    $output = $modx->documentOutput; // get the parsed document
    $output = preg_replace("<brs?/>","<br>",$output);
    $modx->documentOutput = $output;

Could expand it further by adding other common doctype errors, like adding INPUT IMAGE ets, and empty alt tags in images
Posted on 2010 Apr 10 by Daniel

Sometimes... sometimes there's this thing that happens when you move images in flash.

there's a bit of jitter, like it can't decide which pixel to snap to. So one might think to change the pixel snapping and smoothing. While there is a difference, that won't fix it.

Have a look at the tests. Use the gray box to scroll the images.
You should notice two things; the image on the left does the a weird jumpy thing when it slows down.

TEST

You might also notice that the image, while it doesn't do the jumping about, it is a bit softer.
That's because the right image has a scaleX = 1.001;

this distortion fixes the problem.


-happy flashing
image credit
Posted on 2010 Mar 23 by Daniel

Flash CS5 will now include swfObject2 as the default method to embed flash in html. Awesome !!! I guess they couldn't look the other way any longer.
Posted on 2010 Mar 10 by Daniel

I've spent a lot of time on this issue...

Let's say you have a restricted area on your modx site and an eForm inside there.

And that efrom has only one field that will be emailed to the admin. But in the email you want to display the username.

Seems like this would be simple but simply referencing [+name+] is looking for a field whose name is name. I couldn't have used a hidden input field, because it wasn't parsing [+name+].

So after spending a lot of time of wrestle my variable in there, I've realized what the simplest way to do it is.

The trick is to create a chunk that has the value inside it, that way it is parsed inside the chunk, and doesn't interfere with eForm template.

it's a lot simpler than dealing with eFormOnBeforeFormParse
Posted on 2010 Feb 27 by Daniel

Posted on 2010 Feb 14 by Daniel


Another modX snippet,
this will grab all the images from a set folder and display them in a chunk




<?php
/*
::::::::::::::::::::::::::::::::::::::::
Snippet name: ParseImages

Description:
parses images in &folder in chunk &tpl
::::::::::::::::::::::::::::::::::::::::
Usage:
[!ParseImages? &tpl=`myChunk_tpl` &folder='assets/images/folder'!]
*/
// $folder;
// $tpl;
$output = "";
$filesArray = Array();

$imgDir = opendir ($folder);

while ( $file = readdir( $imgDir ) )
{
//checks that file is an image
$file_type = strrchr( $file, "." );
$is_image = eregi( "jpg|gif|png",$file_type );

if ( $file != '.' && $file != '..' && $is_image )
{
array_push($filesArray,$file);
}
}

rsort($filesArray);

foreach ($filesArray as &$fn) {

// set the placeholder
$params['image']=$modx->config['site_url'].$folder.$fn;
$params['imagefilename']=$fn;

// Parse the chunk
$output .= $modx->parseDocumentSource($modx->parseChunk($tpl, $params, '[+', '+]'));
}
closedir ($imgDir);

return $output;
?>
Posted on 2010 Feb 03 by Daniel

(modx 1.0.2)
By default the ditto.2 iteration starts at 0,

to have it start at 1 use
[+ditto_iteration:math=`?+1`+]

assuming you have PHx installed this should work,
also use "ditto_iteration" not "iteration", this little ooopsies cost me a bit of time

Just started using PHx in modx, and I'm pretty excited about it...
Posted on 2010 Jan 31 by Daniel

So every now and then I need to use an image on the web that has a gradient in the alpha channel. Naturally that limits your choice to a 24 bit png. There is another option that I'm be curious to explore, and that is to automate, via a php script, to merge the png with the underlying colour or image, and save it as a jpg. But that's one of those projects I'll never get to.

so speaking of the PNGs... I did some tests to try to minimize the size. I've created an image with a diagonal gradient of a murky green to a murky yellow, and an alpha layer that was a soft circle.

(A) The original file was 13.46k


Then I went about different techniques to try and get the size down to half, without a noticeable difference.

(B)first I removed everything in the RGB layer that was black in the Alpha Layer. that resulted in a 12.06 k image. (10.4% less)

photoshop will save RGBA data for each pixel, and if we make all pixels that have A=0 have R,G and B equal to 0, there will less data write, since there is so much repetition

(C)Next I posterized the RGB layer (after adding minimal noise to hide the steps) and removed the invisible areas(same as B). The resulting image was 11.78k, hardly an improvement (additional 2% difference). The reason is that I used a posterization setting of 96. The gradient together with the use of colours that don't like to get posterized make it a hard image to do this to.

(D) Same as C, but I tried a posterization setting of of 64. Result: 9.32k. Alhough 30% less than the original (and 20% less than C), the image quality has visibly degraded.

(E) Next up - positerize the alpha layer. Again I had to use a high value(96) to get a good result. The reason is that the first step is too harsh, so you get a strong outline if you use a low value. Again, I deleted the nonvisible area(trick B) and I got 11.09k (18% less that original, 6% lass than C). The nice thing about this is that the colours were not posterized, thus giving a nicer image.

I should note that in order to posterize the alpha layer I had to apply a curve. As stated before, the steps from posterizing gave a harsh outline. I applied a curve to the alpha layer that was diagonal around at the highlights and shadows, and drew about 16-20 steps throughout the rest, then applied the prosterization at 96. This is a good time (if not sooner) to realize that posterization is not the right way to do this. Posterization creates regular steps in each layer (RGB). This is why certain colours are so hard to match using posterization. All along I'm just trying to acheive the same results as indexing the colours. Photoshop however won't let you index 24bit PNGs. And indexing them in 8bit PNG will result in a matted alpha layer (that's why we need to use 24bit PNGs).
Bottom line is that the solution is in indexing the colours.

This may not work for images that have a merged alpha layer straight out of Photoshop. (though there is a way to retrieve this information, as each pixel has RGBA info). So if you can get the colour layer with the alpha layer not merged, these are the steps I took:
- copy the colour layer to a new document.
- switch the colour mode (under image>mode) to indexed.
- then select the indexing to your liking
- copy the result into a new image (or back into the original)
- copy the alpha layer (alt-click on alpha layer and copy)
- paste into new document (make sure the document is RGB, it will default to grescale)
- switch the colour mode to indexed and select the desired number of colours, this can be less that what "looks good" or close to original, since it is not as noticeable in the alpha layer
- copy into the alpha layer of the indexed colour layer.

My result (after trimming the dead area) 6.8k - 50% of the original image, and the images were almost indistinguishable at 100%. Upon closer inspection, the steps in the gradient were visible, but at 50% less on a grad-fill, it's pretty good.

Original | Compressed


Your mileage may vary depending on the type of image and number of colours indexed, but I think this is a typically "bad scenario" of an image.
Posted on 2010 Jan 23 by Daniel

To remove the dotted outline on the anchor that's visible when you click on a link in your browser, simple add this to your css

a {
outline: none;
}


since this is handy when it comes to using images for navigation, I've also added it to "#navigation ul li a", having it only for the a tag was not working in this case.
Posted on 2010 Jan 13 by Daniel

I've been using calibri and corbel fonts for the web, because the older browsers that don't anti-alias the font under 16px show these (and a few others) show these anti-aliased.

one problem I found that these fonts are smaller than the standard pack. so usually adding a px or two is necessary, but if the font is not there, the alternatives are a bit big, so I embed for all major browsers, and these two fonts are going to be a lot more common in a few years as they are bundled with Vista,7, and the microsoft suite.

anyhownow, the problem I found is that firefox doesn't like the font bold for some strange reason. It renders it as bold at first, then it swaps to normal wight. It's strange, because if it couldn't find the bold variant in the ttf it shouldn't render it as bold in the first place.
Posted on 2009 Nov 18 by Daniel


Verizon Droid campaign pits Moto Android against “iDon’t” iPhone



Open development for Flash developers means no need to squeeze applications through iTunes store or jailbraking your iPhone/iPod Touch.
This and other upcoming Android phones that support flash should give flash developers some opportunities in the future.
Posted on 2009 Nov 12 by Daniel

when you do the scaffolding for your database, you need to create a class to handle each table.

this can get annoying, long story short. I added session data that updates to whichever table you want to view.

see the code
Posted on 2009 Nov 06 by Daniel

I haven't been developing in php for very long and am quite new to working with databases. but stack overflow makes is easy. Most questions I have get answered within 10 minutes. It's great !

http://stackoverflow.com/
Posted on 2009 Nov 05 by Daniel

cms made simple is like most other CMS, but made simple.

I've gotten used to the MOdx way of doing things, but for projects that are much simpler cmsms is great.

I've just started and am impressed so-far. There are equivalents of the modx chunks and snippets. and smarty templating is dead simple.
I've taken an old table based design and replaced the content with the content tag, and added some metas and the title tag. Created two versions, for home page and other content pages, and put some redundant code into Global Content Blocks. I've also put the included news module in.
Currently I'm moving some of the table stuff to divs still.
But I'm quite impressed how quickly I've been able to get into this. I think I'll be using cmsms more than modx in the future.
Posted on 2009 Nov 04 by Daniel

I'm not sure when it came out, but it's out.
try it at http://labs.adobe.com/technologies/lightroom3/

or check out what's new at http://tv.adobe.com/product/lightroom

if you have not used lightroom before, good time to try, as it is a free beta version good 'till April 2010. Though some features are disabled still.

My favorite new features (after the first few minutes)
The color noise reduction works better
panels have manual control override (so they don't fly open when you're trying to scroll) - accessible through right click.
vignetting is not just paint over images anymore, so it looks nicer
It looks like most of the changes done were in collection managing. There are quite a few new helpful changes that speed up managing the picture collections.

Also important is access to Lightroom Exchange. This (I hope) will allow you download camera profiles without having to wait for a new version of lightroom, as well as giving you access to plugins for lightroom. Lightroom 3 Beta came with the flickr uploader, so you can publish pictures directly to your flickr account.

it also looks like the sharpening is working better

Again, this is still a beta, and I found that I was unable to import a lightroom 2 database, and am not looking to convert my entire library to DNGs (though I should...) But it will be interesting to test it over the next bit, as time allows, to see what else is new.


Some of the new features included for you to play with in the Lightroom 3 beta are:

* Brand new performance architecture, building for the future of growing image libraries
* State-of-the-art noise reduction to help you perfect your high ISO shots
* Watermarking tool that helps you customize and protect your images with ease
* Portable sharable slideshows with audio designed to give you more flexibility and impact on how you choose to share your images, you can now save and export your slideshows as videos and include audio
* Flexible customizable print package creation so your print package layouts are all your own
* Film grain simulation tool for enhancing your images to look as gritty as you want
* New import handling designed to make importing streamlined and easy
* More flexible online publishing options so you can post your images online to certain online photo sharing sites directly from inside Lightroom 3 beta (may require third-party plug-ins)*
Posted on 2009 Oct 22 by Daniel

Just came across a great reason for using Flash decompilers, like the Sothink SWF Decompiler. I've found that Flash CS4 is quite unstable, and when Flash crashes, loosing even 20min of work is a problem. As long as you keep compiling the swf, you can get back some of the your lost work.
Unfortunately, if you have created assets that were not included on the stage, they don't make their way into swf.

Aside from that it's great if you're working on someone's website that has swfs that need to be updated without access to the source files, which happens way too often.
Posted on 2009 Oct 21 by Daniel

The flash game development community has had it good for a while, but recently developers have been turning elsewhere.
Unity3d and the popularity of iPhone and iPod are likely to blame.
Unity allows in-browser 3d which makes flash 3d look like a joke.
Apple decided not to support Flash (wonder why, right?), but made it a lucrative game development platform for monetization.
Unity3D allows developers to target iPods & iPhones, but there are other options as-well, free and (mostly) commercial.

And starting with Flash CS5, adobe will allow flash developers to target iPhones. Although Flash is used for other things as well (where the main competitor is Silverlight), for indie game developers this will allow to develop for multiple platforms easier (if they don't like learning unity3d or torque), especially since so many developers have experience with flash.
Posted on 2009 Oct 20 by Daniel

I've been trying to do some uploading of a file generated in flash. After some looking around I found someone out there had a good solution, but it was a bit outdated (because it didn't work me).

It turns out Flash 10 has some updated security features
User-initiated action requirements in Flash Player 10. But after some looking into it, seems like that's

so I've looked some more, and found a class that does this quite painlessly - MultipartURLLoader
found via blog.inspirit.ru
Posted on 2009 Oct 16 by Daniel

Playing around some more.
Inspired By Erik Natzke



[space] = pause/unpause drawing
[esc] = clear

I called this round of experiments birch, but it has little relation to the the product.
Posted on 2009 Oct 11 by Daniel


is a site I've worked on recently with Tim at Linklater.ca

It's my first time using Wordpress as a website CMS. I needed to create some flash files for it, like the splash page and product selector. Also created some custom php and javascript components to retrieve videos from vimeo, and do some simple effects. Also used available js scripts, jquery, and some Wordpress plug-ins.

stepchildsnowboards

stepchildsnowboards

stepchildsnowboards
Posted on 2009 Oct 11 by Daniel

I'd say more, but most important is - use them
w3schools
Posted on 2009 Sep 22 by Daniel

I was trying to get some data from vimeo using their simple api and json.

here's how I got the data

$contents = file_get_contents('http://vimeo.com/api/v2/user'.$user.'/videos.json')

I decoded/converted it to an array
$data = json_decode($contents);

then I tried to get the thumbnail_medium information, and this is when I ran into a problem. The $data is an array (length = num of videos) but each object is a stdClass. I thought i could access the data easily through this easily but I had a hard time doing that. The trick is to type the stdClass to an array.
$video = (array) $feed[$video_num];


voila
Posted on 2009 Sep 03 by Daniel


after switching hosts, my upload scripts quit working, and I kept getting

Error #2038: File I/O Error





the solution was to add a .htaccess file with:

SecFilterEngine Off
SecFilterScanPOST Off


This was a problem with ModSecurity being enabled with the host.
Posted on 2009 Aug 31 by Daniel

I kept getting a zero for file_exists($fName)
I think this is not the first time it happened, but here's the solution (provided the file does exist)


$handle = fopen($filename, "rb");
sleep(1);
fread($handle, filesize($filename));

basically seems like adding a sleep(1); allows it to load the file.
Posted on 2009 Aug 31 by Daniel

So the official announcement has finally been made.
The Sony a850
A850

with it also news of a new lens 28-75mm F2.8 SAM
finally sony has a fast zoom

Features

* Full-frame 24.6 effective megapixel Exmor™ CMOS sensor and dual BIONZ processors for detail-packed, low-noise images with high sensitivity up to ISO 6400 (with expanded ISO range)
* Bright optical glass pentaprism viewfinder with 98% coverage
* SteadyShot INSIDE™ offers up to 4.0 steps anti-shake performance with all lenses
* Photo quality (921k dot) 3.0-inch Xtra Fine LCD
* Fast, high-accuracy 9-point AF with 10 focus assist points

slower than the a900 and smaller viewfinder (98% instead of 100%)

but at 2000 USD for body, might just be the most affordable full frame camera (with 24.6 MP)
Posted on 2009 Aug 28 by Daniel

Switched from startlogic to ICDSoft.

got cpanel instead of vdeck
and it's cheaper

I might be switching blogging engines, but for now I'm glad I cuteNews, as switching without databases is so much easier.
Posted on 2009 Aug 21 by Daniel

Came across this a few days ago, thought I'd post it.
Little Wheel



First thing I noticed was the heavy influence of Michel Gagné. Especially the Insanely Twisted Shadow Puppets. If you have seen this before, I'm sure you'd recognize it right away. They also added a nice 3D feel to it, while keeping in in 2D. My guess is that a few of the elements were created and animated in 3D and brought into flash. It has a very nice narrative, and the musak is fitting too.

Also I was happy to see it was made in Slovakia.


Gagne's Specter's Bride
Posted on 2009 Jun 26 by Daniel

Well not everyone has an iPhone. Some people might be into using mobile devices based on the Android open platform. The HTC Hero, is the first Android based phone to support Flash.

full story : flash on android



Also, Google's Flash indexing has been updated.Link

most notably
"This means that when a SWF file loads content from some other file—whether it's text, HTML, XML, another SWF, etc.—we can index this external content too, and associate it with the parent SWF file and any documents that embed it."

I can start recommending Flash to people interested in on Gooleable (Google it) websites.
Obfuscation doesn't effect indexing, and since June 19 2009, AS3 content is indexable.
Posted on 2009 Jun 25 by Daniel


When using FlashDevelop and having multiple embedded swf files, the debugging of the Flash IDE is not enough.

I've tried using ThunderBoltAS3 at first, and found it quite helpful. If you have Firebug installed on Firefox, you can send messages using the Logger interface. You can use sever levels of notifications: Info, Debug, Warn and Error. There is also an AIR app that can be synced up to and gives a nicer interface. What I did not like about it though is having to use the swc. This is not too complicated, but if I'm handing over projects that are made for Flash CS3, the swc procedure is a bit cumbersome and can make it easy to forget about the swc. It's not a problem in cs4, because you can link to swc files, but this causes projects to be just a bit more difficult to switch between CS3 and CS4.

ThunderBolt works essentially like the trace feature, but I've found the FlashTracer on Firefox to slow down wight down the processor sometimes far too much, so Thunderbolt is a bit more helpful, as it allows to display objects and arrays easier.

Then I found out about De MonsterDebugger . This makes debugging what it should be. I always thought that the biggest shortcoming of FlashDevelop was the lack of a debugging tool, but with this debugger this is a issue of the past. De MonsterDebugger only requires one import, rather than the swc.
It supports the trace type of debugging, but more importantly it lets you browse through all the objects.
All you need to do is "debugger = new MonsterDebugger(this);" and the debugger console lets you browse through the available properties and methods.
An other handy feature is the ability to call any exposed method. The is great for doing simple tests where want to call a function without having to build an interface for it.

Check out GotoAndLearn's video about this debugging tool to get a good idea of the capabilities.
Posted on 2009 Jun 07 by Daniel

Just heard about this on the radio. CBC was interviewing a Calgarian that started a spontaneous dance party.
It's quite phenomenal....



It's really weird to see the event reach critical mass, and everyone racing to join in.

Calgary's 'Dancing Man' an overnight celebrity
Calgary Herald - June 3, 2009
Posted on 2009 Jun 03 by Daniel

I wanted to pass a parameter or variable directly to a chunk in MODx 0.9.6

Apparently this is only possible in the REVO version of MODx. So Instead I needed to create a snippet to call the chunk and pass the parameter as a placeholder. Rather than doing it for this for a single purpose, I made it so any parameter name can be passed, allowing for a bit more flexibility.

/*
::::::::::::::::::::::::::::::::::::::::
Snippet name: PassParameter
Short Desc: passes a parameter to a chunk as a placeholder
Date: May 29, 2009
Author: Daniel Poda
::::::::::::::::::::::::::::::::::::::::
Description:
pass parameter defined by &pName and &pVal to a chunk &tpl
set &preparse to 1 (TRUE) to parse the chunk before returning the content
by default this does not pre parse
::::::::::::::::::::::::::::::::::::::::
Usage:
[[PassParameter? &tpl=`myChunk` &pName='param' &pVal='12' &preparse='1']]
*/

$params[$pName]=$pVal;

if ($preparse== 1){
$documentOutput.=$modx->parseDocumentSource($modx->parseChunk($tpl, $params, '[+', '+]'));
}
else{
$documentOutput.=$modx->parseChunk($tpl, $params, '[+', '+]');
}

echo($documentOutput);
?>


usage
[[PassParameter? &tpl=`myChunk` &pName='param' &pVal='12' &preparse='1']]
Posted on 2009 May 29 by Daniel

Shane McCartney, the author of http://www.lostinactionscript.com has a presentation here (page 88)
where he states that using
var var_1:String = "str 1", var_2:String = "str 2", var_3:String = "str 3";
is more efficient than
var var_1:String = "str 1";
var var_2:String = "str 2";
var var_3:String = "str 3";

but this source says the exact opposite.
10. One line assignments DO NOT buy any performance (true in other langs)

There were some other things that were contradictory between the two articles, but this is the one I decided to check.
so who's right, well it turns out (according to my test) that the single line is in fact faster, but I'm getting a 10% increase in declaring 4 variables, and not the 30% as expressed in the slides.

more importantly I figured out that the whitespace was making the difference. So once I put the statements in a line
var var_1:String = "str 1";var var_2:String = "str 2";var var_3:String = "str 3";
and put these inline with the for loop braces, the speed increase was over 10 fold. That's right more that 10x faster to have everything in a line (almost 20 depending on how it's formatted)

So I did some investigations, in disbelief of how brutal these numbers were. My first though was that I should change from compiling for flash 9 to compiling for flash 10. Seeing how that didn't fix anything I kept looking. Next I switched from debug mode to release mode. And there it was, once I switched to release that 10+ fold difference was gone. Flash develop (using the flex compiler) gives you the choice of compiling in release or debug mode, but I don't understand why this difference is so big. I remember reading that switching from debug mode to release mode gives you a performance increase, but this makes me ot want to use debug mode EVER.

read the rest
Posted on 2009 May 23 by Daniel

I found these pretty nifty:

replacing TextField and improving performance
http://lab.polygonal.de/2009/04/26/goodbye-textfield/

Round up of ActionScript 3.0 and Flex optimization techniques and practices
http://www.insideria.com/2009/04/51-actionscript-30-and-flex-op.html

Tips on how to write efficient AS3
part 1
part 2

a faster way of tweening (faster than tween max)
Tweensy
Posted on 2009 May 22 by Daniel

I was starting to loose my mind... then I came across this

the interesting part was this ...

if it doesn't works
please set your firefox browser:
1.input "about:config " to your firefox address bar and enter;
2.make sure your "dom.allow_scripts_to_close_windows" is true


Turns out dom.allow_scripts_to_close_windows was set to false.
Posted on 2009 May 06 by Daniel

Playing around with ribbons/particles in Flash. This is a bit more processor intensive than the others.



demo : Ribbons

More inside...
Posted on 2009 May 01 by Daniel

Another flash generative experiment



demo : Splash

on flickr

More inside...
Posted on 2009 Apr 30 by Daniel

I finally got to doing some more generative stuff with flash. I was playing with the flow fields, inspired by Soulwire.










demo : FLOW FIELD

I disabled the upload, but I'm pretty happy with the menu/layout and it will be the starting point for my future endeavors.
Posted on 2009 Apr 21 by Daniel

Posted on 2009 Apr 19 by Daniel

Had this idea in my head for a while, so after an hour or so of illustrator and a bit of photoshop, here are the new Madoff Hitler stamps.
Posted on 2009 Apr 11 by Daniel

My loop class

I have come up against this a few times, where I needed to create a series of numbers, usually integers, that are in loop. The first time I came across
This was for the salted herring portfolio website. I needed to create these fish/cursors that displayed some basic flocking behaviour. Along with the standard boid setup, they had to face either left or right. They would only point up or down when they were moving that direction. The change in direction also needed to be smooth, which leads us to our problem of averaging angles. If you do the average of 0 and 60 degrees, you can do some simple arithmetic and you get the average of 30. However if you average 350 and 10, trigonometry would give us 0 where as basic arithmetic would give us 180. The reason is that our equation doesn’t know how that 10 is closer to 350 if you go the other direction.

This is how I dealt with that…
I converted both the angles to their x and y components, and averaged those. Then I did an aTan on the averaged x and y values, giving me the average of the two angles.

This is the simplified formula in a function that would get the average of angles a and b (in radians).
private function averageNums($a:Number, $b:Number):Number {
var avg:Number = (Math.atan2( Math.sin($a) + Math.sin($b) , Math.cos($a) + Math.cos($b) ));
return avg;
}


This worked for the fish, but there is a problem with this equation. If you average 0 and 180 degrees you will not get the right average.

Continued...
Posted on 2009 Mar 31 by Daniel



Well well, it appears it's not dead yet. Director gets a quiet update according to draw logic. I can think of one person that's probably visibly excited about this.

I've argued before that just about anything director did, flash could do too, but then I haven't taken into account the newest updates like "Advanced physics engine with included NVIDIA® PhysX™ support". Flash however has such a big community behind it allowing for some great libraries and IDEs (like FlashDevelop). Flash also expanded to Flex and AIR, will be supporting C++ soon through Alchemy, and got the actionscript3 update, whereas Director is still sporting the somewhat clumsy (for my taste) lingo.

I wonder what's in store for Director...
Posted on 2009 Mar 31 by Daniel

This just in
I was used to sending calls to java from within the flash file using the navigateToURL function. If you look around the Google, you will find a lot of people are doing the same still. In AS3, there is a more reliable alternative - ExternalInterfaceCall

I'm saying more reliable, since I found out that IE6 does not necessarily like calling java from an swf using navigateToURL. (I believe sp1 wasn't liking it but sp2 was OK)

Aside from being more reliable, it is also a bit shorter.


var myData:String = "my data string";

// using navigateToURL
var js:URLRequest = new URLRequest();
js.url = "javascript:sendToJavaScript('" + myData + "')";
navigateToURL(js, '_self');

// using External interface call
ExternalInterface.call("sendToJavaScript", myData);



Enjoy
Posted on 2009 Mar 30 by Daniel



Posted on 2009 Mar 29 by Daniel

I updated my portfolio and my portfolio link.
My new portfolio is all about simplicity, I figured the old portfolio lacked a bit in usability and required a a bit of time to explore.
Posted on 2009 Mar 20 by Daniel

I got quite excited about this...

Although I don't use Various CMSes a lot I've spent a LOT of time researching them installing them on my server and trying to figure out why they weren't working. (Turns out I had to get into some php settings and the access files), but aside from that... While I was testing the different CMSes, I got fond of MODxCMS almost instantly. And the more I used it the more I liked it. I remember wandering if MODx could export the data as an XML file. Well I just came across this article that not only shows how to generate an xml file from the content but talks about my intended purpouse (for wanting an xml document) - namely creating a Flash site mirroring the content-mannaged Html site.
Posted on 2009 Mar 18 by Daniel



Have been playing around with some path finding algorithm, but it may not be for flash. At 5x4 it can find a path under a second, however anything over 5x5 times out.

This algorithm finds all paths and then selects one at random otherwise it wouldn't need to go through over 7000 paths at 4x5 and over 50'000 at 5x5.

So for my purpose this simply will not work and though it was an interesting concept/algorithm to work on I also feel like I lost a bunch of time on this.
Posted on 2009 Mar 10 by Daniel

Radio Buttons and Un-checking in AS3

Last night I came across this issue where I wanted to uncheck all radio buttons. In short, there is no direct way of doing this. However here’s the work-around I came up with.

Let’s say you have a radio button group (RBGroup) and three radio Buttons (RB1, RB2 and RB3)

First thing you need to do is add the RB’s to the group and add them as chilren

RB1.group = RBGroup ;
RB2.group = RBGroup ;
RB3.group = RBGroup ;

addChild(RB1) ;
addChild(RB2) ;
addChild(RB3) ;

To change the selection…
RBGroup.selection = RB1 ;

To check selection you can do this
trace(RB1.selected);
This is a read-only parameter, so you couldn’t set all to false to un-check them

So here’s my solution
Create another radio button and add it to the group
RB0.group = RBGroup ;

Then you can change the selection to RB0
RBGroup.selection = RB0;
And as long as this radio button is NOT ADDED as child (invisible) it will appear to be unselecting all.
Posted on 2009 Feb 24 by Daniel

Today didn't go so well so the scanned collection is quite small

Posted on 2009 Feb 11 by Daniel

I decided I'd put up some of my life drawings form the past year
Posted on 2009 Feb 09 by Daniel



So it looks like my key got revoked on the two day old app. I added the custom word feature, but reckon this will only work for a while, then I'll need to recompile for a new key.

so instead here's the source, though it is a bit messy.
Posted on 2009 Feb 04 by Daniel

So I was playing around with a Thesaurus API from Big Huge Labs.





Pretty self-explanatory, if you double click on a word it will search the synonyms.
Posted on 2009 Feb 02 by Daniel

Trying to see if two lines connect or not?
well here's a little class (just barely) I wrote to aid with a little personal project
Posted on 2008 Nov 07 by Daniel

Out of nowhere comes sophie3D. It renders up to 50,000 polygons in real time. Also supports rhinoceros.
http://www.sophie3d.com

can't wait to give it a try.
Posted on 2008 Nov 06 by Daniel

I did this a few weeks back for no particular reason really. I went back into C++ for a bit and got a reminder of how nice it is to have pointers and references. As you know, in Flash there is no such thing.

These pointers are awesome, I think, for many reasons. For example, I can use the same physical memory for one variable that can be used by any object. If I update this one variable, all objects will be effected. and there's more, but this is the feature I thought I would try to emulate in Flash. If your variable is an object, it's no problem, however if you try to do this to an int or Number it's impossible. Basically your number is a value and always a value, whereas your object is a reference.

here's a quick example...
Posted on 2008 Oct 22 by Daniel

guess who expanded their product lineup?

Make My Logo Bigger
Posted on 2008 Oct 06 by Daniel

Concept:


“Natures” is a project that explores the dialogue between the natural
and the artificial, creating a world where these two elements coexist
harmoniously. It consists on a series of audio-visual compositions that
simulates organic behaviors through an atypical use of motion tracking
techniques.
The melodious movement of plants spinning with the wind triggers an
intricate web of computer-generated lines and shapes. Interpreting the
organic structures of the plants, the artificial element becomes part of
the natural and vice versa.


Natures



http://www.quayola.com/
Posted on 2008 Oct 01 by Daniel

O'Neill's collective get an update for the falls season.


Check Me OUT










took a few late nights and early mornings, but its up and running.
Posted on 2008 Sep 30 by Daniel

After getting the blog up and running again, I though I would re-post some of my past projects


Salted Herring Portfolio



Amph Series
Amph



Cannibal
Cannibal



The Collective, 2008 Summer
The Collective / summer 08
this link no longer works, because the collective got replaced with a new version for the site
Posted on 2008 Sep 30 by Daniel

I'm going to bring back my blogski.
(dispite the lack of popular demand)
Posted on 2008 Sep 29 by Daniel

Content Management Powered by CuteNews