Go to content Go to search

Adding an ID3 tag in Winamp causes Flash Player to chipmunk MP3s · Thursday May 15, 2008 by Rudolf Vavruch

I just created an MP3 that when played through the Flash Player gets sped up, causing everything to sound high and squeaky—the “chipmunk effect”.

At first I checked that the sample rate was a multiple of 11.025 kHz and I reencoded at a constant bitrate—as recommended on the JW FLV Media Player site, which seemed to solve the problem until I added the ID3 tag and tested again—the “chipmunk effect” was back.

If I removed the tag the MP3 played fine again.

I was using Winamp to add the tags and I remembered that last time I did it I had used the Basic Info tab first (which automatically adds a ID3v2 tag). So first I added all the info on the Basic Info tab and then switched to the ID3v2 to fill in the rest.

It works fine. The problem only seemed to appear if I filled in the ID3v2 tab first.

Comment

Using lmc_tween in Flash 8 without installing the extension · Wednesday May 23, 2007 by Rudolf Vavruch

My brain is made of honey. In my previous post on lmc_tween. I wrote I would explore ways of getting lmc_tween working in Flash 8 which did not require installing the extension.

The obvious solution that came to me five minutes after posting is to stick all the lmc_tween classes into a directory and include it in your classpath.

Disclaimer: I recommend this method only for working with old code that uses lmc_tween. For new projects I strongly suggest you use Fuse Kit instead.

  1. Go to the lmc_tween site.
  2. Scroll down to the “Ziped version”, and download version 120. (lmc_tween is no longer in development, this is the last version).
  3. Extract the downloaded file and copy the new directory to your source folder.
  4. Somewhere inside your code you should have
    #include "lmc_tween.as".
    You need to modify this to point to the new source directory. For instance I renamed the extracted directory “lmc_tween”, so my line changes to
    #include "lmc_tween/lmc_tween.as".
  5. Add your lmc_tween directory to your FLA’s classpath:
    File > Publish Settings > Flash Next to ActionScript version select the Settings... button and add your extracted directory to the list of classpaths.
  6. If you have previously installed the lmc_tween extension, you can disable it now by selecting:
    Help > Manage Extensions
    And untick the box next to Movieclip Tweening Prototypes. You will have to restart Flash.

Now you, and anyone else who works on this project, will be able to compile it without the installing extensions and overwriting Macromedia’s core classes.

Happy Minor Edits!

lmc_tween & Flash 8 - the Bain of my existence · Tuesday May 22, 2007 by Rudolf Vavruch

Update 2007/05/23: I've found a better way of dealing with legacy lmc_tween code.


Maybe a little harsh, it’s definitely frustrating though.

Since I started my new job in November I have had to deal with legacy code left behind by the previous Flash developer.

I’m not one for working with another’s code to start with. I always get an itch to redo from scratch about a quarter of the way in, but time waits for no redevelopment. I end up hacking at code till it limps in the right direction.

The previous developer had a taste for lmc_tween.

One of lmc_tween’s pitfalls is that in order to use it to extend MovieClips you need to replace Macromedia’s core classes. Which means every person in the workflow who has to work with it needs to know about this, and mess with their core classes. This leaves me feeling uneasy.

Of course the previous developer extended his MovieClips in every project — it’s a natural way of working with objects.

And of course the above method works only in Flash MX 2004. Flash 8 just spits out errors and does no tweens. I have always managed to work my way around this, but tonight I decided to find a proper solution.

After lots of googling I found a very simple answer. Put the location of the two classes you need to replace in your class path:

Preferences > ActionScript > ActionScript 2.0 Settings

C:\Documents and Settings\user\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Shared\zigo

This way your core classes remain untainted and the tweens bounce about happily.

This does not help the designers on their Macs, though. I'm going to investigate the possibility of not having to install the extension. Trying to explain to client how to install lmc_tween over the phone is an enriching exercise.

If you’re looking for programmic tweens — the newer and friendlier Fuse Kit reigns supreme at the moment. It uses the same Zigo engine and Penner tweens as lmc_tween.

You do not have to install the extension, just place the classes in your source directory and import the classes normally. That way you can package the Fuse classes with the project anyone who comes into contact with it can build it without jumping through any hoops.

It can do more than that though, Fuse is a sequencer...

FileZilla 3 - The Windows FTP program comes to Linux · Thursday January 4, 2007 by Rudolf Vavruch

Screen shot of FileZilla running in Ubuntu DapperOn Windows I have been an avid user of FileZilla since I discovered it a few years back.

It has its' imperfections but it is still my favorite FTP program.

Unfortunately it is has always been purely Windows based, although the author hinted that version 3 would be cross platform.

Finally we have a beta to play with. Started up fine on Ubuntu Dapper, seems to be struggling to connect to my ftp site though.

Comment

Float / Integer bug in Flash MX 2004 · Monday October 23, 2006 by Rudolf Vavruch

Trying to fix a bug in an old piece of Flash, I came across some wierdness in this code:


Number(x) * 100 − y

x is a string representing a float. y is an integer.

It works great until Number(x) * 100 == y; then, instead of the result being 0—as you would expect, the result is a hugely negative number.

Like −2.8421709430404e−14 if x and y = 230.

The negative number is not arbitary, it seems to give the same value the input values.

I did however come up with a fix:


Math.floor(Number(x)) * 100 − y

Using Math.floor() to convert Number(x) into an integer, the weirdness fades away.

Interesting, but it is ActionScript 1.0 and I do not have spare time to play any further.

Comment

Canon LBP 2900 on Ubuntu Dapper · Monday August 14, 2006 by Rudolf Vavruch

As mentioned in the previous post I finally managed to get the Canon LBP 2900 installed. I translated and embellished the instructions from a French Ubuntu wiki. You can find them here:

https://wiki.ubuntu.com/Canon_LBP_2900_HowTo

Comment

Rudolf 0 - Canon 1 · Saturday August 5, 2006 by Rudolf Vavruch

Update 06/08/09: As I gave up I found a solution, more details on the Ubuntu Forums.


Canon, you have humbled me, crushed me like the insignificant consumer that I am.

For the past month or so I have been struggling to get a Canon printer to work on Ubuntu Dapper.

The fiend is a Canon LBP 2900 and it is very determined not to do anything remotely similar to what my parents bought it for.

I am not the only one struggling with this range of printers, many people on the Ubuntu forums are struggling too.

In order to get some closure I decided that, instead of the entry describing how I got it to work I was planning, I would post an entry describing everything I tried in order to con it into printing.

  • I downloaded the rpmed drivers Canon provides, aliened them into debs, and followed their instructions. Later I made up my own instructions.
  • I emailed Canon and received a short curt answer that they do not support GNU/Linux. Which was - unbelievably helpful. Seriously though, thanks. Next time I need something heavy to drag a sack of kittens to the bottom of a river with I know where to go. Fascinatingly a few days later I received an email asking me to fill in a form rating their support service.
  • I found, badly Google translated and followed French instructions for the previous set of drivers on Breezy. These were based on English instructions for Debian. Unfortunately the previous drivers are nowhere to be found, perhaps they might have worked?
  • Even though the printer was not listed I tried Turbo Print.
  • I discovered a Japanese site that provided a special GhostScript used by the Canon drivers. Parts of the site were in English, but of course the Debian page was only in Japanese. Google balked at the idea of translating anything, so I had only the code samples to go by. I setup some new repositories and installed stuff I had not before. I wondered whether the Japanese text was laughing at stupid gaijin trying to get their printers to work.
  • Finally I installed vmware-player to run Fedora Core 4. If it had worked I was going to post an entry proclaiming how ridiculous the solution was. It is ridiculous, but it did not work.

The last effort made me wonder if the problem did not lie with printer itself. I will take the printer to my office and see if I cannot convince it to work with Windows XP.

Finally I posted a bug on Launchpad. Perhaps the smarter Ubuntu people will be able to do something about it.

Xara Xtreme LX on Ubuntu Dapper · Wednesday August 2, 2006 by Rudolf Vavruch

Screen Shot of Xara Xtreme LX v0.6 on LinuxAt last, after almost a year of waiting – and with surprisingly little effort – I have Xara Xtreme running on my Ubuntu Dapper machine.

Vector drawing programs hold a special place in my heart, even though in recent years I have seldom used them.

I cut my teeth on Macromedia Freehand in 1999; I half heartedly fooled around with Adobe Illustrator in 2003, but quickly scuttled back to Freehand.

I have not kept up with recent developments though, at work I have a trusty old version 9 of Freehand that I use about once every four months when I need to do vector work.

Inkscape logoRecently I had a good excuse to try out Inkscape on my home Ubuntu box.

I was wary of it at first, concerned it would lack the basic functionality I was used to. However, after a short adjustment period, I found it simpler to use than Freehand.

Don’t get me wrong, Inkscape is missing some of the specialised features that kept me with going back to Freehand for so long, but for straight forward vector drawing I found it a joy to use. I am looking forward to the opportunity to use it again.

So, obviously, ever since Xara announced last year that they were planning to release Xara Xtreme for Linux, I have hungrily been watching their progress. Waiting until the development reached a point where it could be useful.

I have never used Xara Xtreme, but I am easily cajoled into excitement by software hype.

Seriously though, have a look at their gallery and demo movies.

Yes, I am impressed.

Tonight I had the opportunity to do more vector work so I checked out the Xara Xtreme LX site to see how things were coming along and decided that version 0.6 sounded like it was usable enough.

Previous versions had lacked useful features such as saving your work.

I was expecting to have to compile it myself, but they have thoughtfully provided pre-compiled binaries.

I downloaded the stable tar version and followed the dead simple instructions on the the download page (linked above).

At the end of the night I have Xara running happily and painlessly on Ubuntu Dapper, my third blog post and no work done. Suppose I have just given tomorrow a reason for being.

Comment

XML2Obj for MTASC strict · Tuesday July 25, 2006 by Rudolf Vavruch

I have written a simple ActionScript 2 class that converts a raw XML stream into an Object. The class was written specifically so that it can be compiled with MTASC -strict.

It was inspired by and partially based on Alessandro Crugnola of Sephiroth's XML2Object, and is almost a drop in replacement for it.

I wrote mine because unfortunately Sephiroth's version does not compile with MTASC and I had become attached to how easy it made the handling of XML.

Before using it as a replacement there are two differences to be aware of:

  • The usage has changed slightly:
    var XML2Obj:XML2Object = new XML2Object();
    newXMLObj:Object = XML2Obj.parseXML(XMLStr);
    
  • The attributes return null if a node has no attributes; and it will return [object Object] if the node does have attributes.

I noticed while working with the Sephiroth version that "-"s in XML node names are converted to "_"s in the Object names. In the interests of creating a drop in replacement I added this functionality to my version too.

Download XML2Object.zip for the class and a working example.

Update (2006/07/27): An example of how this can be used. For instance if you have this XML:


<playlist title="Lazy Afternoon">
	<date>2006/07/27</date>
	<track id="1">
		<band name="Rolling Stones"/>
		<title value="Paint It Black"/>
	</track>
	<track id="2">
		<band name="Hedningarna"/>
		<title value="Min Skog"/>
	</track>
	<track id="3">
		<band name="Bomb 20"/>
		<title value="Forever"/>
	</track>
</playlist>

Once you have converted this to an Object and stored it in trackListObj, you can access the data as follows:

Accessing attributes: trackListObj.playlist.attributes.title will return "Lazy Afternoon".

Accessing node data: trackListObj.playlist.date.data will return "2006/07/27"

Accessing nodes with the same name (nodes with the same name are placed into an array): trackListObj.playlist.track[1].band.attributes.name will return "Hedningarna"

Bringing it all together:


var playList:String = trackListObj.playlist.attributes.title;
playList += " (" + trackListObj.playlist.date.data + ")\n";

for (var i:Number = 0; i < trackListObj.playlist.track.length; i++) {
	playList += trackListObj.playlist.track[i].attributes.id + ". ";
	playList += trackListObj.playlist.track[i].band.attributes.name + " - ";
	playList += trackListObj.playlist.track[i].title.attributes.value + "\n";
}

Will create the following output:

Lazy Afternoon (2006/07/27)
1. Rolling Stones - Paint It Black
2. Hedningarna - Min Skog
3. Bomb 20 - Forever

Comment

Hello World · Tuesday July 18, 2006 by Rudolf Vavruch

My name is Rudolf, hence “Antler”. I am a South African in my late twenties living in Cape Town.

By day I work on a Windows XP box, generally as an ActionScript 2 programmer, but I am an all-round multimedia odd-job man.

I introduced Open Source Flash to my office and I am loving working with it – more on that later.

By night I work with XHTML/CSS, Javascript, PHP and do web design on my Big Black GNU/Linux Ubuntu box.

I am interested in Web Standards, Usability, Accessibility, Semantics, Typography, Graphic Design, FLOSS, music, reading, long walks on the beach and programming.

This site is runs on Textpattern – which, I barely know. Presumably as I get more proficient this site will evolve from using the default theme to one of my own rolling. Perhaps even in time for the 2006 Fall CSS Reboot.

Next