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;

3 thoughts on “Using Yamago Upload Component in Flash Player 7”

  1. You need to reference the actual movie clip path for the getBounds call in Yamzbrowser.prototype.rollOver. this should send the correct values to browseEnabled.
    Cheers for the great info mate!

  2. actually, i take that back.. the issues deals with changing the upload button movieclip to a standard button. getBounds fails on the button instance.

Comments are closed.