Visualslider in productive usage

Misc

Hello,

while watching for some referer statistics on synie.net, I stumbled across a thread in the OL forums. Here it is:
http://forum.openlaszlo.org/showthread.php?t=13698

LaSlow writes about using my visualslider for a product show case. Just visit this site to see it in action:
http://www.smartcard24.com/
It’s hot, isn’t it? ;-)
I had to reload the website multiple times in order to see it, instead of an advertisement. But it looks great. It’s nice to see what people do with my code snippets. Just recently I got an e-mail from LaSlow with the extended code. It was you, wasn’t it? I’ll try to prepare it for upload during the next 2 weeks.

So, in any case - if you did some improvements to some of my code snippets, feel free to send them to me. I’ll publish them here.

Thanks to LaSlow for sharing the link.

Mario

Ps.: To anyone - Liked my code and want to do me a favour? My wishlist can be found here ;-)

No Comments

EeePC & OS X: W-Lan (Hackintosh)

Misc

Hello,

I installed OS X on my little EeePC 900a. After using some different Images and also trying to Install my original copy of Leopard, I ended up with iATKOS 5i. Most of the Hardware worked out of the box. Even hotplug, what didn’t work before.
There are some things that didn’t work:
- Display resolution
- Ethernet
- WiFi
- Sound

I got it managed to make them work, by now. Well, almost ;-)
As soon as I’m finished with this OS X on EeePC, I’ll post all the things I had to do to get them running. But before this, I want to share my experience with the built in Atheros WiFi card.
Vendor ID: [168c:001c]
Subsystem: [1a3b:1026]

Different OS’ display this device with different names. But as far as I know, it’s an AR5007EG. There are various tutorials out there to get this card working. Well, at least in some way.
Have a look at this discussion:
http://www.insanelymac.com/forum/index.php?showtopic=138351
18 Pages - all about this card and different types of it. There are some ways, that really work. But you’ll need Kismac to make this device see wireless networks after every reboot. It works like this:
- Before you shutdown your EeePC, you must turn the Airport off.
- After booting, turn it on.
- Run Kismac and scan for wirelless networks with Airport Extreme Passive Drivers.
- Now your Airport will notice all the new networks.
And if you get Kernel Panics:
- Remove Extensions.mkext* before every shutdown.

And believe me - it’s not nice to do this every boot/shutdown. I wrote scripts, that do exactly this. I still need Kismac for making the Airport notice the networks, but I’m on it. Kismac replaces the Airport drivers during scan to use it in monitor mode. I’m still finding out how everything works, and so on. But have a look into the Resources directory within Kismac. It provides all the kext files. Also there is a driver called “viha” which uses the WLanDriver.kext. Viha is an Airport driver and W-Lan utility, which also provides a shell based network stumbler. I think this is the way to go … But I’m still experimenting.

If you’re annoyed by turning on/off the Airport, removing the Extensions.kext and firing up Kismac, then use these scripts. They work for me:

1. Preparing
Open System Preferences and go to Network. Write down your Location at the top. Mine is called AON, but usually yours is named “Automatic”. Create a new one and call it “AOFF”. Within “AOFF” you’ll have to remove Airport from the list on the right side. Add another (unused) service, if you can’t remove Airport. Switch back to “Automatic”, apply and close it.
AOFF will be used to switch off the Airport. You can’t do this via shell, but you can switch those network profiles via shell. If you switch to a profile, that has no Airport service, it’ll be turned off. You can try this by switching between these networks, applying them, and looking for what happens with your Airport symbol on the top of your screen.

2. Login-/LogoutHooks:
Create two files, somewhere (Mine are located in /Library) which will be used for Airport and Extensions. I’ve called them wlankickstart and wlankickstop ;-)

wlankickstart looks like this:

#!/bin/bash
scselect Automatic

Replace “Automatic” with your default network Location, or leave it, if you’re not sure.

wlankickstop looks like this:

#!/bin/bash
scselect AOFF
rm /System/Library/Extensions.mkext*

If you don’t have random kernel panics during boot time, then remove the last line, because it causes an annoying system message during shutdown.

Make those files executable (chmod a+x filename) and store them somewhere.
Now we’re gonna make them executed while login/logout:
sudo defaults write com.apple.loginwindow LoginHook “/path/to/wlankickstart”
sudo defaults write com.apple.loginwindow LogoutHook “/path/to/wlankickstop”

Now Extensions.mkext will be beleted and Airport will be turned on/off during boot/shutdown.

3. Kismac
If you don’t have it, download and install it. Open Script Editor from /Applications/AppleScript and write a new script:

tell application “KisMAC”
   activate
   startScan
   delay 5
   stopScan
   quit
end tell

Try it. It’ll run Kismac, scan for 5 secs and turn it off. Make sure, Kismac uses the Airport Extreme Passive Driver. Compile this script and save it as an Applications (without “Startup Screen”). Now Open up System Preferences, go to Accounts, select your user, go to Login Items and add the previous compiled application.

You’re done. Reboot and enjoy. Now you’ll only have to select your W-Lan Network after a reboot instead of doing this process by your own.
It works? Give me a comment ;-)

3 Comments

Sockets/IRC using Flash/Openlaszlo without server side proxy

OpenLaszlo

Hello,

some weeks ago I’ve been playing around with the possibility of flash of using sockets. I tried to connect to various services, but unless there is any crossdomain.xml on the server it is just impossible. Well, there is a way to use a server side proxy to create such connections, as it’s allowed to open sockets from the flash client to the same domain, but this isn’t always the best solution. For example if you want to connect to an IRC server, you will be limited to a few connections. Besides that, not everybody has the possibility to run a proxy server for such services.
After some hours of experiments, I got a solution. It’s not very nice and it’s questionable whether this could ever be used in productive environments - but it’s pretty nice to play with ;-)

In this example I used OpenLaszlo to do the flash part - but it can be easily reproduced with actionscript. Furthermore I decided to explain it with an IRC network and as for that (to keep it simple) I used a library to do the protocol stuff. But you can extend this to any service, that uses network connections.
It’s pretty simple:

  • First we create a Java Applet, which does all the socket stuff
  • This Applet will be signed to be able to open connections outside of its sandbox
  • Then the Flash Client will be designed
  • And after all that, a small set of Javascript Functions are needed to make them communicate

This is the example. It’s quick’n'dirty, but it works. You have to accept the Certificate. If you don’t the network connections won’t work.

Keep on reading for examples …

Continue Reading »

No Comments

OpenLaszlo and Full Screen / Kiosk Mode

OpenLaszlo

Hey,

I read about OpenLaszlo and full screen mode at the Laszlo forums. So I thought to publish a very small demo of how to create a solo app, that uses this feature. Here is a demo:


It’s pretty easy, as you can access the AS objects directly with OpenLaszlo:

<canvas>
  <script>
    Stage.scaleMode = "noScale";
    Stage.align = "TL";
    function toggleFullScreen() {
      if (Stage["displayState"] == “normal”) {
        Stage["displayState"] = “fullScreen”;
      } else {
        Stage["displayState"] = “normal”;
      }
    }
  </script>
  <button text=”Toggle Fullscreen” onclick=”toggleFullScreen()” x=”${parent.width/2-this.width/2}” y=”${parent.height/2-this.height/2}”/>
</canvas>

Deploy it as a solo app and integrate it into your website like this:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,18,0" width="200" height="200">
  <param name="allowFullScreen" value="true" />
  <param name="movie" value="fullscreen.swf" />
  <embed src="fullscreen.swf" allowFullScreen="true" width="200" height="200" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

There it is. Your very own full screen app ;-)
There are some restrictions (like for keyboard input) and I haven’t tried to use it in a server deployment, yet. So feel free to experiment …

[EDIT:]
http://jira.openlaszlo.org/jira/browse/LPP-8107
Thanks to Raju Bitter

Mario

6 Comments

Hibernate on EeePC 900A

Misc

Hey,

before I start to talk about hibernate, I want to mention a very strange behavior of the 900A. The internal SSD is named sda OR sdb, depending on whether there is a card in the card reader at the system startup. So if there is a card plugged in, the internal SSD will be flagged as sdb. If there is no card, it will be sda. WTF? I really have no idea what this is caused by. But I think this causes a problem with hibernation.
At first, I didn’t even realize, that the internal SSD changes its device name. I use Ubuntu eee and during the installation, the fstab and menu.lst were filled with UUID’s instead of the device names - So there is no problem with booting and mounting them.

Anyway, I tried to get hibernation aka suspend to disk to work using this tutorial:
http://www.ubuntu-eee.com/wiki/index.php5?title=Fix:_hibernate

Everything seemed to work. s2disk caused the notebook to hibernate (as long as i didn’t insert/remove a card), but the wakeup ended in a ordinary boot, without resuming the written image. After hours, I got it work. Just do exactly the same, as it’s described in the tutorial, except for one step.
When you’re asked to change the /etc/uswsusp.conf, don’t use any device names in it. Do it, as Ubuntu did it during the installation: Use UUID’s.
To get to know the UUID of the internal SSD, we have to find out, how it’s labeled:

mount

This will return something like this:

/dev/sdb1 on / type ext3 (rw,noatime,errors=remount-ro)
proc on /pro....

Now, we know our SSD is /dev/sdXX (sdb1 in my case), because it’s mounted to /. In the next step, we’ll get to know the UUID:

sudo vol_id /dev/sdXX |grep UUID=

This will return the UUID. In my case:

ID_FS_UUID=16fa07c8-8416-5f10-85c6-a8410fad510

And now we’ll use this UUID instead of the device name in /etc/uswsusp.conf:

# /etc/uswsusp.conf(8) -- Configuration file for s2disk/s2both
resume device = /dev/disk/by-uuid/16fa07c8-8416-5f10-85c6-a8410fad510
compress = y
early writeout = y
image size = 0
RSA key file = /etc/uswsusp.key
shutdown method = platform
resume offset = XXX

If you’ve found this site after you already tried the tutorial mentioned above, then just do the changes and run this at the end:

sudo update-initramfs -k `uname -r` -u

Otherwise hibernate will create the image but it won’t be booted.

And now, for me, it works *woohoo*
I hope this will help ;-)

Kind Regards,
Mario

3 Comments

Ein voellig subjektives EeePC Review

Misc
EeePC

Hey hey,

heute mal keine GPL-Wohltaten von mir, sondern ein kleines Review zu meinem neuen Spielzeug. Ein EeePC 900A-BF. Erstanden habe ich den Winzling auf der Amazon Resterampe fuer 240 Euro - also ein Ruecklaeufer, aber ohne jegliche Maengel.

Wieso das 900A?
Nun, ich brauche keine Power hinter meinen Rechnern - und eine schwaechere Webcam und langsamere SSD-Karte konnte ich, angsichts des Preises, in Kauf nehmen. Dafuer gabs dann noch eine 8 GB SDHC Karte von Transcendence dazu, die auch ohne weiteres funktioniert.

Was gefaellt mir gut?
Dass das kleine Schmuckstueck so winzig, portabel und vor Allem so extrem leicht ist. Es passt ohne probleme in mein kleines IT’ler Handtaeschchen und ist bei Meetings das perfekte Allround-Werkzeug. Und mit mehreren SDHC Karten habe ich auch immer meine wichtigsten Daten dabei. Fuers Surfen, Mailen, Messengen, Musik hoeren und Videos schauen eignet es sich auch perfekt. Das Multitouchpad ist fuer einen Macler natuerlich noch ein super Bonus.

Was gefaellt mir nicht so?
Die Tastatur. Abgesehen davon, dass die Tasten doch erheblich kleiner sind und dadurch das schnelle Tippen ein wenig gewoehnungsbeduerftig ist, hat sie aber auch andere Schoenheitsfehler. Die Space-Taste ist sehr schwergaengig und es kommt oft vor, dass ich zwar drauf druecke, aber kein Leerzeichen ankommt. Auch ist es oft so, dass ich Buchstaben doppelt tippe, da ich irgendwie nicht fest genug drauf druecke und dadurch, komischerweise, zwei Anschlaege interpretiert werden. Auch duerfte die Akkulaufzeit von 3-4 Stunden ein wenig laenger sein. Und das vorinstallierte Xandros ist fuer einen Linux-Kenner wirklich grausam. Jedoch durfte dies direkt am ersten Tag fuer das Ubuntu eee die Festplatte raeumen. Die etwas langsamere SSD Karte bemerke ich unter Ubuntu wirklich nur sehr sehr selten - wuerde diese also auch nur als wirklich kleinen Makel ankreiden.

Wie ist mit Ubuntu eee?
Nachdem man alles unnoetige entfert hat, ist alles einwandfrei. Gnome war fuer mich ein wenig gewoehnungsbeduerftig, aber das ist geschmacksache. Die komplette hardware funktionierte auf Anhieb. Lediglich Hibernate will noch nicht so ganz funktionieren.

Tipps?
Nun, es gab bei mir anfangs kleinere Schwierigkeiten. Ich konnte den EeePC nicht ueberreden, von einer mit ext2 formatierten SDHC Karte zu booten - Fat32 ging aber ohne probleme.
Auch konnte ich den Bootloader nur jedes 10e mal mit ESC zur Auswahl zwingen. Abhilfe schafft hier, wenn man nach dem Starten direkt mehrmals F2 drueckt, bis die Webcam aufleuchtet und dann direkt anfaengt ESC zu druecken.
Wenn die Webcam unter Ubuntu eee nicht geht, einfach mal ins BIOS schauen. Meine war dort deaktiviert.

Fazit:
Ein wunderbares Spielzeug und Helferlein. Abgesehen von kleineren Schwaechen ist der EeePC 900A wirklich sein Geld wert. Ich bin fasziniert und wuerde es sofort wieder kaufen.

Gruesse,
Mario

No Comments

Slideshow with OpenLaszlo as a “Widget”

OpenLaszlo

Hey,

I want to introduce you the previous posted Slideshow created with OpenLaszlo, but this time, you can use it without any knowledge of OpenLaszlo. Just download it and use a simple HTML-embed object, to tell the SWF, which pictures you want to use. This is an Example:


(enlarge)

You can also use your mouse to navigate between the pictures and to start/stop the autmatical slide show.

The code which I used to embed it is:

<object width="400" height="300">
  <param name="movie" value="visualslider/visualslider.swf">
  <embed src="visualslider/visualslider.swf?vspic1=res/1.jpg&vspic1w=300&vspic1h=200&vspic2=res/2.jpg&vspic2w=300&vspic2h=200&vspic3=res/3.jpg&vspic3w=300&vspic3h=200&vspic4=res/4.jpg&vspic4w=300&vspic4h=200&vspic5=res/5.jpg&vspic5w=300&vspic5h=200&vspic6=res/6.jpg&vspic6w=300&vspic6h=200&vspic7=res/7.jpg&vspic7w=300&vspic7h=200" width="500" height="300">
  </embed>
</object>

It’s quite simple. You just have to include the SWF file into your HTML document and give it some parameters about which pictures you want to use in the slideshow.
This is the URL to the SWF file I used:

visualslider/visualslider.swf?vspic1=res/1.jpg&vspic1w=300&vspic1h=200&vspic2=res/2.jpg&vspic2w=300&vspic2h=200&vspic3=res/3.jpg&vspic3w=300&vspic3h=200&vspic4=res/4.jpg&vspic4w=300&vspic4h=200&vspic5=res/5.jpg&vspic5w=300&vspic5h=200&vspic6=res/6.jpg&vspic6w=300&vspic6h=200&vspic7=res/7.jpg&vspic7w=300&vspic7h=200

  • “visualslider/visualslider.swf” is the place, where visualslider.swf is located.
  • “?vspic1=” is the parameter to tell the SWF, which picture (”res/1.jpg”) to use.
  • “&vspic1w=” to define the width (”300″).
  • “&vspic1h=” to define the height (”200″).
  • After that, I pass the next parameter for the second picture (”&vspic2=”), and so on.
  • You can also define “&vsms=” to tell the SWF, how fast it should change the picture. Default is set to 5000.

Click here to download the SWF.
Click here (main.lzx, visualslider.lzx) to download the sourcecode (GPL’ed).
Click here to see the fully documented Visualslider component.
I hope it’s useful for you.

Mario

No Comments

sYnie.net glaenzt im neuen Look

Misc, sYnie

Hey,

lange hats gedauert, aber nun konnte ich endlich mal Wordpress upgraden. Nach einem etwas groesseren Versionssprung scheinen die ganzen Umlaute floeten gegangen zu sein. Da ich aber selbst kein Fan von Umlauten bin, blieben die Posts davon verschont. Lediglich Kommentare mit Umlauten wurden ein wenig verunstaltet - Ich hoffe aber, dass ich dies noch behoben bekomme.
Und mit dem Update habe ich mir mal ein neues, schickes Template rausgesucht. So ist’s doch gleich viel gemuetlicher hier, oder?

Gruesse,
Mario

1 Comment

Slideshow for OpenLaszlo

OpenLaszlo

Hello,

I had to create a Presentation some days ago. As we needed a little slideshow of pictures, within that presentation, I decided to create a little Sliteshow with OpenLaszlo. Maybe it’s useful for you, so you can use it under the terms of the GPL.

Here is a little Example, created with “Visualslider”:
Visualslider.swf

And this one ist quite the same, but with Slides sliding “circles”:
Visualslider_c.swf

You can click on the Slides, to navigate through them. Also you can use the cursor keys, to do the same. With the key “t” you can toggle between automatical sliding and manual sliding.

And here is the source code:
Visualslider.lzx

A little Documentation:

           <visualslider>

  • Description:
    The container view
  • Attributes:
    currentslide - (readonly) returns the selected slide
    slideduration - the time in ms for the slide-animation
    circular - boolean for circular-sliding
    timerms - the time in ms for automatical sliding
    istimerstarted - (readonly) returns a boolean whether automatical sliding is started or not
  • Methods:
    slideUp() - select next slide
    slideDown() - select previous slide
    slideTo(n) - select the nth slide
    startTimer() - start automatical sliding
    stopTimer() - stop automatical sliding

           <visualsliderview>

  • Description:
    A slider-view. Must be placed in <visualslider>
  • Attributes:
    originalwidth - the 100%-width of the view
    originalheight - the 100%-height of the view
    currentslide - (readonly) returns a boolean whether this visualsliderview is selected or not
    shadow - boolean to display a shadow under the visualsliderview
    factor - (readonly) returns a scale-factor with reference to originalwidth and originalheight (useful to scale subviews)
    slidenumber - (readonly) returns the number of the slider
  • Events:
    onstop - Fires when the animation is finished
    onstart - Fires when the animation is started

Here you can find the zipped source code of the example. This may be helpful to create your own slideshow:
Visualslider.tar

Regards,
Mario

9 Comments

OpenLaszlo + Red5 = Voice chat

OpenLaszlo

Hey there,

I have been working a long time with OpenLaszlo and Red5. As my commercial projects take months over moths to be developed, the last two days I just did something really basic. A small voice chat using OpenLaszlo and Red5. It’s for a freetime project and it’s planned to be integrated into Joomla. So maybe I will release this little app as a Joomla extention, later.
But now, I just want to show you, what you can do with OpenLaszlo and Red5 in a really short time:
Click here to visit the voice chat.

Features are so far:
- Voice chat
- Text chat
- User management
- Hardware selection
- Nice look and feel
- And so on …

Let me know, what you think about it. I hope I can show you the application integrated into Joomla as soon as possible.

Regards,
Mario

8 Comments
« Older Posts


  • quick-news

    • Archives