I’m a big fan of this free DX managed wrapped called SlimDX. I used to use Managed DX but MS abandoned that which meant I was limited to DirectX version 9. SlimDX makes it possible to still use C# but also to have access to the latest DX10 and DX11 classes. The official releases of SlimDX are good but the SVN repository has the very latest changes to it. That just gives you access to the source, you still have to build your own dll to include in your SlimDX projects. I figured that some people may have trouble with this so I thought I’d write this simple guide.
Continue reading “Building your own SlimDX binary from SVN”
Hit a snag with an Air project I’m working on tonight. Got right to the end of the last set of requested changes and then started getting the error: Error #3013: File or directory is in use. It occurs with both new files and old files I’m replacing. Took me a while to suss it out but I now have a fix that works a treat.
Continue reading “ActionScript 3 – Error #3013: File or directory is in use.”
I’ve been using the new 3D functionality in Flash Player 10 and got this error earlier today:
1046: Type was not found or was not a compile-time constant: Vector3D
Quote boggling since the docs say it’s a global class as long as you have the publish settings player version set to 10. Took me a while to work it out. If this happens to you then add this at the top of your class:
A while ago I wrote this post about how to get Joomla working with swfobject due to the base tag issue (swfobject FAQ Point #4). At some point Joomla has had what seems like a major rewrite and I found after a recent upgrade to 2.4.6 that the base tag issue is back again. To tell the truth I wasn’t that happy with my last attempt but I also switched to using CMS Made Simpler instead of Joomla for most projects so haven’t had the chance to revisit it. Seems like now is the time. The fix is simple and is based on one that I wrote for CMS Made Simple which in turn is based on one that someone wrote for Drupal.
Continue reading “Joomla and SWFObject IE6 Base Tag Issue Revisited”
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.