Auf Kommentar antworten

Flickr, and implementing __resolve

It's quite unusual to find any use of __resolve in real Flash movies. That's why it hasn't been supported in Gnash up to now. But after investigating why Gnash didn't play the Flickr widget, it turned out the widget relies on __resolve to implement certain functions of the Flickr API.

An object's __resolve property in ActionScript comes into play when an undefined member is invoked. The following code will of course trace 'undefined':

o = new Object();
trace(o.a);


However, if you add:

o.__resolve = function(str) {
    return "resolve called: " + str;
};
trace (o.a);


the trace is "resolve called: a". The __resolve function is called with the name of the undefined member as a string argument. Flickr uses the __resolve functions to handle certain functions to send to the server as part of an XML.sendAndLoad() call.

Now Gnash implements this, the Flickr flash photo widget works.

Antworten

  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

CAPTCHA
Diese Frage prüft, ob Sie ein Mensch sind und kein Bot, um Spam vorzubeugen.
Bild-CAPTCHA
Enter the characters shown in the image.