if( $("#debaak").length > 0 )
After discussing this subject we found the following solutions. JQuery returns an object, with the get function it is possible to get any element in the jQuery object returned by the jQuery selector
flashMovie = document.getElementById("debaak");
Below you can find the necessary code for flash.
public function Main()
private function callJS(msg)
//called from js
trace('call from js:' + msg)
I used to build my carousels in flash, but i seemed a good challenge for me to build a nice looking carousel in jQuery. Of course the carousel should have the same functionality as a flash carousel. Thus said the carousel should get all the content from the html itself, include paging, the possibility for some text over the image and have nice transitions.
I searched the web for available plugins and the jQuery Cycle plugin seemed the best start. The only task left for me was finding a way to display text over the images and style the carousel. The result is astonishing and since the content is html it has a lot of advances over flash, SEO, accesibillity and much easier to implement for backend developers. However flash still has to advantage ( or disadvantage ) that it compiles your code which makes it less easy to copy it.
The result and code ( of the jQuery carousel ) can be found here
I always thought that arraycollection were only accessible within Flex. Last week however I needed to access some complex data from a webservice in flash. To access the webservice I used a very handy flash extension, which provided the remoting classes from Flex into flash. The result however contained a ArrayCollections. Luckily I found out that is was perfectly possible to parse the data from the arraycollections into arrays and object. I knew that the result had to contain a Clips Array within each Chapter as you can see in the debugger screenshot. Now in flash I could access these Clips like this
var _chapters_ar:Array = _chapters.list.source;
for( var i:int = 0; i < _chapters_ar.length; i++ )
var _clips_ar:Array = _chapters_ar[i].Clips.list.source;
for (var j:int = 0; j < _clips_ar.length; j++)
see screenshot below