Tag Archive

CLICK event in AS3 (pass parameters to function)?">How to create custom MouseEvent.CLICK event in AS3 (pass parameters to function)?

Published on 18 November, 2011 By Danny Froberg

Matt W answers;
Take advan­tage of the dynamic func­tion con­struc­tion in AS3.

pri­vate func­tion myCallbackFunction(e:Event, parameter:String):void
{
//voila, here’s your para­me­ter
}

pri­vate func­tion addArguments(method:Function, additionalArguments:Array):Function
{
return function(event:Event):void {method.apply(null, [event].concat(additionalArguments));}
}

var parameter:String = “A sen­tence I want to pass along”;
movieClip.addEventListener(Event.COMPLETE, addArguments(myCallbackFunction, [parameter] ) );

Drag-and-Drop in Flex 4

Published on 6 October, 2011 By Danny Froberg

UPDATE: I have another Drag-and-Drop Revis­ited post that cov­ers even more drag-and-drop func­tion­al­ity avail­able in Flex 4.
The Flex 4 gods were kind to us devel­op­ers when they made the great deci­sion to leave the cus­tom drag-and-drop sup­port unchanged. We just do what we’ve always done: detect the user is try­ing to drag some­thing via mouse­Down or […]

Flex wrappers for MadComponents

Published on 19 September, 2011 By Danny Froberg

Daniel Free­man writes; I’ve had feed­back from a few devel­op­ers want­ing a way to com­bine Mad­Com­po­nents with Flash Builder 4.5 for mobile.  I intended Mad­Com­po­nents as a ligh­weight alter­na­tive to using the Flex frame­work.  So while I don’t really like the idea of mix­ing them – it’s cer­tainly pos­si­ble to incor­po­rate Mad­Com­po­nents within an MXML […]

AMF Authentication & Authorization">Zend AMF Authentication & Authorization

Published on 7 September, 2011 By Danny Froberg

dkozar evolved a work­ing method to Authen­ti­cate and Autho­rize a Flex based app datas ser­vice call using Zend AMF, he writes;
I’ve been strug­gling with it, and fig­ured it all out — so, per­haps it could help oth­ers.
The authen­ti­ca­tion is called on the server only if cre­den­tials sup­plied from the client (via the remote pro­ce­dure call […]

Authentication using Zend_Amf

Published on 4 September, 2011 By Danny Froberg

Kevin Schroeder writes; I for­get why, but a few days ago I started doing some dig­ging around with authen­ti­ca­tion in Zend_Amf_Server. I had fig­ured that I would add an adapter to the Zend_Amf_Server::setAuth() method and that would be it.
But I was wrong.
AMF allows for mul­ti­ple request bod­ies to be sent at the same time. Of those there […]

SkinnableTextBase focusManager runtime error popup

Published on 1 September, 2011 By Danny Froberg

roustal­ski writes somthing that will save you quite a bit of time if you get caught with this run­time error; When you show a popup in Flex in a mobile envi­ron­ment, defined as the style “inter­ac­tion­Mode” being set to InteractionMode.TOUCH in this con­text, that is based on a com­po­nent that does not imple­ment the mx.managers.IFocusManagerContainer […]

Flex mobile in the browser

Published on 31 August, 2011 By Danny Froberg

Since Flex 4.5, you have had the abil­ity to develop and export your projects as Android, iOS and Play­Book mobile appli­ca­tions that behave as native ones.
You can also export your Flex mobile project as AIR desk­top apps. Just open Flash builder, open your project and choose Project >  Export release build. You can then export a […]

AMF">File uploads with Adobe Flex and Zend AMF

Published on 31 August, 2011 By Danny Froberg

Leonardo França writes; Zend AMF is an imple­men­ta­tion done in PHP to work with the com­mu­ni­ca­tion pro­to­col binary AMF (Action Mes­sage For­mat) and is part of Zend­Frame­work. I had to imple­ment a sys­tem to upload files that were a lit­tle dif­fer­ent than what is typ­i­cally used in Flash, with this fea­ture had to be integrated […]

MP3 Encoder on Alchemy">Shine MP3 Encoder on Alchemy

Published on 31 August, 2011 By Danny Froberg

Shine (formely 8hz-MP3) is a sim­ple light­weight C-based MP3 encoder made by LAME devel­oper Gabriel Bou­vi­gne.
Descrip­tion of Shine on his web­site:
The goal of this encoder was not qual­ity, but sim­plic­ity. I tryed to sim­plify the encod­ing process as much as pos­si­ble. So Shine is then a good start­ing point when a pro­gram­mer needs a very […]

WAVWriter.as

Published on 31 August, 2011 By Danny Froberg

Helper class to write WAV for­mated audio files. The class expects audio input data in a byte array with sam­ples rep­re­sented as floats.
The default com­pressed code is set to PCM. The class resam­ples and for­mats the audio sam­ples accord­ing to the class prop­er­ties. The resam­pling geared for per­for­mance and not […]

10 X Zend Amf Performance enhancements — please test!

Published on 18 January, 2010 By Danny Froberg

Wade Arnold comes with some very good news for us that use Zend_Amf, he writes; Mark Rei­den­bach from everytruckjob.com has sub­mit­ted a awe­some patch for Zend Amf that cre­ates a huge per­for­mance increase. Thanks so much Mark! I have also added a ref­er­ence check opti­miza­tion that uses SPL_object_hash to quickly see if an object has […]

ZamfBrowser 1.0

Published on 28 December, 2009 By Danny Froberg

When doing AMF projects espe­cially in AIR it’s good to see what gets returned from your Zend_AMF ser­vices, here is the solu­tion; Zamf­Browser allows devel­op­ers to unit test Zen­dAMF Ser­vice classes via an Adobe AIR appli­ca­tion. Imple­men­ta­tion requires a sim­ple edit to the Zen­dAMF gate­way file that allows Zamf­Browser to intro­spect your server set up […]

Get Adobe Flash playerPlugin by wpburn.com wordpress themes