gnash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash] gnash & xml


From: braydon fuller
Subject: [Gnash] gnash & xml
Date: Sat, 26 Jan 2008 17:35:00 -0800
User-agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110)

Hi,

Using the below code, I can view an xml doc in flash, however I get only
[type Object] when viewing with Gnash. Any ideas?

-----------------------------------------------------------

from ming import *

Ming_setScale(20.0000000)
Ming_useSWFVersion(6)
movie = SWFMovie()
movie.setDimension(550,400)
movie.setRate(31)

strAction = """

createTextField('output',50,50,50,250,250);

myXML = new XML();
myXML.onLoad=handleLoad;
myXML.load('xmldoc.xml');

function handleLoad (success) {
    if (success) {
        output.text= this;
    }else{
        output.text='fail';
    }

    myformat = new TextFormat();
    myformat.color = 0xff0000;
    myformat.font = 'Arial';
    myformat.size = 12;


    with (output){
        multiline = true;
        wordWrap = true;
        border = true;
        setTextFormat(myformat);
    }
}

"""

movie.add(SWFAction(strAction))
movie.save("xml.swf")









reply via email to

[Prev in Thread] Current Thread [Next in Thread]