Skip to main content

Posts

Showing posts from February, 2008

Embeded Flash in Java Desktop App

Most of examples about playing Flash animation on desktop application I found on the internet to are done by VB. But today I found java version. Flash SWT Plugin[ many thanks to Don Park ], it work very well on my latest project :). To use Flash SWT Plugin, download com.docuverse.swt.flash-0.4.zip and extract it somewhere on local disk. Now our eclipse flash project need to add atleast two external jars e.g. flash.jar[from where we just extract the zip] and swt.jar and now we are ready to code. THE SOURCE To play swf file, all we need is FlashPlayer object and activate it that all. it'll look like this. import com.docuverse.swt.flash.FlashPlayer; public class SWTPlayer { .... private void run() { // TODO Auto-generated method stub Display display = new Display(); Shell shell = new Shell(display); FlashPlayer player = new FlashPlayer(shell); player.loadMovie(0, " yourflashfile.swf "); player.setSize(550, 400); player.activate(); shell.setSize(550, 400); ...

Install TinyMCE module on Drupal

I'm just choose Drupal to be CMS for my new site. Nothing more than google tell me that it win 2007 Open Source CMS Award :) so just try it. Creating content with drupal is easy but if you want to add image, WYSIWYG editor, you need to install third party module. This post is about how i get this feature for my site. 1. Download TinyMCE WYSIWYG Editor [this will enable the TinyMCE editor to be used with Drupal] you will get file name tinymce-5.x-1.9.tar.gz. Extract it into Drupal modules folder you will get modules/tinymce. 2. Download TinyMCE engine and you will get tinymce_3_0_1.zip. Again extract into tinymce folder from step one. Now you have modules/tinymce/tinymce. 3. Enable TinyMCE module by go to Administer->Site building->Modules TinyMCE should be at the bottom of the page. Enable it. 4. Grant permission to user role by go to Administer->User management->Access control[I'm check only authenticated user] 5. Create new profile by goto Administer->Site Con...

Make your eclipse look better on ubuntu

When using eclipse on ubuntu, extra space between items and fonts size make it look awkward. I try to adjust fonts by go to [Window->Preferences->General->Appearance->Colors and Fonts]. This will not much help, reduce fonts size does not change space between item. Here is Eclipse Europa before tweak. Anyway, at last I found the way to make eclipse look more compact from googling. Thank for Wesley and Vladimir Buell for this trick . Create ".gtkrc-2.0" in your home directory enable you to customize gtk object style[more about gtkrc-2.0]. Here is my ".gtkrc-2.0". pnix@pnix-a7n:~$ cat .gtkrc-2.0 style "gtkcompact" { font_name="Sans 8" GtkButton::default_border={0,0,0,0} GtkButton::default_outside_border={0,0,0,0} GtkButtonBox::child_min_width=0 GtkButtonBox::child_min_heigth=0 GtkButtonBox::child_internal_pad_x=0 GtkButtonBox::child_internal_pad_y=0 GtkMenu::vertical-padding=1 GtkMenuBar::internal_padding=0 GtkMenuItem::horizontal_paddin...