After receiving an email from Adobe detailing an application to load XML data into a DataGrid (written by Christoph Rooms) I hit a wall when trying to call a method in my actionscript. The DataGrid column had an mx:Image contained within mx:Component in an itemRenderer so that a little icon image can be displayed according to the xml data.

code

When I edited click=”…” and inserted my reference to an actionscript method I encountered:

1180: Call to a possibly undefined method myMethod

So I scoured the net, help files and saw ways of tackling this issue, some involving (if I understood them correctly) creating a custom event class then calling a function which is situated in an mx:Script tag which itself is within the mx:Image tag ?:)?

Anyway, the solution was in time found (thanks to my flex bible) and it is irritatingly simple. It turns out as always its a scope issue, the mx:Component tag defines a new scope where the local scope of the item renderer is defined by the MXML code.

1
click="outerDocument.myFunction();"

So the outerDocument reference to call the function on the containing page saves the day!!! cool…

This may be of some help to some, a simple solution to a simple silly problem….

Today I delved into compiling a datgrid with data from an xml file via HTTService on mac osx (something I have only done on windows so far) and generated this error:

RPC Fault faultString=”HTTP request error” faultCode=”Server.Error.Request”

My code was:

1
2
3
<mx:HTTPService id="srv"
      url="assets\datagriddata.xml"
        result="beats = srv.lastResult.styles.item"/>

Problem solved with a simple flip of the backward slash in the url so it read:

1
url="assets/datagriddata.xml"

In this tutorial I will run through the process I followed to get up and running with Flash Remoting utilising ColdFusion MX7 and a MySQL database on Mac OSX. I will not go into great detail on the installation instructions of ColdFusion MX7 and MySQL on Mac OS X due to there being some fantastic tutorials already accessible, links of which I have provided. In fact, I have provided a few links here as the process of getting JRun, ColdFusion MX7 and MySQL up and running was for me slightly tricky (then being a mac newbe) and therefore I thought it best to have too much information rather than not enough. Even though this is focused on the Mac OSX platform some of the principles may be utilised on the Windows platform, especially creating a database, ColdFusion component, ActionScript 2 class for remoting

Read on →

Now I know that AS3 is all the rage now and I really do love the changes made which most definitely make my life easier coding, however, I remember a major breakthrough I had with writing classes in AS2 and still use AS2 due to the lack of computers in the UK hospitals which either still run off windows NT and so cannot upgrade to Adobe Flash Player 8/9 or are not permitted downloads or installations full stop. So publishing to Flash Player 7 regularly occurs and thus AS2 still represents in my world and I am sure many others. So, lets go back a wee bit and tackle a pain in the rear period I had in comprehending the logic behind parsing data between classes and my saving grace…. EventDispatcher.

Read on →

My major problem is I get tired of looking at the same stuff really quick. This ends up creating much more work for me due to wasting half an hour here and there on ideas of reconstructing my websites. Being a man who constructs most sites in Flash I was looking for another method of site development to get my teeth stuck into and had wanted to venture further into the world of css for a while. I happened to be reading through an article on creating a web site mock up in Fireworks and then translating this all to Dreamweaver and creating the whole site using xhtml and css. So flicking through the article and armed with the css book ‘Bulletproof Web Design’ I delved head long into creating a new Newtriks site…

Read on →

I recently had the pleasure in tech editing the brand new publication titled Hands-On Guide to Flash Video: Web Video and Flash Media Server (Hands-On Guide Series) by Stefan Richter and Jan Ozer.
This was a fantastic opportunity on my behalf to work through a subject which is a bit of a rarity on the literature front and covers (in their words) Flash Video production from soup to nuts, beginning with how to configure your camcorder and ending to advanced server techniques like bandwidth detection and FMS logging and reporting. As far as flash video deployment on the web either progressive or streaming this will give you a solid foundation to build on… I learnt a lot of nice little tips and tricks from Stefan who in my eyes is most definitely the FlashCom guru… Buy it :)

I have been underway building a vertical menu flash video player and came up with the ‘vertOne vidPlaya’. A different angle I grant you but I think once you get used to it you may just like it. It was built using an ActionScript approach as opposed to a FLV Playback Component, loading in the flv files from and xml list so it’s easy to update and maintain. The xml is swung into a ListBox component made visible by clicking the little arrow on the right of the video container so you can skip to a chosen video as an alternative to clicking the next button on the main navigation bar. There is a right click menu option to pause/play or show/hide the xml list. Then finally the usual suspects for video players, scrub bar and volume slider. (MIA)

He starts the Flex mission and the flashcomguru himself ploughs head first into the deep end and emerges with this sweet looking FlexAudioChat app. Text and audio functioning with the typical fresh flex look and feel using Flash Media Server! Video on the horizon…..we waiting dude…..

The main thing that got me into flash and coldfusion was development of quiz’s. I spent months trying to develop some thing which did not have to rely on the quiz components supplied with flash. I eventually completed a quiz which used coldfusion storing all information in a mysql database (this was done with my mate Mike Simpson).

It was then requested that I changed it all to work off a CD and information to be stored locally :( so back to the drawing board I reformatted the whole framework to import the questions etc from an XML file and then store the USER details and results in a Shared Object, which actually worked sweet as a nut.

During development I noticed whilst hitting the forums there are a lot of people out there trying to achieve a similar concept in flash, with this in mind I am going to dig out all of the projects and try and sort some mini tutorials for Flash based quiz’s. I will concentrate more on the local based solution originally then maybe progress onto the remote methods some time later.

Welcome to the newtriks blog. Here I am going to post all aspects of my work and development using Adobe Flash, Coldfusion and various other web design software. I will post links to new sites I develop and share bits of code written as projects progress, which may (I hope) prove useful for some.

I try to maintain standards of coding Object Orientated Programming with Actionscript 2 using external classes. I am reading avidly around the new AS3 and will pluck the guts up to start writing my first bits of code worth putting up here very soon. The almighty Flex 2 is the next step I am going to be taking over the coming couple of months and will keep updates on the fly here.