Renesis SVG Viewer vs Flash Player

My loyalty to Flash stands, of course, but I just picked up this video (35mb) over at FlashGroup.net. The video is a must see.

Renesis is an SVG viewer, soon to be web plug-in with some of the following features:

Very fast render speeds (see FPS h…

My loyalty to Flash stands, of course, but I just picked up this video (35mb) over at FlashGroup.net. The video is a must see.

Renesis is an SVG viewer, soon to be web plug-in with some of the following features:

  • Very fast render speeds (see FPS here).
  • C# Interpreter (.NET not required apparently).
  • Real-time lense distortion.
  • Editable 3D-path text / text on curve.
  • Inline PDF rendering in future.
  • Commercial Open-Source.

Something to look out for in light of past Adobe maneouvers in the SVG field and present MM aquisition. You can read more about Renesis here and here

Flash Lite Device Capabilities Database

It’s pretty essential that we understand which devices/handsets support which Flash Lite features. So following this discussion, I created a Flash app to collect and display the data. Onur Tekin and myself also set about adapting capabilities.swf (comes…

It’s pretty essential that we understand which devices/handsets support which Flash Lite features. So following this discussion, I created a Flash app to collect and display the data. Onur Tekin and myself also set about adapting capabilities.swf (comes with the FL CDK) to automatically send the data from your handset and have it recorded. (Thanks for kick starting that Onur I would have been too lazy without the push.)

FL DB Screenshot

View the web app here (90kb no preload)

Download the SWF for your phone here

Please let anyone you know that has a Flash Lite enabled handset about this, hopefully we can get quite a good reference going. If your device is already listed, but you have conflicting results, please email me, any comments and suggestions welcome as always!

Extra:

Please support the Flash Mobile Community 🙂

Update:

New Flash Lite SWF uploaded (now includes player version)

Flash Lite TV Guide: 8 Hours and 9k

I set myself a little challenge yesterday, I wanted to see just how quick it was to develop in Flash Lite, that being a major selling point. My chosen project was a (greatly simplified) version of Jermain Andersons TV Guide application. I’m not sure exac…

I set myself a little challenge yesterday, I wanted to see just how quick it was to develop in Flash Lite, that being a major selling point. My chosen project was a (greatly simplified) version of Jermain Andersons TV Guide application. I’m not sure exactly how he put his together, but I can talk about how I went about it. I’ve also provided all source code and a demo at the end.

First a demo

View in new window!

Now some info

The first step was to set up the XML files that contain the "playlists", I’ve created one for each of the major TV services in the U.K. and one for BBC radio channels, but you could easily create one for "Entertainment", one for "Movies" etc. Here’s a sample for your bog standard soon to be phased out terrestrial channels:

<?xml version="1.0" encoding="UTF-8"?>
<channels>
	<channel title="BBC1" url="bbc1.xml" />
	<channel title="BBC2" url="bbc2.xml" />
	<channel title="ITV1" url="itv1.xml" />
	<channel title="Channel4" url="ch4.xml" />
	<channel title="five" url="five.xml" />
</channels>

Now of course Flash Lite cannot handle XML directly, so the next phase was to write some PHP files to spit this data out in name value pairs, something like this:

chTotal=6&ch0=BBC Radio 1&url0=bbc_radio1.xml&ch1=BBC Radio 2&url1=bbc_radio2.xml&ch2=BBC Radio 3&url2=bbc_radio3.xml&ch3=BBC Radio 4&url3=bbc_radio4.xml&ch4=BBC Radio 5Live&url4=bbc_radio5_live.xml&ch5=BBC Radio 5Live Sports&url5=bbc_radio5_live_sports_extra.xml

What is REALLY important to note here is that we are still operating on a 2.5G (GPRS) network or slower, 3G just isn’t that popular yet (unless your in Japan), so every single byte really does count, for this reason I’ve shortened "channel" to "ch" in the response, but I would go even further and use simple "c" if I weren’t distributing this app for others, it really does make a huge difference.

So with Flash now reading the data using emulated arrays (pdf link) we can start to show some channels, and the same process is used to display actual listings. Here’s a couple of screenshots:

Screen 1
Screen 2

Future enhancements

If I were to continue to develop this app, I’d be adding in some graphics to show what is currenly playing, a now and next page, and perhaps shave some extra bytes off the download (removing the : from times and replacing it in Flash etc), but for now it’ll do.

Download Source

Download all files here
Download just the SWF to put on your Flash Lite enabled phone here

Flash Mobile Community

I guess this is as good a time as any to announce the Flash Mobile Community site. The original aim was to allow developers to share SWF’s for testing on a variety of devices, but it now aggregates relevant news feeds, members can publish their own blogs…

I guess this is as good a time as any to announce the Flash Mobile Community site. The original aim was to allow developers to share SWF’s for testing on a variety of devices, but it now aggregates relevant news feeds, members can publish their own blogs and discuss anything Flashy. All made possible with Drupal (which I am seriously impressed with).

Flash Mobile Community can be found at: www.flashmobileforum.org

NaturalGUI for AS (Java ed.)

For those using Natural Docs, after the barrage of related posts on MXNA, FullAsAGoog and today’s great news. I’ve just finished a quick GUI in Java for those on Mac/Linux (using MTASC! ;)) and Windows of course. I haven’t got a Mac machine so if anyone…

For those using Natural Docs, after the barrage of related posts on MXNA, FullAsAGoog and today’s great news. I’ve just finished a quick GUI in Java for those on Mac/Linux (using MTASC! ;)) and Windows of course. I haven’t got a Mac machine so if anyone cares to try it, please let me know how it goes!

More info and download/source here.

Flashcii Now for Download

Just a quick one for people that were interested when Flashcii was first blogged about a while back, it is now available for download.

See here for more.

Just a quick one for people that were interested when Flashcii was first blogged about a while back, it is now available for download.

See here for more.

AMFPHP still kicking!

Thankyou… thankyou… Patrick for your efforts and Alessandro for pointing this out!

http://www.sephiroth.it/blog/2004_12_10_weekly.html#110267803977774175

p.s. Looking at the CVS, Mr Mineault has also added Service Browser functionality (from th…

Thankyou… thankyou… Patrick for your efforts and Alessandro for pointing this out!

http://www.sephiroth.it/blog/2004_12_10_weekly.html#110267803977774175

p.s. Looking at the CVS, Mr Mineault has also added Service Browser functionality (from the IDE?).

Flash Level 9876

Oh dear 🙁 This one really can mess up a game or application if you are publishing for Flash 6 player (or 7 in depending on coding restrictions), or at least have you stumped for a few minutes…..

Your mx.transitions.Tween’s can simply stop respondi…

Oh dear 🙁 This one really can mess up a game or application if you are publishing for Flash 6 player (or 7 in depending on coding restrictions), or at least have you stumped for a few minutes…..

Your mx.transitions.Tween’s can simply stop responding, or even better, your sprites dissappear (depending on the order the following occurs).
Here’s an illustrated problem:

This can occur in a purely AS2 (class based app), but I’m going to simplify it for now and put in some timeline based code. If you are using the Tween class to perform some animation, for example, I have a “ball_mc” on stage. I use the following on the timeline:

import mx.transitions.Tween;
import mx.transitions.easing.Bounce;

attachMovie("ball_mc", "ball_mc", 1);
var t:Tween = new Tween(ball_mc,"_x",Bounce.easeOut,0,99,30,false);
t.start();

Works a treat. Now imagine I’m running some game, placing “balls” on screen at various incremental depths (I’m not using getNextHighestDepth() because its Flash Player 6), some how my depth counter gets to the magic 9876:

import mx.transitions.Tween;
import mx.transitions.easing.Bounce;

attachMovie("ball_mc", "ball_mc", 9876);
var t:Tween = new Tween(ball_mc,"_x",Bounce.easeOut,0,99,30,false);
t.start();

Now our ball dissappears, it’s depth, overwritten. Seems that mx.transitions.OnEnterFrameBeacon uses depth 9876 for it’s own, and no-one else can have it! Ar har har!

Oh well, another depth that needs to be checked on from time to time, put that one on top of the list that v2 components reserve when it comes to getNextHighestDepth() :p

Using Yamago Upload Component in Flash Player 7

For anyone wishing to use the Yamago File upload component in a Flash 7 movie, it requires a little bit of tweaking. I wrote about how to do this in this FlashCoders thread:

http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:sss:123252

Update:
O…

For anyone wishing to use the Yamago File upload component in a Flash 7 movie, it requires a little bit of tweaking. I wrote about how to do this in this FlashCoders thread:

http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:sss:123252

Update:

Ok so Chattyfig password protected the archives, which is completely understandable, so I’m pasting my replies here:

…case sensitivity in MX2004 strikes again
🙂

Just change the Object.registerClass from:

Object.registerClass(“idYamzbrowser”, Yamzbrowser);
to
Object.registerClass(“idYamzBrowser”, Yamzbrowser);

and…

Ok I dug into it a little, and found a few things to get it started…

First up if you switch the CSS to make the FORM 50% opaque, rather than 0% you can see the real (HTML) browse button moving behind the mouse, switch to FlashPlayer 7 and you’ll see the browse button jump out of the bounds of the browser window, indicating an “undefined” co-ordinate is being passed in.

If you use alert() in the Javascript to debug the parameters being passed into:

function browseEnabled(params here) {}

..you can see that some are indeed undefined, the likely cause here is Player inconsistencies and also case sensitivity again. For example “pXmin” is undefined for FlashPlayer 7 but works when published for 6.

The fix is another case problem (convert the existing code to this):

var lMin={x:lPos.xMin,y:lPos.yMin};
var lMax={x:lPos.xMax,y:lPos.yMax};

Using undocumented features such as “MMSave” is a possible cause of problems with new Player versions (so I removed it from mine, I don’t have Use Simple buttons on anyway in the IDE). Also I found that in that same “else” statement:

this.btnBrowse.onRollOver=this.btnUpload.onRollOver=nextFrame;

..needed to be changed to:

this.btnBrowse.onRollOver=this.btnUpload.onRollOver=this.rollOver;

Component/sub-movieclips initialization in AS2

Here’s a thing. You attach some MovieClip to the stage and try to style or set a components properties that resides within it, only to find your efforts are ignored. Imagine you have a library symbol containing a button, and with the following AS2 clas…

Here’s a thing. You attach some MovieClip to the stage and try to style or set a components properties that resides within it, only to find your efforts are ignored. Imagine you have a library symbol containing a button, and with the following AS2 class bound to it:

import mx.controls.*;

class App extends MovieClip
{
  var a_button:Button;

  public function App()
  {
    a_button.enabled = false;  // ignored
  }
}

The reason the setting of .enabled is ignored, according to EAS2 is that Flash works from the outside in, so a child movie can see it’s parent upon creation, but not the other way around. Now this doesn’t apply to intrinsic properties, such as _rotation or _alpha, just properties and methods you have attached to a MovieClip sub-class/component through a class.

There are a few ways around it. The most simple is perhaps the temporary onEnterFrame loop:

import mx.controls.*;

class App extends MovieClip
{
  var a_button:Button;

  public function App()
  {
    this.onEnterFrame = function()
    {
      a_button.enabled = false;
      this.onEnterFrame = undefined;
    }
  }
}

All I can say is… YUK! Colin Moock illustrates a much better method (note this isn’t the exact code for plagiarism reasons):

import mx.controls.*;

class App extends MovieClip
{
  var a_button:Button;

  public function App()
  {
    var initInt = setInterval(function (app:App):Void 
    {
      if (app.a_button.label != undefined) app.init();

    }, 10, this);
    
  }
  
  public function init():Void
  {
    a_button.enabled = false;
  }
}

Now that works, but I’m really weary of declaring a function within a method in AS2 (yes you could just Delegate it or just assign to another function in the App class) but I also dislike creating a setInterval simply to check for values. Thanks to Helen Triolo for pointing me towards chapter 13 in EAS2 in the first place (from which I came up with my own solution, which is merely a different method, it offers only aesthetical “improvements” with regards to personal taste:

import mx.controls.*;

class App extends MovieClip
{
  var a_button:Button;

  public function App()
  {
    a_button.watch("initializing", init, a_button); 
  }
  
  public function init(prop, oldVal, newVal, target):Void
  {
    target.enabled = false;
  }
}

The only thing I can see here, is that you can use the same “init” method for multiple components in the 2nd example. You can also use it for multiple types of components by incorporating “typeof” if statements, to provide for custom skinning of individual component types etc.

Perhaps the easiest method tho (spurred into action by Carl-Alexandre Malartre), is just to look out for the superclass’ (MovieClip’s) onLoad event:

import mx.controls.*;

class App extends MovieClip
{
  var a_button:Button;

  public function App()
  {
    this.onLoad = init; 
  }
  
  public function init():Void
  {
    a_button.enabled = false;
  }
}

So easily missed! You can also make your App extend UIObject and subscribe addEventListener) for a “load” event. Whichever you prefer.

If I’ve missed anything (I’m pretty tired) gimme an email!