Archive for category: JavaScript

BeyondTellerrand Play 2012

Hallo und humppa nach Norddeutschland.

Dieses mal trägt die ehemalige Flash Forum Konferenz (FFK) das erste mal den Namen BeyondTellerrand Play (#btplay). Das soll natürlich keinesfalls die Abkehr von Adobes Flash Technologie bedeuten, aber die Konferenz beheimatet schon seit je her weit mehr als nur Flash. Dem sollte nun auch in einem anderem Namen Rechnung getragen werden.

Adobe MAX 2011 – L.A.

Hallo und Humppa! nach Deutschland,

vorweg einmal vielen Dank an Adobe, dass ich dieses Jahr die Eintrittskarte zur Adobe MAX für mich kostenlos gab.

Auch wenn es in diesem Jahr nicht so einen großen Hype um neue Ankündigungen zur MAX im Vorwege gab wie im letzten Jahr, sollte es doch zumindest eine Reise nach L.A. Wert sein. Zumindest das Opening der ersten Keynote auch rein von der Show her sehr überzeugt. Mit 48 HD Beamern wurde hier eine große Show auf eine riesiege Leinwand im Nokia-Theater gebracht:

Obfuscate/ hide JavaScript code by including into Flash file

Why / Pro / Con

Of course there will be a lot people who might say that it’s bullshit to include JavaScript into a Flash file (.swf) to obfuscate the JavaScript code – and your right. This is just one thing you can do which has some advantages and also some disadvantages.

In case you want to hide your JavaScript source code not to be seen by other people because it takes you so much time or even money to develop this code – sorry to say, but this will not finally work. There are a lot websites out their which “encrypt” your JavaScript code and make it less readable for humans. But there are as well sites which do the opposit and make it really well readable again. So it will always be possible to have a look at your source code. Also hiding the JavaScript in a flash file will just makes it more difficult, but not impossible, because you could also decompile the flash file.

Webinale 2011

Endlich habe ich es mal geschafft zur webinale nach Berlin zu kommen. Drei Tage Web Von-Bis bei gutem Essen und interessanten Themen – so der Plan.

Die Eröffnungs Keynote kommt von Peter Schaar, dem Bundesbeauftragten für den Datenschutz und die Informationsfreiheit, und damit dem beruflichen Feind von Google. So versteht er seine Aufgabe aber zum Glück nicht. Auch die Keynote war natürlich keineswegs der Aufruf alle tollen Apps einzustellen. Er wollte das Bewusstsein für den Datenschutz und die Selbstbestimmung des Users schaffen. Datenschutz gehört mit an den Anfang der Anwendungsentwicklung und nicht in irgendeine Phase nach dem Livestart – “Da war ja was”.

Start-up-Karussell: Innovative Multi-Device-Lösungen:
Hier gabs zweimal ein Startup für digital Publishing für verschiedene Tablets, einen Geo-Location Dienst zum Freunde finde und Prämien bei Check-Ins kassieren und wahwah.fm. Letzteres hat mich offensichtlich überzeugt, weil es genau die Komponente abbildet die mir bei grooveshark.com noch fehlt: Zusammen musik hören. Der User stellt seine Playlist mit seiner eigenen Musik zusammen ( auch die eigene Musik hochladen oder entsprechende Musikportale einbinden – derzeit nur Soundcloud ) und stellt das dann als eigene Radiostation zusammen. Die verbundenen Freunde können dann zusammen die gleiche Musik hören und sich entsprechend dazu auch austauschen. Die iPhone App befindet sich im Review. Überzeugt!

Google Developer Day 2010

Dieses Jahr habe ich es endlich mal wieder geschafft zu den Google Developer Days zu kommen. Veranstaltungsort dieses Mal in München. Die größte Enttäuschung gabs es gleich am Eingang – ein Massenevent, ohne repräsentatives T-Shirt für jeden Teilnehmer – welche Veranstaltung kommt heute noch ohne T-Shirt aus ?

Die Agenda ( http://www.google.com/events/developerday/2010/munich/agenda.html ) lässt einem natürlich wieder die Qual der Wahl. Auch wenn ich zur Keynot nicht rechtzeitig gekommen bin, soll es wohl stark Android lastig gewesen sein – wer kann es Google verübeln.

Added Preloader Examples

Added some example files for the swfJSPreloader: http://blog.sebastian-martens.de/swfJSPreLoader#examples.

cheers,
Sebastian

JSCONF 2010, Berlin

Hallo und Humppa nach Norddeutschland,

Endlich darf ich mal wieder raus. Dieses mal zur JavaScript Conference Europa ( jsconf.eu ) nach Berlin. Die Tickets ware relativ schnell ausverkauft – es sollte auch bewusst klein gehalten werden. Insgesamt wurde knapp 200 JS-Fans Eintritt gewährt. Man merkte auch recht schnell, dass es sich wirklich um eine europäische Konferenz handelte. Deutsche Sprache war eher die Außnahme.

Die Keynote von Dion Almaer, Ben Galbraith ( ajaxian.com ) zusammengefasst: “Das Web ist gut und ganz wichtig in der Zukunft. Die JavaScript Performance wird besser. Ende” – war also recht übersichtlich.

Als Freund von dojo habe ich mich natürlich auf Peter Higgins ( @phiggins ) gefreut. Es gab nichts großes Neues. Mehr ein “Good Parts” Version von Peter Higgins.

User Mouse Tracking / Website Research

If you use website statistic tools – and thats something i guess everybody is interested in – you got well numbers about how many users visit your website and exactly which page of your website. You will also know from which other website the came and which key words they used within Google to get to your page. Each of this are very important facts for exmaple for SEO aspects, etc. For example Google Analytics is of course a great free tool for this ( include the old discussion how many more should Google know about you and your website ).

Dynamic Resize Flash Application Container / Flash Stage ( without external JavaScript )

[Update: Add complete Flash Builder project source files. ]
If you have dynamic content within your Flash application or you have several states or “pages” implemented, which all have different content, it might be helpful to resize your flash aplication container within the html- context. For this it’s not enough to resize the application from within the flash application. You also have to resize the surrounding html container. This is the object tag for Mozilla browsers or the embed tag, if the client uses the Internet Explorer.

In each case you have to use the ExternalInterface. You call it from the flash application with parameters for the new height and width value of the flash container. On the other side you have to define an javascript function which do the resize operation with these values.

Here is an AS3 class which already includes the JavaScript part. Soyou don’t have to define an extra JS function. So you just have to import the AS3 class into your project and your ready to resize you application from Flash.

Quick start with Flash ExternalInterface class

The ExternalInterface class allows you to communicate with the Flash wrapping container, which is usually the HTML page with JavaScript capeability. It allows you to send data from ActionsScript to JavaScript and vice versa.

The ExternalInterface class is implemented for nearly all current browsers. Please see the documentation for a detailed list of the supported browsers here.

All five attributes and methods are static, so you don’t need an instance of this class.

Make sure ExternalInterface is available

When using the ExternalInterface you should make sure it’s available. So please test the boolean value ExternalInterface.available:

if( ExternalInterface.available ){
  ExternalInterface.call( .... )
}

Preload assets with JavaScript, load-complete callback for single assets include SWF/Flash

Currently i need to know within JavaScript when a SWF-file was loaded completly. You could easily handle this with a single ExternalInterface call from within the Flash-application. This is not a very nice solution if this has to be done for each of you flash-applications. This is the neccesary way if you also have to access the flash-application from javascript-side. But in my case i just need to know when the flash is loaded and available in the browser cache.

For this i wrote the swfJSPreLoader. This preloader accepts an array of assets (jpg,gif,png,swf) you would like to preload. Internally it will create an flash-application which does the preloading. You could define several callback handlers. So JavaScript gets to know when all assets are loaded or each single asset is loaded including SWF-files.

JavaScript Timer Class

Here is a little JavaScript Class which allows you to have timed function calls. Of course there could be different instances of these timers. Here is a example how to use it:

var timer = new Timer( {'interval':1000} );
timer.start( timedFunction );
 
function timedFunction(){
   // called every 1000 milliseconds
}

The function timedFunction will be called every 1000 milliseconds. The millisecond interval will be configured within the configuration object, which is given as parameter into the the class constructor. There is also an optional second parameter for the start function to set the scope. This allows you to use the timer within other JavaScript objects. To stop the timer use the stop function.

Set innerHeight also for IE

I’m really not a fan of popup windows within a website. But sometimes it really makes sense. For example for a little campaign which is more or less a microsite. But you want not to lose the website context. In this case i would “allow” to open the campaign in a popup window.

The popup window should of course be as small as possible and should resize to the campaigns size. But because you never know which kind of Browsertoolbars the user have installed ( and you don’t want to disallow all tool- and browserbars ) you can’t really set the window size, because the IE does not support the innerHeight or innerWidth attribute of the window-element.

Gallery

IMG_2405 Untitled_Panorama15 IMG_4050 Untitled_Panorama109 img_5549_gs IMG_7544 Untitled_Panorama53 IMG_7561 IMG_8547 Untitled_Panorama86 IMG_4404 img_0407

Latest Comments

Latest Article

Categories

del.icio.us