Flash Lite/Python ….Study tip

May 21st, 2009

OK, title might be as misnomer in that Study tip and rest of this blog not related to each other.  Have a look at this overly long video :)

http://showmedo.com/videotutorials/video?name=1380000&fromSeriesID=138

Nice one on using import/export of favorites and bookmarks across the different browsers. If you’ve ever done a day’s work researching a topic having visited a myriad urls copying and pasting these reference urls into a little note for yourself, well here’s a faster and more effective method for gathering those urls into a bookmark.html library document you can click to open.   Tip over:)

If you read earlier post you would have seen

http://forums.adobe.com/message/1933725#1933725

An easier approach for me to upskill in order to get Flash Lite talking to native applications on the phone and to do various other tasks for which it needs to communicate outside of its own shell eg talk to C, talk to other applications on the phone eg camera/audio is rather than go the Alchemy route at this point; instead, look to Python with its much shorter learning curve.

To get Python working on your phone:

Grab a copy of Mobile Python, ‘ Rapid Prototyping of Applications on the Mobile Platform ‘, Symbian, by Jurgen Scheible/Ville Tuulos

Checkout Chapter 2.1.1, Installing Python for S60 on 3rd Edition Devices

“Goto http://sourceforge.net/projects/pys60

The 2 files you need are the PyS60 interpretor and the user interface ( Python Script Shell ) for the PyS60 interpretor

The name consists of 3 components:

> The name

> The version number, for example, 1.4.0 ( make sure you choose latest, largest number)

> The edition number ( in this case, the 3rd edition )

Assuming that version 1.4.0 is the latest version, you will download 

PythonForS60_1_4__3rdEd.SIS ( interpretor )

PythonScriptShell_1_4__3rdEd.SIS ( user interface )

PythonForS60_1_4__3rdEd.SIS

Install these on the phone. Use Nokia PC Suite.

Checkout Chapter 8 Mobile networking.

1. Best with a WIFI enabled phone. You’ll need to checkout Nokia support site to get the settings to set up Access Point for your WlAN Connection.

2. Install JSON Module

3 Find it at www.mobilepythonbook/com

4. Find link to json.py and download it to the phone

5. Extension modules must be installed to E:\Python\Lib in pyS60

Download json.py to E:\Python\Lib on the phone. You can test the module is ok with the following script:

import json

print “JSON OK!” 

It’s easy enough to get latest ver installer for eg windows from http://www.python.org/ 

But you are limited to a command like interface I wasn’t satisfied with. There are plugins for eclipse and the following daunting (turned out to be)

http://blog.redinnovation.com/2008/09/01/introducing-python-for-series-60-community-edition/

I got to the point in the install:

‘C:\Python26\Scripts>scons
scons: *** No SConstruct file found.

File “C:\Python26\Lib\site-packages\scons-1.2.0.d20090223\SCons\Script\Main.py”, line 829, in _main’

To make things easier I’ve been playing with Jedit http://www.jedit.org/index.php?page=download

It works very well with Jthon plugin. Jthon is an implementation of Python written in Java. Download with plugin, right click, make sure default installer is java jre and not Nokia installer which will attempt to install it on your phone! It installs fine and install registers it to Jedit. If you have Python installed along with Jedit, you are good to go. The method is to construct the scripts in the Jedit window, save ‘meExample.py’ to a folder on your hard drive,  go to that folder  on your cmd window and type: python meExample.py  to run your script.

If you want to do more in Python and maybe stuck for money, visit

http://www.netbks.com/programming/python-programming/dive-into-python_907.html

for some amazing free books on python!

http://www.jython.org/Project/

The Jython Project

“Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus 

allows you to run Python on any Java platform.”

Above turned out to be a good workaround for an attempt I’d been making in url above:

“Introducing Python for Series 60 Community Edition

Posted on September 1, 2008  by Mikko Ohtamaa 

Filed Under mobile, python, series 60, symbian”

for which you’ll need:

http://bazaar-vcs.org/Download

 

http://www.forum.nokia.com/info/sw.nokia.com/id/dbb8841d-832c-43a6-be13-f78119a2b4cb.html

http://www.python.org/download/releases/2.5.2/

http://sourceforge.net/project/showfiles.php?group_id=30337

http://www.collab.net/downloads/subversion/

http://code.google.com/p/scons-for-symbian/

 

There must be an easier way to get Python working with S60 on Carbide!

 

rgds

 

Colm

Author: admin Categories: Uncategorized Tags:

Choosing a Linux distro!

April 24th, 2009

To save yourself time, skip down to last few paragraphs before reading on!

“Ubuntu is a community developed, Linux-based operating system that is perfect for laptops, desktops and servers. It contains all the applications you need - a web browser, presentation, document and spreadsheet software, instant messaging and much more.” http://www.ubuntu.com  

Installing I used  CDBurnerXP to burn the downloaded .iso file onto a cd. Set your boot disc to cd and away. This install was on a Dell Dimension on xp pro. First attempt to install failed under the following conditions.

An option was offered to partition the disc, a large SATA drive. Install went through but starting the system from the HD following install was error prone and failed.  ’Grub error, failure to load Grub, error 21′ (checkout on google)This I’m guessing was due to the partitioning of the disc and the retention I believe by XP of a kernal part of the partition for loading purposes that proved incompatible with Ubuntu.

 Second attempt to install instead allowed Ubuntu to install without multiple partition and allow Ubuntu partition across the full disc.  Also in the bios I disabled the RAID feature of the bios. (Overall, I noticed setup is sensitive to bios settings, so be prepared to make BIOS adjustments as a method to explore when encountering any installation problem.)

This install went well. Ubuntu OS started up, software updates were detected and approx 300 updates quickly installed. No extra configuration was required to detect the network. However,  approx 5-10 mins later the mouse died!

 From a search found the following helpful: ‘From terminal window:

imwheel -csudo opt-get install imwheel

This programme gives superior mouse adjustment control.

From another search on ubuntu forums found:

from terminal:

sudo -scd /etc/pm/config.dech0 ‘SUSPEND-MODULES = “SUSPEND-MODULES usbhid”‘  > /etc/pm/config.d/90reload_mouse

(checkout/verify code above)

I also returned to the BIOS and made changes to USB CONTROLLER setting changing the setting from ON to NO BOOT, where NO BOOT means OS will recognise USB storage devices regardless of the NO BOOT setting, but the USB controller is enabled.

I’m no expert but perhaps the ON setting meant the OS was mistakingly treating the mouse as a storage device and putting it to sleep…Important thing was this worked and Ubuntu is up and running and very stable, looks great, and I look forward to using it as a great testing environment and OS.

I highly recommend Ubuntu!

As an aside preparing this post and preparing to upgrade Wordpress I mistakenly deleted the content Wordpress files, don’t ask! Recovery was from within mySQL using remote connection under either MySQL Front or phpMyAdmin, right click database,  exporting  everything as SQL file. This was saved locally. On new install of latest Wordpress, this file was imported back into wordpress database. Logging in gave message from Wordpress the database needed upgrading, choosing this option gave me access back to all the  lost content. Another tip to get back lost posts is to google individual post urls and select Google’s cache option, its practice of Google and Yahoo to index content regularly and compare cached content to new content, so you should be able to find your cached content. Of course, think about exporting as SQL file your database content on a regular basis to backup regularly.

Final paragraph…………unfortunately, the usb/mouse bug returned. Following some further efforts/workarounds I gave up the ghost. Instead, I followed a tip to install xbuntu instead http://www.xubuntu.org/ After burning .iso (see above) I used ‘Guided - use entire disc’ Installed without a hitch and no problem with usb or mouse and distro behaves rock solid. Xbuntu comes preinstalled with Python 2.5 and if anything is more intuitive and easier to use than Ubuntu. I’ll be using it extensively to install Adobe Labs Alchemy, more about Alchemy later….

Spoke too soon, Mouse Freeze returns…..checking forums. Fixing Ubuntu nvidia driver problems et al amongst a current plethora of freeze up problems due to a variety of possible causes.  Obviously current distro has some severe problems. Checkout on:https://launchpad.net/~ubuntu-x-swat/+archive/x-updates

I’m looking at another distro, check this out:

http://distrowatch.com/dwres.php?resource=major

http://www.pclinuxos.com/index.php?option=com_ionfiles&Itemid=28 

PCLinux I’m going for. I’ll report back how it goes. Reason for choice, “PCLinuxOS was first announced in 2003 by Bill Reynolds, better known as “Texstar”. Prior to creating his own distribution, Texstar was already a well-known developer in the Mandrake Linux community of users for building up-to-date RPM packages for the popular distribution and providing them as a free download. In 2003 he decided to build a new distribution, initially based on Mandrake Linux, but with several significant usability improvements. The goals? It should be beginner-friendly, have out-of-the box support for proprietary kernel modules, browser plugins and media codecs, and should function as a live CD with a simple and intuitive graphical installer”

and very important:

Pros: Out-of-the-box support for graphics drivers, browser plugins and media codecs; fast boot times; up-to-date software”

Install was fast and clean! Loading Firefox gave immediate Flash Player support. Similar fast and easy download file options for .zip. If I’ve any problems, I’ll let you know.

Checkout: http://www.pclinuxos.com/

cheers

Colm

Author: admin Categories: Uncategorized Tags:

Subversion Install on Centos/Setting up repository

April 22nd, 2009

NB

http://svnbook.red-bean.com/en/1.1/svn-book.pdf

Resources for Centos:

http://www.jimohalloran.com/2006/01/15/subversion-server-on-centos-42/

http://www.linux.ie/articles/subversion/

You may need to read http://svnbook.red-bean.com/en/1.0/re12.html on import svn

http://subversion.tigris.org/
http://www.section6.net/wiki/index.php/Setting_up_Subversion_in_Linux
http://wiki.centos.org/HowTos/Subversion
http://systhread.net/texts/200607subver.php

From admin on your server, very simple to do as Centos is aware of svn packages,
so use ‘yum install subversion mod_dav_svn’ eg as follows:
[root@server3035 dejagnu-20010126]# yum install subversion mod_dav_svn

You should get output similar to……

Setting up Install Process
Setting up repositories
update                    100% |=========================|  951 B    00:00
etc etc………………..
Transaction Summary
=======================================================
Install      6 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 4.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): mod_dav_svn-1.1.4- 100% |=========================|  50 kB    00:00
(2/6): guile-1.6.4-14.i38 100% |=========================| 746 kB    00:01
(3/6): subversion-1.1.4-2 100% |=========================| 1.6 MB    00:03
(4/6): swig-1.3.21-6.i386 100% |=========================| 1.0 MB    00:02
(5/6): neon-0.24.7-4.i386 100% |=========================|  86 kB    00:00
(6/6): umb-scheme-3.2-36. 100% |=========================| 967 kB    00:01
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: umb-scheme                   ######################### [1/6]
Installing: guile                        ######################### [2/6]
Installing: swig                         ######################### [3/6]
Installing: neon                         ######################### [4/6]
Installing: subversion                   ######################### [5/6]
Installing: mod_dav_svn                  ######################### [6/6]

Installed: mod_dav_svn.i386 0:1.1.4-2.ent subversion.i386 0:1.1.4-2.ent
Dependency Installed: guile.i386 5:1.6.4-14 neon.i386 0:0.24.7-4 swig.i386 0:1.3.21-6 umb-scheme.i386 0:3.2-36.EL4
Complete!

[root@server3035 dejagnu-20010126]#

#in /etc/httpd/conf.d/subversion.conf   [note conf.d automatically included by apache to its own httpd.conf file]
#you’ll need to make the following additions:
#Firstly choose a svn location with plenty of webspace. A vrtual server can be given in excess of 1800mb.
#I gave my main site 1800mb and added a folder ’svn’ with read/write chmod 777 permissions under its webroot.

Login as root to your server:

Use an editor such as pico to edit /etc/httpd/conf.d/subversion.conf   [note directives in subversion.conf get added to
httpd.conf automatically by apache through an include]

# add the following code (with your own custom location of svn folder) to subversion.conf
<Location /home/.sites/28/site1/web/svn>
DAV svn
# any “/svn/foo” URL will map to a repository /var/svn/foo
SVNParentPath /var/svn
</Location>

checkout svn-book.pdf for detail explanation of this code.

# ServerName svn.cbweb.net  I did not add this code to the file as I wasn’t sure it wouldn’t conflict wiith my DNS for main #url? Also I didn’t wan’t to take the chance messing around with
# ServerName or ServerAlias but if someone likes to leave a comment telling correct use of these 2 directives to do this, as #I would like to be able to refer to my subversion by name as
# http://svn.cbweb.net

login as root and type:

# service httpd restart

Apache httpd server restarts
By the way the following code populates your repository with all the directories your repository requires!

Login as root and type

$ svnadmin create /home/.sites/28/site1/web/svn/newrepos

Go check what newrepos contains!

Next up ‘adding files to the repository, back soon!

See you

Colm

Author: admin Categories: Uncategorized Tags:

Flash Player 10 and FB3

February 25th, 2009

 I’ve got a FB3.2 bug, can’t get FB3 to use the debugger version of Flash Player10 Debugger.

Run the debugger on a project gets message: ”c:\WINDOWS\system32\Macromed\Flash\Flash10b.ocxFlex Builder cannot locate the required debugger version of Flash Player”

In order to get FB3 to recognise Flash Player 10, you add the path below:

“Project/preferences/Flex Build Path/Library Path/

Add SWCpath to give above:C:/Program Files/Adobe/Adobe Flash CS4/Common/Configuration/ActionScript 3.0/FP10/playerglobal.swc”

I should note that my Flash CS4 Professional has no problem running a file against Flash Player 10 though it too has trouble connecting to the debugger version.

I can run Flash Player 10 .swf file in Flash CS4 though!

The following is log of FP10 Debug install

“Output folder: C:\WINDOWS\system32\Macromed\FlashExecute: “C:\WINDOWS\system32\Macromed\Flash\uninstall_plugin.exe”Extract: NPSWF32.dllExtract: NPSWF32_FlashUtil.exeExtract: flashplayer.xptCopy to C:\Program Files\Opera\Program\Plugins\Copy to C:\Program Files\Opera\Program\Plugins\Copy to C:\Program Files\Opera\Program\Plugins\Copy to C:\Program Files\Opera\Program\Plugins\Copy to C:\Program Files\Opera\Program\Plugins\Copy to C:\Program Files\Opera\Program\Plugins\Created uninstaller: C:\WINDOWS\system32\Macromed\Flash\uninstall_plugin.exeCompleted”

OK so Flash Debug external flash player plugin for eclipseDownloaded the eclipse plugin version installed to: C:\Program Files\Adobe\Flex Builder 3 Plug-in

Adobe from the main download site are delivering FB3.2 still with the Flash Player 9 players. Is this a significant reticence in regard to Flash Player 10?

Back to my Flexbuilder:  though the FP10 support added, project/preferences/add swc C:/Program Files/Adobe/Adobe Flash CS4/Common/Configuration/ActionScript 3.0/FP10/playerglobal.swc

Still the same problem!

So downloaded latest Flex SDK  with FP10 support from:http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3 latest nightly build as of 24th February.

A few observations here:  Unlike Flash Professional I don’t have access to a publish settings dialogue box for the flash player. This is a limitation of Flex Builder against Flash Professional for development purposes imho.

Anyways the following worked at last!

It’s not a build from scratch of Lee’s tut, see below, rather a way for those wanting to upgrade Flexbuilder 3(latest ver) to work with FP10 files, example below being Lee’s application you can download from url below:In order to get FP10 support in FB3+(get latest version) Flexbuilder natively ships with Flash player 9 support only.Following code works in Flexbuilder 3.2.

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute”>

<mx:Canvas width=”100%” height=”100%” horizontalCenter=”35″ verticalCenter=”29″ >
<mx:Image x=”0″ y=”0″ source=”assets/Carousel/Carousel.swf” />
</mx:Canvas>

</mx:Application>

You can scale the above with say 60% for height and width but it adds scrollbars you don’t want and I’m no expert in FB so I don’t know yet how to scale down and switch them off.

The carousel tutorial is here:  http://theflashblog.com/?p=473

Files available from above.

You’ll need to import into assets the folder with all required files downloaded from Lee’s tutorial.You’ll need
Adobe Flash Player 10 — Debugger Versions (aka debug players or content debuggers)

http://www.adobe.com/support/flashplayer/downloads.html

In FlexBuilder go to

project/properties/flex build path

then add swc and give the new swc the build path C:/Program Files/Adobe/Adobe Flash CS4/Common/Configuration/ActionScript 3.0/FP10

(above location in xp pro)

also in properties go to Flex Compiler/HTML wrapper/and 
set require flash player version to 10

Also go to window/preferences/general and set browser to Firefox(Chrome is faster, not covered here)

I had problems getting above to work until I used Flash Player uninstaller
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14157

then reinstalling Adobe Flash Player 10 — Debugger Versions (aka debug players or content debuggers)

http://www.adobe.com/support/flashplayer/downloads.html

Above works for building the fla and compile in Flash
CS4 then import as above using image component into FB.

This will get your Flexbuilder working with FP10 and get you familiar with some of the latest features of FP10

cheers

Colm

Author: admin Categories: Uncategorized Tags:

Snip Tree View/SnipEX Server

February 10th, 2009

 This is ongoing, I’ll let you know the outcome…see following

 

Very much appreciate any help with this. I’d be delighted to get SnipEx server working on my xp pro machine with mySQL and cfEclipse, but I got a couple of problems below:

 

I would like to be able to run SnipEx Server see doc info below. I’ve got mySQL installed and ran the database setup file and I believe it’s installed the databases ‘lib’ and ’snip’. However MySQL Front threw some errors trying to run the sql code to create the lib database, it said ‘comment’ code too long, another problem was ‘default’, anyways I stripped back the code a bit and this seemed to install ok and I’ve now got both ‘lib’ and ’snip’ databases working, here’s the amended sqp ‘lib’ database creator code:

 

CREATE TABLE `lib` (
`libid` int(11) NOT NULL auto_increment ,
`name` varchar(64) NOT NULL  ,
`description` varchar(255) NOT NULL  ,
`parent` int(11) default NULL ,
`created` datetime NOT NULL default ‘0000-00-00 00:00:00′ ,
`updated` datetime NOT NULL default ‘0000-00-00 00:00:00′ ,
PRIMARY KEY  (`libid`),
KEY `parent` (`parent`)
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=latin1 ;

 

The problem I got is I don’t know how to setup SnipEx server, what do I do with Application.cfc and SnipEx.cfc to set up server in cfEclipse. Also what intial entry should go in the ‘lib’ table for “create an entry in the lib table for your initial library”

 

One final issue is: I got Snip Tree View installed on CFEclipse which runs among other things FlexBuilder 3. Snip Tree View works great apart from one problem I reported as bug to Adobe and am awaiting reply, it won’t add my snippets to the native application .mxml code, though I use the workaround which is copy code from preview window and paste into .mxml
file.

 

(”SnipEx Release 1.0

 

This package contains the server components for SnipEx. Its made up of
two CFC’s: Application.cfc and SnipEx.cfc.
You can define the settings you require in Application.cfc and change
the behaviour of your SnipEx server in the SnipEx.cfc
Once you have installed the datbase using the snipex.sql file (this is
for mySQL but you can easily modify it to support any database) you
need to create an entry in the lib table for your initial library.
This library will contain the name of your SnipEx server and is used
as the ‘root’ node.
If you need any help with this email mark.drew@gmail.com or subscribe
to the CFEclipse users mailing list:
http://groups.google.com/group/cfeclipse-users
Mark Drew
July 11th 2007″)

 If you do get ‘Snip Tree’ for FB3, be sure to right click top right arrow tag, choose ‘edit SnipEx Servers’ and add

http://www.cflib.org/snipex/snipex.cfc

(Checkout http://www.coldfusionjedi.com/index.cfm/2007/7/11/Snipex-Code-Released–CFLib-Available-in-Eclipse)

Get access to all CFlib snippet resources including CFMLLib etc

 Above works with remote snipex server, but I tried unsuccessfully to set up a local snipex server.

 couple of errors in the snipex sql script

Fixed the sql file, there were 2 errors in it:

First error here:

ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=latin1 ‘;

The apostrophe b4 the semi colon should be left out ie should be =latin1;

Second error here:

CREATE TABLE `snip` (
’snipid` int(11) ,
`name` varchar(64)  ,

first apostrophe on ’snipid` should be replaced to give `snipid`

 

The eclipse database in MySQL I got installed with the two tables, ‘lib’ and ’snip’, adding the url to the local server in ‘Snip View’ in FB3 connects ok but you first need to set up a default library name record in your new database. However, that’s about as far as I got. ‘Snip View’ won’t add packages/snippets to this new server, though ‘Snip View’ updates its cache on request to review your new server resource with the name you’ve given it in your database.

The value of having a local snipex server is questionable at the very least because of the availability of the great http://www.cflib.org/snipex/snipex.cfc resource.  Especially if you are a cfer be sure to install.

http://www.cflib.org/snipex/snipex.cfc

It’s a great pity  my .mxml files refuse to accept code from ‘Snippet View’ except indirectly by copying and pasting from
browser preview in ‘Snippet View’.

If I find out why, I’ll let you know:-)

Cheers

 

Colm

Author: admin Categories: Uncategorized Tags:

.mobi/mobileForge/goDaddy

December 17th, 2008

Hi,

Finally getting around to getting mobile site up for main site cbweb.net. So registered cbweb.mobi with goDaddy and also set up separate mobile site as its address on my web server. I’d a small problem with this approach see thread on http://mobiforge.com/forum/starting/domains-hosting/hosting-linux

Actually not really a problem as setting up site on the server requires the use of nameservers which I’d omitted to add to the dns settings for the new site. I may decide to go down this route and do this another time maybe soon.

In the interim, I set up a folder on my cbweb.net site for the correctly configured mobile pages, for info on building these check out developer guide, http://www.mobiforge.com/developing/blog/mobile-web-developer%E2%80%99s-guide-part-ii Checkout as well the fantastic approach adopted to developing part 11 using online authoring! You might want to ontribute to this project.

I used goDaddy forwarding feature on their gui panel for the newly registered cbweb.mobi site and this worked fine.

Next up was to configure the main site for mobile, meaning a redirect script was required so that a mobile device trying to access the main site would instead be redirected to the mobile site. A more complex script by Ruadhan of mobiForge available here at

http://mobiforge.com/designing/story/a-very-modern-mobile-switching-algorithm-part-ii

For this time I went for lightweight ver of Andy Moore

http://mobiforge.com/developing/story/lightweight-device-detection-php

I got php running on apache on my server. However on my server it is currently setup to serve php from .php pages alone and not for .php blocks in .html pages. I tried a number of workarounds to enable php in html involving .htaccess scripts but none worked, hope to solve this aspect later on.

So I decided another approach called for. For this I used meta refresh inside head of index.html page of main site:

<meta http-equiv=”refresh” content=”0;url=index.php”>

User now goes to main site, main site redirects through meta refresh, delay set to ‘0′ above, to index.php; this page has Andy Moore’s code which checks whether browser is mobile browser or conventional web browser,  it redirects to mobile pages or main site as appropriate.

Above solution works just fine. Adopting a more finely detailed approach serving mobile pages based on the device calling the page is work for another day!::)

Happy Christmas!

Colm

Author: admin Categories: Uncategorized Tags:

unloadAndStop and Dongle

October 31st, 2008

 AS3  developers have had difficulties with memory leaks due to loaded content  eg video playing on stage though listeners, removeListeners,  were  unsuccessfully tried to emulate AS2 unloadMovie functionality.

http://www.gskinner.com/blog/archives/2008/04/failure_to_unlo.html

Flash Player 10 introduced unloadAndStop. Following example to see unloadAndStop in action and it works pretty well:

import flash.display.Loader

import flash.net.URLRequest

import flash.events.Event

var myLoader:Loader = new Loader();

myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,function(e:Event){

addChild(myLoader);

});

myLoader.load(new URLRequest(”item2.swf”));
//myLoader.load(new URLRequest(”mytext.txt”));

btnUnload.addEventListener(MouseEvent.CLICK,function(){

// Calling this method will unload and recursively stop the content of the movie.

myLoader.unloadAndStop();

});

Problem is the Loader class in AS3 is called to handle graphic objects and loaded swf’s.

There’s another class URLLoader we use for dynamic content such as the dynamic loading of external .txt files. Checkout examples here:

http://www.oman3d.com/tutorials/flash/as3externaltext/

Problem is unloadAndStop can’t be used with the URLLoader class.

I havn’t solved the problem of consecutive frames loading external text with URLLoader and then getting a back_btn to do as AS2 could do using unLoadMovie, to step back through consecutive frames removing the currently loaded text and displaying only text loaded for the frame stepped back to.

Ideally, as a button with nextFrame() code steps forward to next consecutive frame we would have a proper garbage collection technique to dispose of currently loaded text before moving on to the next frame.

I’ve tried various techniques to do this using removeChild, removeEventListener  but so far a successful technique for doing this i’ve not found yet…

Renewing some work on native Flash Lite development just now I’d need to install a Blue soleil dongle for xp. Software not available I found:

http://belthur.blogspot.com/2007/12/using-native-xp-bluetooth-stack-for.html

Device manager gave me an id for the dongle which wouldn’t install as 1SSCEDRBTA under xp.

The article off3ered a solution of faking the device identifier as a “Cambridge Generic Radio” device in bth.inf (%Systemdrive%\Windows\inf\bth.inf)  using the ID given to it in device manager details. I followed the instructions with some scepticism and rebooted, then add hardware, picked the Cambridge Generic Radio as install device, this was the device whose ID I’d created having pointed the ID to the info device manager had given me. Voila, my BlueTooth Blue Soleil completed its install without a hitch!

cheers

Colm

Author: admin Categories: Uncategorized Tags:

Adobe Air Installer Bug on XP Pro, or Faulty Hard Disc?

October 17th, 2008

With adobeairinstaller.exe for XP Pro I get:

‘an error has occurred while installing AdobeAir. Installation may not
be allowed by the administrator.

http://get.adobe.com/air/

Troubleshooting:

http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403150

Ok, so try:
Right click installer, run as, deselect, ‘protect my computer and data from
unauthorized program activity’

No difference, problem still there:

More info:

“To remove Adobe AIR on Windows, do the following:

1. Select Start > Settings > Control Panel.
2. Open the Add or Remove Programs panel.
3. Select Adobe AIR to remove the runtime.
4. Click the Change/Remove button. ”

Well, its not installed as no version on the list, but where does Adobe Air install to?..
Surely installer should give more information eg where its going to install to??

nb to check if the right permission are available.

So is it permissions or ‘read only’ problem?

http://windowsitpro.com/article/articleid/24940/why-cant-i-remove-the-
read-only-flag-from-a-windows-xp-or-windows-2000-folder.html

To work around this problem so that you can modify a folder’s read-only status, you can tell Windows to use the system flag instead of the read-only flag to identify customized folders. To configure Windows to use the system flag, perform the following steps:

1. Start a registry editor (e.g., regedit.exe).
2. Navigate to the

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer

subkey.
3. Select New, DWORD Value from the Edit menu.
4. Enter a name of

UseSystemForSystemFolders

and press Enter.
5. Double-click the new value, set it to 1, and click OK.
6. Close the registry editor.
7. Reboot the machine for the changes to take effect.”

Tried above, no difference:

Now tried:

flashcs3_air_extension_p3_en_121407

which installed patch no problem onto Flash…’Adobe Flash CS3 has been updated with the patch’

So to verify Air installation:

‘To verify that Adobe AIR is installed and functioning correctly, go to
the AIR product page at www.adobe.com/products/air and link to the
available sample or Showcase AIR applications to download and install.’

Tried Air demo sample here at:

http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&
loc=en_us&extid=1577520

Installing gives message:

‘Installing this application requires Adobe Air, which will also be
downloaded and installed. Press yes to continue’

Message: ‘Are you sure you want to install this application on
your computer?’

Balsamiq Mockups For Desktopnow gives message:

‘Installation Preferences
with check boxes for
Install Adobe Air 1.1 (required)
Add shortcut to my destop
Start application after installation

Installation Location:

c:\Program Files’

All the above highly welcome information not present in the default
air installer. Also I notice AIR ver 1.1 and not ver 1.0…..all good
Trying to install with these settings and the computer crashes!!!

Restarting xp pro message:

‘System has recovered from a serious error…..’

I examine the following:

‘Distributing/installing and running air applications:

http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_a
pps_1.html’

Should be able to do the following:

“# Double-click the AIR file.

The AIR runtime must already be installed on the machine.
# In the Installation window, leave the default settings selected, and
then click Continue.

In Windows, AIR should automatically do the following:

* Installs the application into the Program Files directory
* Creates a desktop shortcut for application
* Creates a Start Menu shortcut
* Adds an entry for application in the Add / Remove Programs

Control Panel”

Not happening. So get something working, right:

In Flash Professional, draw rectangle, publish settings, Adobe Air
1.0 uses FLAir.dll (has the patch updated this file to ver 1.1, assume
its not. Go to ‘Air Application and Installer Settings’ in Command dropdown

Make a self signed cert:

Install in same folder as test application.
C:\wamp\www\wwwroot\AirApplications\mycert.p12

I get message:

a,b in actionscript/test

adobeairinstaller.exe

‘an error has occurred while installing AdobeAir. Instalation may not

be allowed by the administrator.

for xp pro

http://get.adobe.com/air/

Troubleshooting:

http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403150

Right click, run as, deselect, ‘protect my computer and data from

unauthorized program activity’

To remove Adobe AIR on Windows, do the following:

1. Select Start > Settings > Control Panel.
2. Open the Add or Remove Programs panel.
3. Select Adobe AIR to remove the runtime.
4. Click the Change/Remove button.

Well, its not installed there, but where does Adobe Air install to..
nb to check if the right permission are available.

http://windowsitpro.com/article/articleid/24940/why-cant-i-remove-the-

read-only-flag-from-a-windows-xp-or-windows-2000-folder.html

To work around this problem so that you can modify a folder’s

read-only status, you can tell Windows to use the system flag instead

of the read-only flag to identify customized folders. To configure

Windows to use the system flag, perform the following steps:

1. Start a registry editor (e.g., regedit.exe).
2. Navigate to the

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer

subkey.
3. Select New, DWORD Value from the Edit menu.
4. Enter a name of

UseSystemForSystemFolders

and press Enter.
5. Double-click the new value, set it to 1, and click OK.
6. Close the registry editor.
7. Reboot the machine for the changes to take effect.

Now tried:

flashcs3_air_extension_p3_en_121407

which installed patch no problem

Adobe Flash CS3 has been updated with the patch

To verify that Adobe AIR is installed and functioning correctly, go to

the AIR product page at www.adobe.com/products/air and link to the

available sample or Showcase AIR applications to download and install.

So tried Air demo sample here at:

http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&

loc=en_us&extid=1577520

Installing gives message:

‘Installing this application requires Adobe Air, which will also be

downloaded and installed. Press yes to continue’

Gives message: ‘Are you sure you want to install this application on

your computer?’

Balsamiq Mockups For Desktopnow gives message:

‘Installation Preferences

with check boxes for

Install Adobe Air 1.1 (required)
Add shortcut to my destop
Start application after installation

Installation Location:

c:\Program Files’

All the above highly welcome information not present in the default
air installer. Also I notice ver 1.1

System has recovered from a serious error…..

Distributing/installing and running air applications:

http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_a

pps_1.html

Should be able to do the following:

“# Double-click the AIR file.

The AIR runtime must already be installed on the machine.
# In the Installation window, leave the default settings selected, and

then click Continue.

In Windows, AIR automatically does the following:

* Installs the application into the Program Files directory
* Creates a desktop shortcut for application
* Creates a Start Menu shortcut
* Adds an entry for application in the Add / Remove Programs

Control Panel”

So get something working, right:

Go to Flash Professional, draw rectangle, publish settings, Adobe Air

1.0 uses FLAir.dll (has the patch updated this file to ver 1.1, assume

its not. Go to ‘Air Application and Installer Settings’

C:\wamp\www\wwwroot\AirApplications\mycert.p12

‘Namespace is invalid in descriptor file’

Welcome to major bug in AIR installer package for windows xp pro running as admin.

Re test application,

self signed

I’ll post updates if I find anything more. I did try setting air as new file extension in ‘my computer, ‘folder options’ and importing the generated self signed certificate with ‘right click the cert’ choose ‘install pfx’

Examining the generated xml file

‘<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no” ?>
<application xmlns=”http://ns.adobe.com/air/application/1.0″>

<id>com.adobe.example.airRectangle</id>

<version>1.1</version>

<filename>airRectangle</filename>

<description/>

<name>airRectangle</name>

<copyright/>

<initialWindow>
<content>airRectangle.swf</content>
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
</initialWindow>

<icon>
<image128×128>AppIconsForAIRPublish/AIRApp_128.png</image128×128>
<image48×48>AppIconsForAIRPublish/AIRApp_48.png</image48×48>
<image32×32>AppIconsForAIRPublish/AIRApp_32.png</image32×32>
<image16×16>AppIconsForAIRPublish/AIRApp_16.png</image16×16>
</icon>

<customUpdateUI>false</customUpdateUI>

<allowBrowserInvocation>false</allowBrowserInvocation>

</application>’

Seems to me:

<application xmlns=”http://ns.adobe.com/air/application/1.0″>

should be:

<application xmlns=”http://ns.adobe.com/air/application/1.1″>

but that alone should not cause the super install errors with AIR I’ve found that
crash XP

 Addendum: re “I’ll post updates if I find anything more…”

Following a full system diagnostic, I did this with Dell software and booting through xp pro setup disc, my hard disc failed the test throwing some memory errors. This unexpectedly through a different take on the errors above switching root cause from software to hardware. The pain was somewhat mitigated in that with backups and still able to save data, having done so, Dell were informed and their help/support verified my discovery that hd had malfunctioned. Support was super fast, a Dell rep appearing on the door the following day with hd replacement.

Learned from the experience was the recommendation that not every bug is software related. Sometimes hardware can be the unexpected cause of  buggy software activity as well as virus or plainly buggy software. With hd restored Flash Player 10 and AIR installed without any problems.

rgds

Colm

Author: admin Categories: Uncategorized Tags:

Flash CS3 Export to Quicktime aka ‘Going to Max ‘08′ ‘

October 2nd, 2008

Hi,

In process of preparing this, not perfect:) http://ie.youtube.com/watch?v=4HlpJW62014
‘Going to Adobe Max ‘08′ youTube video, I used Flash CS3 to export out to Quicktime. In the export settings panel I chose option ‘export on last frame’ . However because of a bug
in this feature of Flash, the file would not export. The file being exported had Actionscript,
timeline tweens, embedded movieclip video. I found a solution was to choose to export with the video length duration setting got by number of frame * frames/sec of the video and using this option as output setting.
Flash generated a 350mb Quicktime movie with excellent playback quality in local QuickTime Player preserving all the actionscript, including timeline motion tweens, and no synching audio problems. A large 350meg .mov file compared to original .swf of 1.2 megs. Uploading then to Youtube took a while. However, disappointingly, when uploaded to  YouTube the processed YouTube file had a large audio synching problem plus some missing actionscript tweens. Solution to this problem I got here::

http://www.google.com/support/youtube/bin/answer.py?answer=58134&topic=10561

” Audio, Sizing and Sync Issues: Video upside-down or out of sync It may be a problem with the video compression you are using. We recommend the MPEG4 (Divx, Xvid) format at 640×480 resolution with MP3 audio. If you uploaded a .mov file, try converting it to .avi or wmv first. Resizing your video to these specifications before uploading will help your clips look better on the video player. You can resize and compress your video using editing software. ”

 I used free version of .mov to .avi software  http://www.nchsoftware.com/prism/index.html  only taking a couple of seconds to convert the 350meg .mov file to .avi format and surprise only 4.2megs.

Uploading the resulting .avi to YouTube was a quick breeze and processing the same. In the end, Flash had done a great job exporting to .mov format. The conversion to .avi equally preserved the .mov content.

Though visually the result wasn’t great. OK I’m not Meg Ryan:-) technically, with video in video, Actionscript tweening, embedded audio and video, and 44sec plus the video shoot experience  was a successful learning experience, once again showing the amazing possibilities in Flash video.

cheers

Colm

Author: admin Categories: Uncategorized Tags:

Actionscript 3 Preloading/Loading a large video file

August 18th, 2008

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextFormat.html

Koen De Weggheleire, http://newmovieclip.wordpress.com/2007/03/14/preloader-in-flash-cs3-actionscript-30-way/

I used the code to load a .swf which in turn loads a video, see in action at http://www.cbweb.net/cbWebDesign/cbWebDesign.html

Of note is that loading is done by the Loader and the LoaderInfo class which is imported.

import flash.display.Loader;

import flash.display.LoaderInfo;

I met KOEN De Weggelheleire Kernel at Max Barcelona 2007 and note the four last letters of his sirname:) Of note kernel of Koen’s code is the eventlisteners and callback functions, but checkout his code at url above.

The  video I use loads into an external swf which has the loader code on its first frame. The main website file into which the
swf loads in turn has its own loader code based on Loader, ProgressEvent, Event classes.

There are three issues that emerged in this exercise, 1, the size of the .flv file, somewhat reduced by importing it with low quality setting 150kb/sec bringing it down from 27 to 11mb. 2, the ability to edit the resultant .flv in Adobe Premiere, I’m using a commercial plugin with Premiere. 3, the issue of components placing their code on Frame 1 of the main movie.

Anyways I’m loading an external swf using the UILoader component in Flash, works but when I navigate to another page
from a menu button, other page loads but the flv which itself is in an FLVcomponent keeps running. I need code to communicate with the loaded swf and switch off the flv when the user leaves the page. I used code on ‘Actionscript 3.0 CookBook’, p429, to work up an example of communicating between 2 flash movies same domain. The code was faulty, I’ve a review of the book here:

http://www.amazon.co.uk/review/product/0596526954/ref=dp_db_cm_cr_acr_txt?%5Fencoding=UTF8&showViewpoints=1

I did get the folowing example of sending txt message between swf’s working:

http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16243#lcas3

The localConnection class is used 'import flash.net.LocalConnection;'

Next up I need to test a method to use LocalConnection to switch off the flv when a new page is selected. Without needing to use LocalConnection class, this worked,

flash.media.SoundMixer.stopAll();//stops all sound when new page selected;

More anon

Author: admin Categories: Uncategorized Tags: