Pre-loading images loaded from XML.

Hello,
I hoping for some guidance please.
I have a Gallery that loads thumbnails from an XML.
I have added a pre-loader to each one of the thumbnails as it is being loaded from the XML.
My problem is that I can't figure out how to remove the pre-loaders after it has called the Event.COMPLETE.
With my curent code,
As it completes loading the thumbnails, it throws an error and only removes the very last pre-loader.
Thanks for any help you can provide.
Here is the code I am currently using.
var urlRequest:URLRequest = new URLRequest("images.xml");
var urlLoader:URLLoader = new URLLoader();
var myXML:XML = new XML();
var xmlList:XMLList;
urlLoader.load(urlRequest);
myXML.ignoreWhitespace = true;
urlLoader.addEventListener(Event.COMPLETE,fileLoaded);
var arrayURL:Array = new Array();
var arrayName:Array = new Array();
var holderArray:Array = new Array();
var nrColumns:uint = 1;
var wheel:MovieClip;
var holdMe;
var thumbsprite:Sprite = new Sprite();
addChild(thumbsprite);
var thumb:Thumbnail;
var thumbsHolder:Sprite = new Sprite();
thumbsprite.addChild(thumbsHolder);
function fileLoaded(event:Event):void {
     myXML = XML(event.target.data);
     xmlList = myXML.children();
     for (var i=0; i<xmlList.length(); i++) {
          var picURL:String = xmlList[i].url;
          var picName:String = xmlList[i].big_url;
          arrayURL.push(picURL);
          arrayName.push(picName);
          holderArray[i] = new Thumbnail(arrayURL[i],i,arrayName[i]);
          holdMe = holderArray[i];
          var loader:Loader = new Loader();
          loader.load(new URLRequest(xmlList[i].url));
          wheel=new rootz();
          holdMe.addChild(wheel);
          loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preload);
          loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completed);
          function preload(event:ProgressEvent):void {
               var percent:Number = Math.round(event.bytesLoaded / event.bytesTotal * 100);
               trace(String(percent) + "%");
          function completed(event:Event):void {
               holdMe.removeChild(wheel);
          if (i<nrColumns) {
               holderArray[i].y = 65;
               holderArray[i].x = i*100;
          } else {
               holderArray[i].y = holderArray[i-nrColumns].y+110;
               holderArray[i].x = holderArray[i-nrColumns].x;
          thumbsHolder.addChild(holderArray[i]);

I am not sure why but the code I posted did not post right,
Here is my code -
var urlRequest:URLRequest = new URLRequest("images.xml");
var urlLoader:URLLoader = new URLLoader();
var myXML:XML = new XML();
var xmlList:XMLList;
urlLoader.load(urlRequest);
myXML.ignoreWhitespace = true;
urlLoader.addEventListener(Event.COMPLETE,fileLoaded);
var arrayURL:Array = new Array();
var arrayName:Array = new Array();
var holderArray:Array = new Array();
var nrColumns:uint = 1;
var wheel:MovieClip;
var holdMe;
var thumbsprite:Sprite = new Sprite();
addChild(thumbsprite);
var thumb:Thumbnail;
var thumbsHolder:Sprite = new Sprite();
thumbsprite.addChild(thumbsHolder);
function fileLoaded(event:Event):void {
myXML = XML(event.target.data);
xmlList = myXML.children();
for (var i=0; i<xmlList.length(); i++) {
var picURL:String = xmlList[i].url;
var picName:String = xmlList[i].big_url;
arrayURL.push(picURL);
arrayName.push(picName);
holderArray[i] = new Thumbnail(arrayURL[i],i,arrayName[i]);
holdMe = holderArray[i];
var loader:Loader = new Loader();
loader.load(new URLRequest(xmlList[i].url));
wheel=new rootz();
holdMe.addChild(wheel);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preload);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completed);
function preload(event:ProgressEvent):void {
var percent:Number = Math.round(event.bytesLoaded / event.bytesTotal * 100);
trace(String(percent) + "%");
function completed(event:Event):void {
holdMe.removeChild(wheel);
if (i<nrColumns) {
holderArray[i].y = 65;
holderArray[i].x = i*100;
} else {
holderArray[i].y = holderArray[i-nrColumns].y+110;
holderArray[i].x = holderArray[i-nrColumns].x;
thumbsHolder.addChild(holderArray[i]);

Similar Messages

  • Custom Connection Manager only works in 32bit- 0xC0011008: Error loading from XML

    I have a very basic / stripped connection manager with only one property (SSIS 2012). It works fine in design time (you can open the connection manager editor and change the value), but in runtime it only works in 32bit mode. The runtime-validate-method
    does work, but if everything validates OK then in 64bit it throws an error when you run the package:
    Exception deserializing the package "The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information
    can be stored.". This occurs when CPackage::LoadFromXML fails.
    The 2 VS projects are .Net 4 class library projects with the Build Platform on "Any CPU"
    I only add references to:
    Microsoft.SqlServer.ManagedDTS - C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.ManagedDTS\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.ManagedDTS.dll
    Microsoft.SqlServer.Dts.Design - C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.Dts.Design\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Dts.Design.dll
    Compiled DLL's are available in GAC and SQL Server connections folder:
    I made the sourcecode available via codeplex:
    https://ssisconnectionmanager.codeplex.com/SourceControl/latest#myFirstConnectionManager/2012/myFirstConnectionManager/myFirstConnectionManager.cs
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

    AppPrincipal (identity) related? Hint http://serverfault.com/questions/339747/the-package-failed-to-load-due-to-error-0xc0011008-error-loading-from-xml
    Arthur My Blog
    Hi Arthur,
    Looks like something similar (same message, same 64bit issue), will try that tomorrow! But sounds weird that you should tell SSIS which identity to use...
    Found the same thread in MSDN:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/47d185d3-c801-45cf-becd-3c2524d98353/the-package-failed-to-load-due-to-error-0xc0011008-error-loading-from-xml?forum=sqlintegrationservices
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • SSIS packages deployment error- The package failed to load due to error 0xC0011008 Error loading from XML

    I am trying to deploy SSIS packages to file system using manifest file. These packages are upgraded from SSDT 2005 to SSDT 2010. Also I have changed the protection level from 'EncryptSensitiveWithPassword' to 'DontSaveSensitive' to upgrade it.
    I coun't complete the deployment and the error details shown below.
    TITLE: Package Installation Wizard
    Package "Packagename.dtsx" could not be loaded. The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed
    error information can be stored.". This occurs when CPackage::LoadFromXML fails.
    Package ""Packagename.dtsx" could not be loaded. The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where
    detailed error information can be stored.". This occurs when CPackage::LoadFromXML fails.
    ADDITIONAL INFORMATION:
    The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs when
    CPackage::LoadFromXML fails.
    The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs when
    CPackage::LoadFromXML fails.
    BUTTONS:
    OK
    Please give a solution.
    Sreekanth Mohan

    Check this
    blog post as it gives complete information about error.
    It looks like its still using SQL 2005 DTEXEC.exe instead of latest version.
    Regards,
    Vishal Patel
    Blog: http://vspatel.co.uk
    Site: http://lehrity.com

  • The package failed to load due to error 0xC0011008 "Error loading from XML....." This occurs when CPackage::LoadFromXML fails

    Source environment: Win 7 Enterprise SP1 64bit - SQL Server 2008 R2 SP1 Developer Edition (10.50.2550.0 )
    Target environment: Win 2008 R2 Standard SP1 64bit - SQL Server 2008 R2 SP1 Standard Edition (10.50.2500.0
    I want to deploy a package with the deployment manifest, but I'm getting an error (during deployment):
    Package "D:\Program Files (x86)\Microsoft SQL Server\100\DTS\Packages\Migration\Students.dtsx" could not be loaded.
    The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can
    be stored.". This occurs when CPackage::LoadFromXML fails.
    I already remove a fuzzy lookup since this isn't part of the Standard edition, but still getting the error above.
    Package Example:
    If I just copy the package and try to run it I get this (0xC0010014):
    Any suggestions?

    Hi SSISJoost,
    After installing some update such as MS09-62 (KB970896), the "DTS.dll" and "MsDtsSrvrUtil.dll" may be unregistered. In this issue, the error may occur if the two DLL files are not registered. Here, please register both the 32 bit and 64 bit versions of the
    DTS.dll and MsDtsSrvrUtil.dll files, and check the issue again.
    Hope this helps.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Form are different when save an exist form as XML then load from XML

    Hi everyone,
    Who have experience that save an exist form as XML file then load from XML, some controls position, size and color different with the source form.
    I want to use the system wizard form style and I saved system form MRP Wizard as XML file, when I load form from XML, the form shows picture with different position, size, the rectangle control lost color and position also different with source form, because I want to get the line color in the form, the separate line implement using rectangle, please share your opinion how to save the form as XML more Accurate.
    Thanks in advance!
    Kathy

    Hi Kathy
    After loading a form over XML, we made the experince that in matrices link buttons will not appear everwehere they should. It's a tricky part and we made a work around by changing the columns order and then...the Link Buttons came up ok.
    regards
    Kurt

  • AR can't be added-Error "Failed to load from XML resource"

    Hi Everyone,
    I need help with this error. When entering an item and then tabbing in an AR document, this code appears.
    "Failed to load from XML resouce".
    Thanks,\
    Debbie

    Hello experts,
    I am facing this issue in SBO 9.0 PL 08.
    Using SBOdemoUS, clic 'Duplicate' an existing Sales Order, then select a Business Partner, and hit 'yes' to the question in order to refresh rows with new BP info. You will get red bar error 'Failed to load from XML resource - (UI_API 7004) [Message 66000-6]'  and it wipes out all the copied rows info.  Does not happen with BPs that don't have default Ship To info.
    Your advise please.
    Thanks

  • Load from xml CSharp

    Hi all,
    I'm trying to write some code in C# and I have a problem with LoadFromXML function. Here's my code:
                   try
                        System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
                        string path;
                        string refString;
                        path = Environment.CurrentDirectory;
                        <b>xmlDoc.LoadXml(path + "
    " + fileName); //Exception</b>
                        refString = xmlDoc.InnerXml;
                        App.LoadBatchActions(ref refString);
                   catch (Exception ex)
                        Msg("Load from XML failed: " + ex.Message);
    In bolded line ecpetion appears: "The data at the root level is invalid. Line 1, position 1."     . Does anyone know what to do with this?
    Regards
    Hmg

    Also instead of
    Enviroment.CurrentDirectory
    you should use
    System.Windows.Forms.Application.StartupPath
    , because after you build you add-on with an installer Enviroment.CurrentDirectory does not point to the installed folder

  • Image won't load from XML

    I am making a gallery using xml and as3. I've run into a
    problem very early and I'm not too good with Actionscript yet. So
    I've come here for some help.
    What I want right now, is to have an image be loaded from a
    xml file, which is working for me. And then have a white movieclip
    come in a resize behind the image to be a frame for the image. I
    haven't gotten to this part yet. My problem starts when I try to
    load the image with a blank movieclip to position it. The image
    loads, but the eventListener won't run the imageLoaded function. If
    I remove the function and just have
    holder_mc.addchild(imageLoader); Then it works, but I need the
    image to load and then resize the movieclip frame, and then display
    both right? How can I accomplish this?

    I was trying to solve this myself just last night and after
    seeing your post today I figured maybe I can help you out (as long
    as I'm addressing the problem you have).
    apparently the addEventListener needs a kick start from
    something else. If you look up the Loader class in the Flash help
    files it provides an example near the bottom that holds the key.
    I'm providing a shorthanded solution that I derived from it.
    Rather than:
    imageLoader.addEventListener(Event.COMPLETE,
    completeHandler);
    There is another piece in the in the middle of the process:
    "contentLoaderInfo"
    imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    completeHandler);
    Hope that helps

  • Images not loading from xml

    Hi,
    I have a webpage created in flash which uses xml to load specific gallerys into movie clips. Everything works fine in preview, but when uploaded it doesn't work. When you click on film or any of the other galleries, the galley does not load. I don't know whether this has something to do with the hosting or not. I'm only begining to use xml so my knowledge is quite limited. Any help would be much appreciated.  The website adress is below. I've also attached my action script. Cheers
    http://www.honeytree.com.au/luke/walshwebsite/
    function loadXML(loaded) {
    if (loaded) {
    xmlNode = this.firstChild;
    image = [];
    description = [];
    thumbnails = [];
    total = xmlNode.childNodes.length;
    for (i=0; i<total; i++) {
    image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
    description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
    thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
    thumbnails_fn(i);
    firstImage();
    } else {
    content = "file not loaded!";
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadXML;
    xmlData.load("film.xml");
    listen = new Object();
    listen.onKeyDown = function() {
    if (Key.getCode() == Key.LEFT) {
    prevImage();
    } else if (Key.getCode() == Key.RIGHT) {
    nextImage();
    Key.addListener(listen);
    previous_btn.onRelease = function() {
    prevImage();
    next_btn.onRelease = function() {
    nextImage();
    p = 0;
    this.onEnterFrame = function() {
    filesize = picture.getBytesTotal();
    loaded = picture.getBytesLoaded();
    preloader._visible = true;
    if (loaded != filesize) {
    preloader.preload_bar._xscale = 100*loaded/filesize;
    } else {
    preloader._visible = false;
    if (picture._alpha<100) {
    picture._alpha += 10;
    function nextImage() {
    if (p<(total-1)) {
    p++;
    if (loaded == filesize) {
    picture._alpha = 0;
    picture.loadMovie(image[p], 1);
    desc_txt.text = description[p];
    picture_num();
    function prevImage() {
    if (p>0) {
    p--;
    picture._alpha = 0;
    picture.loadMovie(image[p], 1);
    desc_txt.text = description[p];
    picture_num();
    function firstImage() {
    if (loaded == filesize) {
    picture._alpha = 0;
    picture.loadMovie(image[0], 1);
    desc_txt.text = description[0];
    picture_num();
    function picture_num() {
    current_pos = p+1;
    pos_txt.text = current_pos+" / "+total;
    function thumbNailScroller() {
    // thumbnail code!
    this.createEmptyMovieClip("tscroller", 1000);
    scroll_speed = 20;
    tscroller.onEnterFrame = function() {
    if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
    if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
    thumbnail_mc._x -= scroll_speed;
    } else if ((_root._xmouse<=40) && (thumbnail_mc.hitTest(hit_left))) {
    thumbnail_mc._x += scroll_speed;
    } else {
    delete tscroller.onEnterFrame;
    function thumbnails_fn(k) {
    thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
    tlistener = new Object();
    tlistener.onLoadInit = function(target_mc) {
    target_mc._x = hit_left._x+(eval("thumbnail_mc.t"+k)._width+5)*k;
    target_mc.pictureValue = k;
    target_mc.onRelease = function() {
    p = this.pictureValue-1;
    nextImage();
    target_mc.onRollOver = function() {
    this._alpha = 50;
    thumbNailScroller();
    target_mc.onRollOut = function() {
    this._alpha = 100;
    image_mcl = new MovieClipLoader();
    image_mcl.addListener(tlistener);
    image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);

    Your xml file appears to be specifying local drive paths rather than web paths...
    \film\DSC_0040web.jpg
    should be
    film/DSC_0040web.jpg

  • Data Load from XML file to Oracle Table

    Hi,
    I am trying to load data from XML file to Oracle table using DBMS_XMLStore utility.I have performed the prerequisites like creating the directory from APPS user, grant read/write to directory, placing the data file on folder on apps tier, created a procedure ‘insertXML’ to load the data based on metalink note (Note ID: 396573.1 How to Insert XML by passing a file Instead of using Embedded XML). I am running the procedure thru below anonymous block  to insert the data in the table.
    Anonymous block
    declare
      begin
      insertXML('XMLDIR', 'results.xml', 'employee_results');
      end;
    I am getting below error after running the anonymous block.
    Error :     ORA-22288: file or LOB operation FILEOPEN failed”
    Cause :   The operation attempted on the file or LOB failed.
    Action:   See the next error message in the error stack for more detailed
               information.  Also, verify that the file or LOB exists and that
               the necessary privileges are set for the specified operation. If
               the error still persists, report the error to the DBA.
    I searched this error on metalink and found DOC ID 1556652.1 . I Ran the script provided in the document. PFA the script.
    Also, attaching a document that list down the steps that I have followed.
    Please check and let me know if I am missing something in the process. Please help to get this resolve.
    Regards,
    Sankalp

    Thanks Bashar for your prompt response.
    I ran the insert statement but encountered error,below are the error details. statement.
    Error report -
    SQL Error: ORA-22288: file or LOB operation FILEOPEN failed
    No such file or directory
    ORA-06512: at "SYS.XMLTYPE", line 296
    ORA-06512: at line 1
    22288. 00000 -  "file or LOB operation %s failed\n%s"
    *Cause:    The operation attempted on the file or LOB failed.
    *Action:   See the next error message in the error stack for more detailed
               information.  Also, verify that the file or LOB exists and that
               the necessary privileges are set for the specified operation. If
               the error still persists, report the error to the DBA.
    INSERT statement I ran
    INSERT INTO employee_results (USERNAME,FIRSTNAME,LASTNAME,STATUS)
        SELECT *
        FROM XMLTABLE('/Results/Users/User'
               PASSING XMLTYPE(BFILENAME('XMLDIR', 'results.xml'),
               NLS_CHARSET_ID('CHAR_CS'))
               COLUMNS USERNAME  NUMBER(4)    PATH 'USERNAME',
                       FIRSTNAME  VARCHAR2(10) PATH 'FIRSTNAME',
                       LASTNAME    NUMBER(7,2)  PATH 'LASTNAME',
                       STATUS  VARCHAR2(14) PATH 'STATUS'
    Regards,
    Sankalp

  • Problem with special characters loaded from XML

    I have an XML whose elements contain special characters (for example: ñ, Ñ, á, Á, etc..), When I load the XML and make a Trace () the loaded element, I see that it is loaded correctly, but then in the text field is not special characters. For example in the XML I have the text Baños, but in the text field shown Baos.
    It is clear that in the text field are incorporated upper case, lower case, numerals, punctuation symbols and Basic Latin.
    I also tested with the judgment System.useCodePage = true in the code but does not work.
    Thanks for any help you can give me.
    Garchabig.
    PD: Sorry for poor English, I'm Latino. -

    Hi, before reading your answer I tried embedding all characters and surprise surprise, it worked!
    So then I was testing with embedded characters to see what was the need to display special characters (like "ñ", "í", etc..) and discovered that it has to be built or yes is Latin I (194/388 glyphs).
    Thank you very much also for the answer.
    Greetings, Garchabig. -

  • Load from XML to database

    Greetings,
    I got a problem trying to extract data from XML to oracle database.
    1.My table structure is
    CREATE TABLE xml_test(empno NUMBER(4),empname VARCHAR2(100 ));
    2.My XML Code is
    <ROWSET>
    <ROW num="1">
    <EMPNO>101</EMPNO>
    <EMPNAME>SMITH</EMPNAME>
    </ROW>
    <ROW num="2">
    <EMPNO>102</EMPNO>
    <EMPNAME>KING</EMPNAME>
    </ROW>
    <ROW num="3">
    <EMPNO>101</EMPNO>
    <EMPNAME>SMITH</EMPNAME>
    </ROW>
    </ROWSET>
    3.My procedure is
    CREATE OR REPLACE PROCEDURE xmlinsert (xmlstring IN VARCHAR2)
    IS
    insctx dbms_xmlsave.ctxtype;
    rowsp INTEGER;
    BEGIN
    insctx := dbms_xmlsave.newcontext ('xml_test');
    dbms_xmlsave.setrowtag (insctx, 'XML_TEST');
    rowsp := dbms_xmlsave.insertxml (insctx, xmlstring);
    dbms_xmlsave.closecontext (insctx);
    END;
    4.I can use this procedure when there is only one record to be inserted, like in the XML code
    <xml_test>
    <EMPNO>101</EMPNO>
    <EMPNAME>SMITH</EMPNAME>
    </xml_test>
    5.Now my problem is
    What change should be made in my procedure, so that it can handle multiple rows, like in the XML code in 2.
    Any help is appreciated. Thanks in advance.
    Regards
    George

    You say "with correct row tags"; what do you mean?
    SQL> CREATE TABLE xml_test(empno NUMBER(4),empname VARCHAR2(100 ))
      2  /
    Table created.
    SQL> DECLARE
      2      str LONG :=
      3      '<ROWSET>'||
      4      '<ROW num="1">'||
      5      '<EMPNO>101</EMPNO>'||
      6      '<EMPNAME>SMITH</EMPNAME>'||
      7      '</ROW>'||
      8      '<ROW num="2">'||
      9      '<EMPNO>102</EMPNO>'||
    10      '<EMPNAME>KING</EMPNAME>'||
    11      '</ROW>'||
    12      '<ROW num="3">'||
    13      '<EMPNO>101</EMPNO>'||
    14      '<EMPNAME>SMITH</EMPNAME>'||
    15      '</ROW>'||
    16      '</ROWSET>' ;
    17      insctx dbms_xmlsave.ctxtype;
    18      rowsp INTEGER;
    19  BEGIN
    20      insctx := dbms_xmlsave.newcontext ('XML_TEST');
    21      dbms_xmlsave.setrowtag (insctx, 'ROW'); -- << << <<---
    22      rowsp := dbms_xmlsave.insertxml (insctx, str);
    23      dbms_xmlsave.closecontext (insctx);
    24  END;
    25  /
    PL/SQL procedure successfully completed.
    SQL> select count(*) from xml_test
      2  /
      COUNT(*)
             3
    1 row selected.
    SQL> select * from xml_test ;
         EMPNO EMPNAME
           101 SMITH
           102 KING
           101 SMITH
    3 rows selected.
    SQL>Message was edited by:
    Kamal Kishore

  • Photos loaded from XML

    i found a great tutorial on how to create a photo gallery
    that loads the content from an xml file. right now, the code cycles
    through the pictures, and when it reaches the end it stops. also,
    when you first launch the gallery (at the beginning/first picture),
    the previous button does nothing. i would like to alter this to
    create a loop, where there is no end. when you reach the end of the
    array, the "next" button starts back at the beginning, and when
    you're at the first picture in the gallery, the "previous" button
    goes to the last picture. here's the code....
    function loadXML(loaded) {
    if (loaded) {
    xmlNode = this.firstChild;
    image = [];
    description = [];
    total = xmlNode.childNodes.length;
    for (i=0; i<total; i++) {
    image
    = xmlNode.childNodes.childNodes[0].firstChild.nodeValue;
    description
    = xmlNode.childNodes.childNodes[1].firstChild.nodeValue;
    firstImage();
    } else {
    content = "file not loaded!";
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadXML;
    xmlData.load("images.xml");
    listen = new Object();
    listen.onKeyDown = function() {
    if (Key.getCode() == Key.LEFT) {
    prevImage();
    } else if (Key.getCode() == Key.RIGHT) {
    nextImage();
    Key.addListener(listen);
    previous_btn.onRelease = function() {
    prevImage();
    next_btn.onRelease = function() {
    nextImage();
    p = 0;
    this.onEnterFrame = function() {
    filesize = picture.getBytesTotal();
    loaded = picture.getBytesLoaded();
    preloader._visible = true;
    if (loaded != filesize) {
    preloader.preload_bar._xscale = 100*loaded/filesize;
    } else {
    preloader._visible = false;
    if (picture._alpha<100) {
    picture._alpha += 10;
    function nextImage() {
    if (p<(total-1)) {
    p++;
    if (loaded == filesize) {
    picture._alpha = 0;
    picture.loadMovie(image[p], 1);
    desc_txt.text = description[p];
    picture_num();
    function prevImage() {
    if (p>0) {
    p--;
    picture._alpha = 0;
    picture.loadMovie(image[p], 1);
    desc_txt.text = description[p];
    picture_num();
    function firstImage() {
    if (loaded == filesize) {
    picture._alpha = 0;
    picture.loadMovie(image[0], 1);
    desc_txt.text = description[0];
    picture_num();
    function picture_num() {
    current_pos = p+1;
    pos_txt.text = current_pos+" / "+total;
    any help, ideas, suggestions, comments, or simple hello's are
    much appreciated. thanks in advance! laters..........

    sorry for not using the attach code feature. you think as
    often as i use this site, i would have noticed that little button
    before today. i have a new motto, "you learn something new
    everday..... if you visit the adobe forums". ha ha.
    anyweezer, so i found a solution to my problem that creates a
    new question. i need to create an empty movie clip, for each
    picture, each with a unique instance name. i'm thinking that the
    createEmptyMovieClip would go in the for loop near the beginning of
    the script. let me try this attach code thing now....

  • Load from xml inside zip - and place icons after X Y coordinates

    Hi I hope someone can help me.
    I need a flash page to open a Zip folder read an xml file in the folder
    From here it can find
    the backgrounds to be used
    paths to the icons needed
    and coordinates for the icons.
    The zip folder is in the folder "/ project /"
    icons in the folder "/ icons /"
    Background images are in the directory "/ project / (the zip folder / images /)"
    In the above XML, you can read the descriptions.
    <?xml version="1.0" encoding="UTF-8"?>
    <icwproject name="Henrik" version="2">
              <description>My Projekt</description>
              <ihcproject>ihcproject.ihc</ihcproject>
              <created day="27" hour="16" min="57" month="8" sec="34" year="2011"/>
              <lastmodified day="15" hour="19" min="5" month="9" sec="3" year="2011"/>
              // FILE SOURCES WITH ID - FOLLOWING OFFICIALS FILES MUST BE USED //
              <images>
                        <image active="mail_active.png" id="mail" inactive="mail_inactive.png" noresource="mail_noresource.png" preview="mail_preview.png"/>
                        <image active="scenelink_active.png" id="scenelink" inactive="scenelink_inactive.png" noresource="scenelink_noresource.png" preview="scenelink_preview.png"/>
                        <image active="spot2_active.png" id="spot2" inactive="spot2_inactive.png" noresource="spot2_noresource.png" preview="spot2_preview.png"/>
                        <image file="skov_house_800x600.png" id="skov_house_800x600.png"/>
                        <image active="smoke_active.png" id="smoke" inactive="smoke_inactive.png" noresource="smoke_noresource.png" preview="smoke_preview.png"/>
                        <image active="skotlamp_active.png" id="skotlamp" inactive="skotlamp_inactive.png" noresource="skotlamp_noresource.png" preview="skotlamp_preview.png"/>
                        <image active="sos_active.png" id="sos" inactive="sos_inactive.png" noresource="sos_noresource.png" preview="sos_preview.png"/>
                        <image active="spot_active.png" id="spot" inactive="spot_inactive.png" noresource="spot_noresource.png" preview="spot_preview.png"/>
                        <image active="led_green_active.png" id="led_green" inactive="led_green_inactive.png" noresource="led_green_noresource.png" preview="led_green_preview.png"/>
                        <image active="gas_active.png" id="gas" inactive="gas_inactive.png" noresource="gas_noresource.png" preview="gas_preview.png"/>
                        <image file="default_scene.gif" id="default"/>
                        <image active="led_red_active.png" id="led_red" inactive="led_red_inactive.png" noresource="led_red_noresource.png" preview="led_red_preview.png"/>
                        <image active="pendant_active.png" id="pendant" inactive="pendant_inactive.png" noresource="pendant_noresource.png" preview="pendant_preview.png"/>
                        <image active="bulb_active.png" id="bulb" inactive="bulb_inactive.png" noresource="bulb_noresource.png" preview="bulb_preview.png"/>
                        <image active="socket_active.png" id="socket" inactive="socket_inactive.png" noresource="socket_noresource.png" preview="socket_preview.png"/>
                        <image active="thief_active.png" id="thief" inactive="thief_inactive.png" noresource="thief_noresource.png" preview="thief_preview.png"/>
                        <image active="docklamp_active.png" id="docklamp" inactive="docklamp_inactive.png" noresource="docklamp_noresource.png" preview="docklamp_preview.png"/>
                        <image active="button1_active.png" id="button1" inactive="button1_inactive.png" noresource="button1_noresource.png" preview="button1_preview.png"/>
              </images>
              <scenes>
                        // For each "scene" THIS IS A NEW PAGE. attributes.name "PROVIDE SITE NAME //
                        <scene name="MinScene" type="pc">
                                  <description>Af: Henrik Andersen</description>
                                  // "imageref" OPLYSER HVILKEN BAGGRUND DER SKAL BRUGES PÅ SIDEN //
                                  // "Imageref" PROVIDE THE BACKGROUND TO BE USED ON SITE //
                                  <imageref id="skov_house_800x600.png"/>
                                  <sceneelements>
                                            // FOR EACH "resourcebinaryelement" IS THERE A NEW IMAGE. "resourcebinaryelement" 'S attributes the X & Y coordinates OF injected. "imageref" SAY WHAT ONE OF PREVIOUS IMAGES TO BE USED //
                                            <resourcebinaryelement name="SOFABORD" type="lightcontrol" x="330" y="117">
                                                      <description/>
                                                      <imageref id="pendant"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="airlink_dimming" rid="5e55d"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Lys niveau" resource_type="airlink_dimming" rid="5e55d" type="setting"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="SPISEBORD" type="lightcontrol" x="530" y="220">
                                                      <description/>
                                                      <imageref id="pendant"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="airlink_dimming" rid="5d65d"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Lys niveau" resource_type="airlink_dimming" rid="5d65d" type="setting"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="TV" type="lightcontrol" x="412" y="344">
                                                      <description>TV STIK</description>
                                                      <imageref id="socket"/>
                                                      <format fontscaling="50" imagescaling="50" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="4b5e"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Scenarier" resource_type="scenes" rid="4a54" type="setting"/>
                                                      <menuitem direct="no" name="Indgang for manuel KIP af udgang" resource_type="resource_input" rid="61511" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="HIFI OFF" invertstate="no" textposition="top" true="HIFI ON"/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Gas" type="signal" x="500" y="360">
                                                      <description/>
                                                      <imageref id="gas"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <gui>
                                                      <menuitems/>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="top" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Røg" type="signal" x="550" y="360">
                                                      <description/>
                                                      <imageref id="smoke"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <gui>
                                                      <menuitems/>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="top" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Indbrud" type="signal" x="500" y="410">
                                                      <description/>
                                                      <imageref id="thief"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <gui>
                                                      <menuitems/>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="top" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Personalarm" type="signal" x="550" y="410">
                                                      <description/>
                                                      <imageref id="sos"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <gui>
                                                      <menuitems/>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="top" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Stikkontakt" type="lightcontrol" x="314" y="425">
                                                      <description/>
                                                      <imageref id="socket"/>
                                                      <format fontscaling="70" imagescaling="50" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="4e5e"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Indgang" resource_type="resource_input" rid="5ae11" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Væg lampe" type="lightcontrol" x="407" y="575">
                                                      <description/>
                                                      <imageref id="skotlamp"/>
                                                      <format fontscaling="70" imagescaling="50" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="12d45b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="12d811" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Væg lampe" type="lightcontrol" x="84" y="575">
                                                      <description/>
                                                      <imageref id="skotlamp"/>
                                                      <format fontscaling="70" imagescaling="50" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="12d45b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="12d811" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="DOCK lampe" type="lightcontrol" x="50" y="363">
                                                      <description/>
                                                      <imageref id="docklamp"/>
                                                      <format fontscaling="70" imagescaling="50" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="12d45b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="12d811" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="DOCK lampe" type="lightcontrol" x="50" y="440">
                                                      <description/>
                                                      <imageref id="docklamp"/>
                                                      <format fontscaling="70" imagescaling="50" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="12d45b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="12d811" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Spot" type="lightcontrol" x="323" y="506">
                                                      <description/>
                                                      <imageref id="spot2"/>
                                                      <format fontscaling="70" imagescaling="100" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="10bf5b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="10c311" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Spot" type="lightcontrol" x="226" y="407">
                                                      <description/>
                                                      <imageref id="spot2"/>
                                                      <format fontscaling="70" imagescaling="100" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="10b65b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="100d11" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Spot" type="lightcontrol" x="153" y="315">
                                                      <description/>
                                                      <imageref id="spot2"/>
                                                      <format fontscaling="70" imagescaling="100" labelcolor="#000000" labelposition="top"/>
                                                      <gui>
                                                      <menuitems/>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Spot" type="lightcontrol" x="342" y="429">
                                                      <description/>
                                                      <imageref id="spot2"/>
                                                      <format fontscaling="70" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="12255b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="122911" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="LED" type="lightcontrol" x="412" y="403">
                                                      <description/>
                                                      <imageref id="spot2"/>
                                                      <format fontscaling="70" imagescaling="50" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="12255b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="122911" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="SKOT lampe" type="lightcontrol" x="456" y="542">
                                                      <description/>
                                                      <imageref id="skotlamp"/>
                                                      <format fontscaling="70" imagescaling="50" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="12d45b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="12d811" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="SKOT lampe" type="lightcontrol" x="172" y="525">
                                                      <description/>
                                                      <imageref id="skotlamp"/>
                                                      <format fontscaling="70" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="116e5b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="117211" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            // "linkelement" ALMOST THE SAME AS "resourcebinaryelement" BUT THEY DO NOT MIX TOGETHER anyway / /
                                            <linkelement name="Kælder etage" type="link" x="99" y="520">
                                                      <description/>
                                                      <imageref id="scenelink"/>
                                                      <format fontscaling="70" imagescaling="70" labelcolor="#00ffff" labelposition="top"/>
                                                      <link scene="Kælder"/>
                                            </linkelement>
                                            <resourcebinaryelement name="Postkasse" type="signal" x="500" y="460">
                                                      <description/>
                                                      <imageref id="mail"/>
                                                      <format fontscaling="70" imagescaling="70" labelcolor="#00ffff" labelposition="top"/>
                                                      <gui>
                                                      <menuitems/>
                                                      </gui>
                                                      <text colorfalse="#00ffff" colortrue="#00ffff" false="" invertstate="no" textposition="center" true="Der er post"/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Spot" type="lightcontrol" x="140" y="116">
                                                      <description/>
                                                      <imageref id="spot"/>
                                                      <format fontscaling="100" imagescaling="100" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="14365b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="143d11" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                  </sceneelements>
                        </scene>
                        <scene name="Morten Skov" type="web">
                                  <description>Af: Henrik Andersen</description>
                                  <imageref id="skov_house_800x600.png"/>
                                  <sceneelements>
                                            <resourcebinaryelement name="Sofabord" type="lightcontrol" x="322" y="114">
                                                      <description/>
                                                      <imageref id="pendant"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Scenarier" resource_type="scenes" rid="5054" type="setting"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="top" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="TV" type="lightcontrol" x="413" y="345">
                                                      <description>HIFI Kontakt</description>
                                                      <imageref id="socket"/>
                                                      <format fontscaling="50" imagescaling="50" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="4b5e"/>
                                                      <gui>
                                                      <menuitems/>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="HIFI OFF" invertstate="no" textposition="top" true="HIFI ON"/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Spisebord" type="lightcontrol" x="513" y="218">
                                                      <description/>
                                                      <imageref id="pendant"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Scenarier" resource_type="scenes" rid="5354" type="setting"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="top" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Gas" type="signal" x="491" y="360">
                                                      <description/>
                                                      <imageref id="gas"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <gui>
                                                      <menuitems/>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="top" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Røg" type="signal" x="546" y="360">
                                                      <description/>
                                                      <imageref id="smoke"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <gui>
                                                      <menuitems/>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="top" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Indbrud" type="signal" x="499" y="407">
                                                      <description/>
                                                      <imageref id="thief"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <gui>
                                                      <menuitems/>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="top" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="Personalarm" type="signal" x="548" y="409">
                                                      <description/>
                                                      <imageref id="sos"/>
                                                      <format fontscaling="50" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <gui>
                                                      <menuitems/>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="top" true=""/>
                                            </resourcebinaryelement>
                                  </sceneelements>
                        </scene>
                        <scene name="Kælder" type="pc">
                                  <description>Kælder etage</description>
                                  <imageref id="default"/>
                                  <sceneelements>
                                            <resourcebinaryelement name="Elektrisk pære" type="lightcontrol" x="155" y="118">
                                                      <description>Vaskerum</description>
                                                      <imageref id="bulb"/>
                                                      <format fontscaling="70" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="10005b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="ea611" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="SKOT lampe" type="lightcontrol" x="154" y="319">
                                                      <description>Kontor</description>
                                                      <imageref id="skotlamp"/>
                                                      <format fontscaling="70" imagescaling="70" labelcolor="#000000" labelposition="top"/>
                                                      <master resource_type="resource_output" rid="ffd5b"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Kip" resource_type="resource_input" rid="f5211" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <linkelement name="Stue etage" type="link" x="69" y="407">
                                                      <description/>
                                                      <imageref id="scenelink"/>
                                                      <format fontscaling="70" imagescaling="70" labelcolor="#00ffff" labelposition="top"/>
                                                      <link scene="MinScene"/>
                                            </linkelement>
                                  </sceneelements>
                        </scene>
                        <scene name="Alarm" type="pc">
                                  <description/>
                                  <imageref id="default"/>
                                  <sceneelements>
                                            <resourcebinaryelement name="1" type="genericcontrol" x="79" y="61">
                                                      <description/>
                                                      <imageref id="button1"/>
                                                      <format fontscaling="70" imagescaling="100" labelcolor="#ffffff" labelposition="center"/>
                                                      <master resource_type="resource_input" rid="1bba5a"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Tryk Tast 1" resource_type="resource_input" rid="1bba5a" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="2" type="genericcontrol" x="121" y="61">
                                                      <description/>
                                                      <imageref id="button1"/>
                                                      <format fontscaling="70" imagescaling="100" labelcolor="#ffffff" labelposition="center"/>
                                                      <master resource_type="resource_input" rid="1bbb5a"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Tryk Tast 2" resource_type="resource_input" rid="1bbb5a" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="3" type="genericcontrol" x="80" y="103">
                                                      <description/>
                                                      <imageref id="button1"/>
                                                      <format fontscaling="70" imagescaling="100" labelcolor="#ffffff" labelposition="center"/>
                                                      <master resource_type="resource_input" rid="1bbc5a"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Tryk Tast 3" resource_type="resource_input" rid="1bbc5a" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="4" type="genericcontrol" x="123" y="103">
                                                      <description/>
                                                      <imageref id="button1"/>
                                                      <format fontscaling="70" imagescaling="100" labelcolor="#ffffff" labelposition="center"/>
                                                      <master resource_type="resource_input" rid="1bbd5a"/>
                                                      <gui>
                                                      <menuitems>
                                                                <menuitem direct="yes" name="Tryk Tast 4" resource_type="resource_input" rid="1bbd5a" type="follow"/>
                                                      </menuitems>
                                                      </gui>
                                                      <text colorfalse="#000000" colortrue="#ff0000" false="" invertstate="no" textposition="center" true=""/>
                                            </resourcebinaryelement>
                                            <resourcebinaryelement name="5" type="genericcontrol" x="81" y="144">
                                                      <description/>
                                                      <imageref id="button1"/>
                                                      <format fontscaling="70" imagescaling="100" labelcolor="#ffffff" labelposition="center"/>
                                                      <master resource_type="resource_input"

    I will concentrate on extracting an XML from a ZIP. (Please create a new thread if you want to know how to use your XML.)
    I have this simple  XML called "test.xml":
    <?xml version="1.0" encoding="UTF-8"?>
    <test>This is a text XML</test>
    Then I zipped this up to create a ZIP file "test.xml.zip".
    In order to read a ZIP you need a AS3 ZIP Library by David Chang:
    http://nochump.com/blog/archives/15
    Here's an example script:
    package {
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.net.URLRequest;
        import flash.net.URLStream;
        import flash.utils.ByteArray;
        import nochump.util.zip.ZipEntry;
        import nochump.util.zip.ZipFile;
        public class ZipTest extends Sprite {
            public function ZipTest():void {
                init();
            private function init():void {
                var stream:URLStream = new URLStream();
                stream.addEventListener(Event.COMPLETE, streamCompleted);
                stream.load(new URLRequest("test.xml.zip"));
            private function streamCompleted(e:Event):void {
                var zip:ZipFile = new ZipFile(e.target as URLStream);
                for(var i:uint = 0, zipEntryCount:uint = zip.entries.length; i < zipEntryCount; i++){
                    var entry:ZipEntry = zip.entries[i];
                    if(entry.name == "test.xml"){
                        var bytes:ByteArray = zip.getInput(entry);
                        trace(bytes);
    Trace
    <?xml version="1.0" encoding="UTF-8"?>
    <test>This is a text XML</test>
    Kenneth Kawamoto
    http://www.materiaprima.co.uk/

  • Formatted Search won't load from XML

    Hello all, I have created an .xml using FormattedSearches.GetAsXML() method.
    And when I try to open it using Company.GetbusinessObjectFromXML(), I get the following Exception:
    <ErrorList><Error>System Id = 101966008, Line Number = 1, Column Number = 79, Description = The namespace of element 'schema' must be from the schema namespace.</Error><Error>System Id = 101966008, Line Number = 1, Column Number = 99, Description = The namespace of element 'element' must be from the schema namespace.</Error>(...and so on)
    Here's the XML code:
    <?xml version="1.0" encoding="UTF-16"?><BOM><BO><AdmInfo><Object>219</Object></AdmInfo><CSHS><row><FormID>133</FormID><ItemID>U_GTConsCd</ItemID><ColID>-1</ColID><ActionT>2</ActionT><QueryId>104</QueryId><IndexID>1</IndexID><Refresh>N</Refresh><FieldID /><FrceRfrsh>N</FrceRfrsh><ByField>Y</ByField></row></CSHS><CUVV /></BO></BOM>
    Would you please help me with this problem?
    Anton
    EDIT: It looks as if the parser found the namespace of element "schema" (the first error) invalid. I looked at the schema for the FormattedSearches object (as returned by GetBusinessObjectXMLSchema()) and there was no namespace specified. But I am afraid I have no access to the schema and cannot fix it, right?

    I was trying to solve this myself just last night and after
    seeing your post today I figured maybe I can help you out (as long
    as I'm addressing the problem you have).
    apparently the addEventListener needs a kick start from
    something else. If you look up the Loader class in the Flash help
    files it provides an example near the bottom that holds the key.
    I'm providing a shorthanded solution that I derived from it.
    Rather than:
    imageLoader.addEventListener(Event.COMPLETE,
    completeHandler);
    There is another piece in the in the middle of the process:
    "contentLoaderInfo"
    imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    completeHandler);
    Hope that helps

Maybe you are looking for

  • Problem with Audio in CS5.

    Everytime ive started the program and imported a video or audio file, the audio has failed to play. Ive tried multiple times to fix this but nothing has helped. I found another Thread with the same problem and read through and saw that the person had

  • Poor Picture Quality in iMovie Which USB Camcorder Will Work and Which Won'

    Dear Colleagues, I continue to read accounts by readers regarding iMovie 98 havinga poor image quality when sharing to iDVD. It has been suggested that users with non-High Definition camcorders, standard DV8 camcorders such as my Sony DCR-TRV315, are

  • Sending file with bluetooth from laptop to phone

    I am having great difficulty sending file from laptop to phone using bluetooth. I can send files from phone to laptop. I have followed the instructions from this link: http://wiki.archlinux.org/index.php/Bluetooth . also i am using xfce4 as my Deskto

  • Getting error message when setting up CNAME & MX record. Help?

    When setting up a CNAME and MX for a 2nd site with a different email on that site, I am getting error message, "URL aready in system". Bothe 1st site and 2nd site have different emails but are both on same server. How can I fix this?

  • L505 Laptop_net​work connectivi​ty issue

    L505 Laptop working great for last couple of years, until recent network issue... L505 successfully connects to router, both wired and wirelessly, however, no Internet access. Other devices in house (both wireless and wired) connect successfully to t