I started using Zinc when it was 2.5, it was buggy and on more than one occasion caused me some severe grievences. A nice one was when I had a presentation that had to store data in a MySQL database. Nothing complex but the presentation itself was supposed to be potentially viewed by up to 50,000 people. So what was the problem? Somehow Zinc reached version 2.5 and no one had noticed that it’s MySQL classes “Connect” function didn’t actually connect to the database. I was the lucky camper to find that one out. MDM didn’t reply to my emails so I was left to ditch Zinc and write my own Flash wrapper to handle the comms. Since several other applications were Zinc based we were kind of stuck with it. They eventually nailed all the bugs that I’d run into which was great, then we upgraded all our machines to the Vista OS. Lo and behold, Zinc 2.5 consistantly bombed out, totally not Vista friendly. So much so they actually released Zinc version 3. I knew I should of learnt my lesson.
Continue reading “Zinc 3 aka Total Waste Of Money”
FlashDevelop 3.0.0 R5 is out and as usual it rocks. One cool thing is that it has all the AS3 classpaths setup as default, this was something you had to manually setup in prior releases. One slightly oversighted thing is with the Adobe Air classes. Whilst code completion and syntax highlighting works if you create a FlashDevelop Air 1.5 project, the same cannot be said for when you are just editing a standalone ActionScript file which is how I tend to work. I rarely use FD projects. The fix is simple. Follow the main menu: Tools->Global Classpaths, set the dropdown to AS3 and then tap the “Add Classpath” button.
Browse to the following:
or on 64bit systems:
C:Program Files (x86)FlashDevelopLibraryAS3intrinsicAIR
Tap ok a couple of times to close the popups and voila, you now have Air code completion and syntax highlighting. FD FTW! 😀
Yet another opensource system that makes use of the HTML base tag as a hard-coded feature. Why is that a problem? Well if you use SWF Object to output the relevent HTML code necessary to display a Adobe SWF file on your page then you’ll be in for a surprise on IE6. You will get a popup prompt that states “Operation Aborted” for each SWF file on the page. Then once the page actually loads none of the SWF content is visible. Sucks. They detail a simple fix in the FAQ that uses IE conditional tags to add the required closing base tag which doesn’t solve the problem here. Their solution assumes you don’t need a self closing tag as default, for when it is not IE as the browser. That in turn leads to XHTML validation errors. The cheat is to write the conditional in PHP instead.
Continue reading “CMS Made Simple Base Tag Issue”
I noticed that a project I’ve been working on ran very slowly in IE7 and IE8 compared to FF3 and Chrome. Took me a while to track it down but it seems to be wmode related. The file in question had its wmode set to “transparent” in the containing HTML document. I did a bit of digging around and stumbled across Justin Everett-Churchs WMode Woes. He knocked up a quick demo page that shows that with wmode set to “transparent” or “opaque” any setInterval calls are slowed down to the framerate. This means my fancy scrolling system stutters like a sod since it isn’t being updated fast enough. Luckily for me I can turn it off on this project. I still love the wmode parameter but now I know its limitations. It’ll still work a treat on non time sensitive animations. I’m not sure if the setInterval/wmode pitfall applies to ActionScript 3s Timer class, I’ll have to test that on the next AS3 project I’m on.
Inside a ScrollPane I created a series of input TextFields and gave each an instance name, a unique tabIndex and set tabEnabled to true. The end result was supposed to be a list of input TextFields you could easily tab through. No such luck, seems the cursor just gets stuck in the first TextField. Found a handy forum post where someone states you have to set tabEnabled and tabChildren for the TextFields immediate parent as shown in the following code, note that “this” should be the path to the TextFields immediate parent:
this.tabEnabled = false;
this.tabChildren = true;
I’ve never really had much use for the Flash DataGrid until a recent project. One of the tasks involved updating a field of a certain row. I was doing it like:
Essentially, there is an array of objects. One of the object properties is called “total_presentations”. The above line tell a specific DataGrid row to decrement it’s total_presentations property by one. That works as expected except that the actual field doesn’t change visually until you roll over/off the updated row which looks rather bad. Calling invalidate or redraw on the DataGrid didn’t help. Turns out I’d simply overlooked a DataGrid method called editField. The above line can be rewritten:
this.datagrid_clinicians.editField(clinician_index, “total_presentations”, this.datagrid_clinicians.dataProvider[clinician_index].total_presentations – 1);
A bit long winded compared to the first option but it seems to redraw the cell instantly. I just totally missed this method when reading the docs. Luckily I only had to change it in a few places, later on it would of been alot more trouble.
I installed IE8 last night, had to do a manual download as it hasn’t shown up in Windows Update yet. Seems ok, took a while to get used to the slight change in tab styling. So everything’s going hunky dory until I landed on a Wikipedia page. It was being rendered with some crazy font I had installed months ago for a certain project (“1st Sortie” font for those that are interested). It looked fine in FF3, Opera9 and Chrome and it had looked ok earlier in the day using IE7.
Continue reading “IE8 Font-Family Crapiness”
Everyone knows that to update your browsers Flash player you just need to visit the Adobe site and follow the “Get Flash” links. Pretty simple stuff, however doing this does not update the Player that the IDE uses, which is the same one used when you open a swf on its own off your HDD. It’s a wee bit more fiddly to update that one and I didn’t find anything directly relating to how to do this so I thought I’d cover it here for future Flashers 😬
The first step is to head over here and find the relevant version of Flash for yourself. In my case it’s CS3.
Currently for CS3 the top most update is the “Adobe AIR 1.1 Update”. Just under that is the “Adobe Flash Player Update for Flash CS3 Professional”, that’s the one we’re after. Download that zip, it’s around 42MB.
Once downloaded, unzip it and you’ll have 3 directories and 2 files.
Make sure the Flash IDE is closed and then head to your Flash IDE directory:
C:Program FilesAdobeAdobe Flash CS3Players
C:Program Files (x86)AdobeAdobe Flash CS3Players
You can check your current Flash Player version by running the FlashPlayer.exe file, choosing Help->About and then looking at the version number there. For me it was 9,0,115.
You’ll notice that it has the same 3 directories and 2 files. Delete all of those and then copy the ones you unzipped into there so it ends up looking the same although with the newer files.
You’re all done. Your IDE player has now been updated.
I’m not sure if you can copy the Flash Player 10 files into there, it might have unexpected consequences. For now I’d just say switch to CS4 if you really want that.
I wanted to test something with different colors, turns out it’s easy to pick a random color:
var box:Shape = new Shape();
var random_color:Number = Math.random() * 0xffffff;
box.graphics.drawRect(0, 0, 100, 100);
Just had to desaturate a clip and then return it to normal. Code wise it’s rather simple, the following turns a MovieClip with an instance name of test to grey:
// Make Grey
var matrix:Array = ;
matrix = matrix.concat([r, g, b, 0, 0]);// red
matrix = matrix.concat([r, g, b, 0, 0]);// green
matrix = matrix.concat([r, g, b, 0, 0]);// blue
matrix = matrix.concat([0, 0, 0, 1, 0]);// alpha
test.filters = [new ColorMatrixFilter(matrix)];
To return it to the default state just clear the color matrix:
// Return to normal
test.filters = [new ColorMatrixFilter()];