23
Jan
10

Obama’s Approval Rating - Non US citizens have your say

I’ve been interested to see the response to President Obama’s approval rating dipping below 50% and it made me wonder, what if the rest of the citizens of the world got a say in this rating…? So now I’m giving you that chance! If you’re not a citizen of the US, how do you think the President is handling things?

One things for sure, he’s doing a damn site better job than that last clown that was voted in twice!

The Polls below, just select Yes or No and then the Vote button.

Have at it!

[NON US citizens only please] Is Barack Obama doing a good job as President?

View Results

Loading ... Loading ...
20
Oct
09

Loaded swf obscuring mouse events in overlapping movieclips

Long time no read. Been busy with a large Flex project, plus I’ve been trying to see a bit more of Europe - but thought it was about time to get back onto some blogging. That and I’ve come up against something that I can’t seem to figure out (and it doesn’t look like anyone else has either from the amount of Googling I’ve done looking for a solution).

Basically what I’m doing is loading an swf with an image in it, which loads over the top of another swf which has some navigation elements in it. What is occurring is the swf on top is preventing any mouseover events from reaching the buttons below the image. I’ve zipped up a test archive to try and illustrate what’s going on. If you run test2.swf, and then mouseover the part of the orange square that intersects the green square, the green squares mouseover event should fire. I’ve set mouseEnabled = false on the orange square, but the fact that it’s in a completely different swf seems to mean that this doesn’t have any effect. The part of green square underneath the orange square is simply not receiving any events.

I’m actually using the Gaia framework, so it’s doing all of the loading of the swf’s. And I thought possibly setting the ApplicationDomain of the swf’s to be the same would mean things would work - but it didn’t. So if anyone’s experienced overlapping assets in two different swf’s interfering with mouse events then please let me know in the comments below.

21
Jul
09

A wolf in sheeps clothing

Ok, this is a bit off topic but I attended Oxegen festival in Ireland recently. The music was good, the weather was crap, the punters in my campsite were worse. Some little bastard thought it would be funny to go into my tent and spread my belongings all over the campsite. Not cool. I found some of the things, but others were lost to the mud.

Anyways, the purpose of this post is to give a shout out to the service and support department at Black Wolf (Kate in particular ;-) . One of the parts of my backpack went missing, and they’re going to send a new one all the way from Australia to London free of charge! So if you’re in Oz and thinking about doing some travelling, make sure you check out the Black Wolf gear. Not only is there service awesome (this is the second time they’ve helped me out since I’ve been overseas) the quality of their gear is very good as well.

04
Jun
09

Tilt Shift Air App

I’ve just spent the last 15 minutes mucking around with a cool AIR app called TiltShift. It basically lets you create images using a technique called Tilt Shift Photography. The app does a rather nifty job I must say, here’s what I knocked up in around 15 minutes from the back catalogue of images on my computer.

I reckon image 4 is the best one, though I’ll continue to plough through the image banks at this end looking for suitable candidates to miniaturise. Anything where the subject matter is below the camera seems to work well. Obviously the Tower of London doesn’t fit into this category, so I’ll have to take a happy snap from the Eye and have another crack at that ;-)

For those wanting to do it the old school way, check out this Photoshop tutorial that shows how.

01
Jun
09

Flash Catalyst or Catastrophe?

I’ve been watching the large number of blog links regarding the news from Adobe labs that Flash Catalyst is now in public Beta; naturally I had to download and have a go myself.

My first impressions are not good.

It seems like they’ve decided to invent their own usability best practices for the tool shortcuts. Where the hell is the pan tool? Why doesn’t holding the space bar and then using the mouse to scroll perform a pan? Keyboard shortcuts for delete don’t seem to work in the layers panel. Where is the align panel? Do I really have to right click an asset and select an align option from a dropdown? It’s a real mouseathon in the program at the moment. These aren’t really things I see as Beta related, they should just be in the app - which they are in any other CS4 product, so I’m mystified how these issues got through QA to this stage.

Probably the biggest issue is the speed (or lack thereof) of the program. Trying to edit a button’s state is painfully slow. I’m not sure whether this is to do with my system (dual core 2.4Ghz with 4Gb RAM on Vista) but I’d like to know if I’m the only one who thinks the program runs painfully slowly.

Aside from the usability and productivity issues I’m still at a loss as to why the CS4 core wasn’t used for this (or was it?) and even why we need a further dilution of the Flash product base. Surely Flash CS could be re badged as Flash Designer and the Catalyst toolset integrated (I realise I made that sound easier than it would be, but as it stands the introduction of this third tool looks like more of a money grab than anything else). This would go nicely alongside the newly re badged Flash Builder (which incidentally looks very good, so kudos to the Flex team).

I haven’t upgraded to CS4 as yet, and it’s for some of the reasons above that I haven’t. I just don’t know where the Flash products are headed, and quite frankly if this is where they’re going I may jump ship completely onto HMS Flex and let the “designers” out there handle getting the assets I’m after into a state in which I can use them. Though the right side of my brain may have something to say about that statement…

25
Mar
09

2009: the year of the alternative energy oxymoron

Ok, so it’s actually the international year of astronomy - but I’d like to decree in a fairly dictatorial manner that it should be the year of alternative energy (and that’s not to say that I’ve got anything against astronomy ;-)

In fact, I put it to you that not only should this year be the year of alternative energy, but the year after that, and for the next decade to come. Let me come to my point, which is we don’t have an alternative place in the universe to live, so why are we still referring to alternative energies in all their forms as such?

Alternative energy is an oxymoron; there is no alternative. Unless you enjoy 55 degree days, raging weather and a very wet day at the beach (which is now about 3 km’s further inland than where it used to be).

Perhaps a massive rebranding of the term is required. It seems that people are happy to continue to use the current form of “main stream” energy (or whatever you’d like to term energy that isn’t “alternative”) as it’s too hard to change their ways. Again, I put it to you - what is the alternative to living on this planet?

This post doesn’t offer any solutions. But I do hope it will help raise the awareness of those reading it that things really do need to change, and fast.

13
Feb
09

Breaking news: Good triumphs over evil

Well on this website it does anyway

;-)

Had to take a bit of a break from the project I’m currently working on… think I’m being driven slowly insane by Flex.

15
Jan
09

as3 casting issue

Either I’m going slightly mad or casting using the “as” keyword works differently to the old way of casting.

Here’s some code to illustrate:

showFormItem = (((e.target as CheckBox).selected as String) == _local.displayTriggerValue[i]) ? true : false
Now this gives a different result to:
showFormItem = (String((e.target as CheckBox).selected) == _local.displayTriggerValue[i]) ? true : false

WTF?!

I’m pretty sure I’ve got my brackets in the correct spot.

Yhelp!

09
Jan
09

Passing parameters to a Flex eventListener - use a Dictionary!

Firstly, Happy New Year! Hope your ‘09 is off to a flyer!

Secondly, sorry about the rather mundane heading - couldn’t really think of what to call this post. I’ve been typing all sorts of things into Google trying to find a solution to what I’ll describe below.

I’m continuing the project I started in early December and having some very interesting battles with AS3 and the Flex framework. I’d like to document one of those battles today.

What I wanted to do was send parameters along with an event so that the event listener had access to them. Now I’m fully aware of how to do that when I’m in charge of dispatching the event, but was (and still am) at a loss as to how to add them in the following instance:

myComboBox.addEventListener(Event.CHANGE, eventListener);

This call to addEventListener occurs where the variables I want to pass get defined.

Here’s the code that I attempted to use (without luck) to get the parameters passed along with the event:

myComboBox.addEventListener(PodEvent.CHANGE, eventListener);
var myEvent:PodEvent = new PodEvent(PodEvent.CHANGE);
myEvent.displayTriggerValue = displayTriggerValue;
myEvent.formItem = triggerDisplay;
myComboBox.dispatchEvent(myEvent);

I could get the displayTriggerListener to run when the combobox changed, but the variables that I added to myEvent wouldn’t make it in there (further to that I was having type coercion difficulties, but that’s another story I think). The initial dispatchEvent was also allowing the eventListener to get the parameters, but obviously the idea is to have them passed along with every PodEvent.CHANGE event.

Now initially I got around this using closures (a new term to me). I understand the issues of using anonymous functions (ie. garbage collection issues) so searched some more for answers. I found nada.

So after a nights rest and a few more hours wrestling with it today, I’ve come up with the following solution that I’m rather chuffed about. I use a Dictionary to store a reference to the component and in turn create an object associated with that Dictionary element to store the parameters I want to pass into the eventListener function. Perhaps some code will illustrate what the hell I just typed (for me and you both ;-)

myParamDictionary[myComboBox] = {param1: value1, param2: value2};

The myParamDictionary is a private var in the class so is accessible within the eventListener

private function eventListener(e:Event):void {
	var _local:* = myParamDictionary[e.target]
	// rest of the implementation here. You can access the previously set parameters by _local.param1, _local.param2...
}

And to my utter delight (and surprise) it works!

The only downside is there’s no type checking on the parameters, which is what I originally wanted to use a custom event for.

If you’ve got a suggestion for my initial problem or a critique for my end solution please don’t be shy and post them!

15
Dec
08

Flex and my state/binding epiphany!

I’ve been trouble shooting an issue that I was experiencing in Flex for close to 20 hours now. Yup I know, what could possibly take 20 hours to work out!!?

What I’ve been trying to do is set up binding between a textfield in a state of my view, and a private variable set in that same view. I’ll post some code to better illustrate in a minute. The reason I was trying to setup this binding is because of the runtime errors I was receiving when trying to change the textfields text property from within a function of the same component. I was getting plenty of TypeError: Error #1009’s and was aware that trying to set the textfield’s text propery before the state was initialised and the textfield was actually created was what was causing the issues. I just didn’t know how to get around them.

I just now had a look at the properties you can set on a tag within the tag and lo and behold there it was! creationPolicy!!! I’m sure I thought of this at some stage during the process but was tied up trying to get bindings to work the way I thought they should to actually try it (more on this in sec). Setting the creationPolicy to be “All” does the trick for the textfields I know I need to reference.

Here’s the example showing how I fixed my problem. Right click for view source

Now I’ve still got a bone to pick with states and bindings. It seems like binding variables within a components script tags to components (ie. textfields) within state tags is nigh on impossible. That or I don’t understand how to do it.

Here’s a few links that touch on what I’m trying to do:

http://www.mail-archive.com/flexcoders@yahoogroups.com/msg59439.html
http://bugs.adobe.com/jira/browse/SDK-16131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

http://www.mail-archive.com/flexcoders@yahoogroups.com/msg26126.html

It seems like the bindings fire once, but then go dead and nothing entered into the textfields ends up in the getter/setter variables that I’m binding them to. I’ve tried using custome events (ie [Bindable(event="myEventChanged")]) with no luck, the mx:Bindings tag, change events in the textfields themselves (but then that defeates the purpose of using bindings right?). You name it I think I’ve used it, so I guess I just don’t understand how to bind to things properly in state based components.

Does anyone have any good information and or an example of how to get this working?

(I think I may have just stumbled across the reason why my initial efforts weren’t working. Pretty sure it’s to do with the Mate framework and the way it’s scoping method calls in my view. Will post some more info when I have it)

UPDATE: Ok I’ve looked at the Mate stuff and I ended up doing things in a slightly different way. Not sure if it was user error or I’ve got a legitimate qualm, no doubt the boffins at mate.asfusion.com will put me on the straight and narrow.





Categories

Recent Comments

Posts this month

February 2010
M T W T F S S
« Jan    
1234567
891011121314
15161718192021
22232425262728

Archives