PHP, xml and Flash [multiple holders]

Hello

A few days ago, I posted a discussion related to php, xml and Flash. I want to display my xml in flash. I am using to do so. I now have a problem of obtaining xml data in my table to appear on different licensed video clips.

It's my code. I tried a different configuration of the code, but without success.

var urls:Array = [];

var: index number;
var index1:Number;

var xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = parseXML;
XML. Load ("Content.php");

parseXML() {} function
for (var i: Number = 0; i < this.firstChild.childNodes.length; i ++) {}
URLs.push (this.firstChild.childNodes [i].firstChild.nodeValue);
}

index = 0;
index1 = 1;

startyourappF();

}

function startyourappF() {}

this.onEnterFrame = preloadA;

holder.loadMovie (urls [index]);

This is me trying it to get the second element in the url in an another film clip holder.

holder1.loadMovie (URLs [index1]);
}

function preloadA() {}

If (Holder.getBytesLoaded () > 50 & & holder.getBytesLoaded () > = holder.getByte sTotal()) {}

delete this.onEnterFrame;

Holder._width = 260,0;

Holder._height = 96.0;
}

This should be resizing to the holder of the second.
If (holder1.getBytesLoaded () > 50 & & holder1.getBytesLoaded () > = holder1.getB ytesTotal()) {}

delete this.onEnterFrame;

holder1._width = 260,0;

holder1._height = 96.0;
}
}

The success of code loads the holder first image but cannot load the second url holder1 and others, that I want to add. I spend the whole night to try different configurations of the code but without success.

I hope you can help me. All I need is more than an image loaded from the URL variable in several other variables of the licensee.

Hope you can help.

soon > >

You must first set the structure of your directory and you will need to use relative URLS.  There is no sense to work on something else because what works now in your first image, and if you fix the code in your 2nd frame, it will break as soon as you download on your server.

Thus, to duplicate the configuration of directory, that you plan to use on your server and use relative URLS.

If your xml, html and swf are in the same directories and you intend to keep them in the same directories when you download on your server, use load ("timol.xml") to load your xml file.  Similarly, remove all path information to load anything else.

Tags: Adobe Animate

Similar Questions

  • PHP, xml and Flash

    Hello

    Someone can help me. I try to query an sql database and echo the image in xml format so I can display the image in flash.

    I already know how to query and echo the url of the image of the database.

    This is the code:

    The database is queried at this stage already.

    echo "<? XML version=\"1.01\"? " "> \n";

    echo "< content > \n";

    While ($Nile = mysql_fetch_assoc (Run))

    {

    echo "< point >." $nile ['content']. "" < / item > \n ";

    }

    echo "< / content > \n";

    Flash I creat table to insert a URL and an xml object echoes images. It looks like this.

    This is after you have created the table of object and xml next url the loop for to insert the XML.

    thexml.onLoad = function)

    {

    var photos: Array = thisfirstChild.childNodes;

    for (i = 0; i < photos.length; i ++)

    {

    This pushes the XML in a table of URLs

    URLs.push (photos [i]. Attributes.URL);

    }

    This is supposed to load individual data into the flash movie object.

    movieobject.loadMovie(urls[0]);

    movieobject.loadMovie(urls[1]);

    }

    x.Load (Content.php);

    The echo in the first code xml produces a url link that contains a link to an image in the database. The flash is supposed to display the image on a flash clip call movieobject animation. I have some difficulty in getting the image displayed in flash. If anyone can change or provide the new code, it would be really useful.

    More PHP XML , you can view

  • XML and Flash CS4 - loading images

    Hello

    I am trying to learn how to use XML to load images and found a tutorial somewhere... Ok. HOWEVER, now I'm stuck on something.

    I have loaded a lot of inches and you want to load a larger image version when you click on its thumbnail.

    Had to work with, but poorly. Loading the same large image no matter what thumb is clicked. I would appreciate all the advice REALLY.

    Thank you!

    ============================================================================

    var xmlRequest:URLRequest = new URLRequest ("rockandroll.xml");
    var xmlLoader:URLLoader = new URLLoader (xmlRequest);
    var imgData:XML;
    var numberOfChildren:int;
    var hite:int;
    var wid:int;

    xmlLoader.load (xmlRequest);
    xmlLoader.addEventListener (Event.COMPLETE, xmlLoadedF);

    var imageLoader1:Loader = new Loader();
    var bigLoader:Loader = new Loader();

    var rawImage:String;
    var rawImage2:String;
    var imgNum:int = 0;

    function xmlLoadedF(event:Event):void {}
    imgData = new XML (event.target.data);
    numberOfChildren = imgData.*.length)
    var startX:int = 190;
    var startY: int = 60;
    var imgNum:int = 0;
    var ctr:int = 0;
    var cumuX:int = 0;

    while(imgNum<36) {}
    for (var cols: int = 0; < 7 passes passes ++) {}
    var b:MovieClip = new boxx();
    addChild (b);

    b.x = startX + collars * b.Width;
    //
    cumuX += Number (imgData.pic [imgNum] .imgW);
    //
    b.y = startY;
    rawImage = imgData.pic [imgNum] .thumb;
    rawImage2 = imgData.pic [imgNum] .big;
    var imageLoader1:Loader = new Loader();
    var bigLoader:Loader = new Loader();

    imageLoader1.load (new URLRequest (rawImage));

    imageLoader1.addEventListener (MouseEvent.CLICK, itsClicked);
    bigLoader.addEventListener (MouseEvent.CLICK, atmanebentayeb);
    b.addChild (imageLoader1);

    imageLoader1.x=(b.width-imgData.pic[imgNum].imgW)/2;
    imageLoader1.y=(b.height-imgData.pic[imgNum].imgH)/2;
    imgNum ++;
    }
    startY += b.height;
    b.x = startX;
    }

    function itsClicked(event:Event):void {}

    rawImage2 = imgData.pic [imgNum] .big;
    addChild (bigLoader);
    bigLoader.load (new URLRequest (rawImage2));
    bigLoader.addEventListener (MouseEvent.CLICK, atmanebentayeb);
    }
    function itsGone(event:Event):void {}
    removeChild (bigLoader);
    }
    }

    ===================================

    And here is a record in the XML file:

    <? XML version = "1.0" encoding = "utf-8"? >
    < photos >
    < pic >
    thumbs/1t.jpg < go > < / inch >
    images/1.jpg < big > < / big >
    < > 57 imgW < / imgW >
    < > 31 imgH < / imgH >
    < BIGimgW > 922 < / BIGimgW >
    < BIGimgH > 500 < / BIGimgH >
    < / pic >

    ... etc.

    =====================================

    Thanks again!

    use something like:

    var xmlRequest:URLRequest = new URLRequest ("rockandroll.xml");
    var xmlLoader:URLLoader = new URLLoader (xmlRequest);
    var imgData:XML;
    var numberOfChildren:int;
    var hite:int;
    var wid:int;

    xmlLoader.load (xmlRequest);
    xmlLoader.addEventListener (Event.COMPLETE, xmlLoadedF);

    var imageLoader1:Loader = new Loader();
    var bigLoader:Loader = new Loader();

    var rawImage:String;
    var rawImage2:String;
    var imgNum:int = 0;

    function xmlLoadedF(event:Event):void {}
    imgData = new XML (event.target.data);
    numberOfChildren = imgData.*.length)
    var startX:int = 190;
    var startY: int = 60;
    var imgNum:int = 0;
    var ctr:int = 0;
    var cumuX:int = 0;

    While (imgNum<>
    for (var cols: int = 0; cols)<7;>
    var b:MovieClip = new boxx();
    addChild (b);

    b.x = startX + collars * b.Width;
    //
    cumuX += Number (imgData.pic [imgNum] .imgW);
    //
    b.y = startY;
    rawImage = imgData.pic [imgNum] .thumb;
    rawImage2 = imgData.pic [imgNum] .big;


    var imageLoader1:Loader = new Loader();

    b.Big = rawImage2;
    imageLoader1.load (new URLRequest (rawImage));

    b.addEventListener (MouseEvent.CLICK, itsClicked);
    b.addChild (imageLoader1);
          
    imageLoader1.x=(b.width-imgData.pic[imgNum].imgW)/2;
    imageLoader1.y=(b.height-imgData.pic[imgNum].imgH)/2;
    imgNum ++;
    }
    startY += b.height;
    b.x = startX;
    }

    function itsClicked(event:Event):void {}
           
    var bigLoader:Loader = new Loader();
    addChild (bigLoader);
    bigLoader.load (new URLRequest (MovieClip (event.currentTarget) .big));
    bigLoader.addEventListener (MouseEvent.CLICK, atmanebentayeb);
    }
    function itsGone(event:Event):void {}
    removeChild (event.currentTarget);

    Loader (Event.currentTarget). RemoveEventListener (MouseEvent.Click, itsGone);

    event.currentTarget = null;

    }
    }

  • PHP and flash

    I am currently using PHP to access MYSQL databases and some other functions it can be used for such as form validation (and treatment during the successful validation)

    (1) is it possible for me to use PHP in a flash application to access MYSQL databases or am I forced to use for that?
    and if it is possible I make then must use the PHP to print command to print the AS resulting from it, just as I would normally use to print the HTML and JAVASCRIPT required

    (2) same question but regarding using PHP to validate the FLASH formulas (IE controls entry and if it will not somehow insert an error message in the page flash that was not there before) for an example of what I mean by that look on this HTML form I used PHP on http://axfordengineeringservices.co.uk/contact.php (it's an online site so won't send messages of) guys just click on the button send without filling out any part of the form and it will reload the page with an error message but not send anything)

    You need PHP (or some other script on the server side) to interact with databases and process forms.  ActionScript cannot address these issues directly, and PHP is often the man in the Middle for this type of functionality.  You can visit gotoandlearn.com and through some of the video tutorials there on these topics.

  • PHP, XML, AS2 - Login

    I'm trying to login, I got my database mysql, set up and everything. I'm doing the php file and the XML file for the moment.

    I don't KNOW IF THIS IS ALL GOOD - I'm NEW to PHP and XML.

    I want it so that when you enter your username and password on flash, it checks it on the database. So I did:


    $user = $_POST ['username'];

    $pass = $_POST ["password"];


    $query = "SELECT * from users WHERE username = '$user' and password = '$pass" ";

    So I then did one thing so if there is 1 row, then it varies from a true or false Boolean value.

    $result = mysql_query ($query) or die ("has no application");

    $checklog = false;

    $num = mysql_num_rows ($resultat);


    If ($num == 1) {}

    $checklog = true;

    } else {}

    $checklog = false;

    }

    Now, I'm doing the XML code. I want so if the $checklog is true, then he said 'yes '. Otherwise, it is said 'no '.

    If ($checklog == true) {}

    echo 'ago ';

    } else {}

    echo 'no ';

    }

    That's all I am at the moment, is there something wrong with that?

    that seems ok.  You can use:

    $user = $_POST ['username'];

    $pass = $_POST ["password"];

    $query = "SELECT * from users WHERE username = '$user' and password = '$pass" ";

    $result = mysql_query ($query) or die ("has no application");

    $checklog = false;

    $num = mysql_num_rows ($resultat);

    If ($num == 1) {}

    $checklog = true;

    } else {}

    $checklog = false;

    }

    If {($checklog)

    echo 'ago ';

    } else {}

    echo 'no ';

    }

  • Loading, php, xml or dynamic text

    Hello dw experts. I ask for a link tutorial, or you have to point me in a direction I could better learn the method to enable a client remotely, edit and update the text in a control in an html page (without having access to my server). I know, in Flash, I wish a document them xml and (re) set in, say, their own server specific directory, which I know the url.

    I would do the same thing with dw, but I really hope it is just a product of third party I can buy just the front end of this idea for my client to use, and the method to place the end of on my page. Above all, I would like a simple php control or the page (like any blog) where the customer would have to change/add text, press the button send, and text then magically appear in the specific page I created and home on my server. Perhaps sequencially, by publication date.

    I thank very you much for any assistance.

    r

    Sorry - this is a bad link. Try http://www.flyspeck.net.

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.dreamweavermx-templates.com - template Triage!
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
    ==================

    "MEPE" wrote in message
    News:eepqpq$KQQ$1@forums. Macromedia.com...
    > Murray, thanks for the tip. However, the link showed an auth error
    > ( http://www.flyspeck.com ). I would like to see, however. Other means to?

  • Passing object XML in Flash to ASP.

    Hi guys...

    Is it possible to pass a Variable of object/array of Flash XML to ASP?

    If it is, how to obtain and analyze the object/table XML variable in the ASP file?

    I intend to go with ASP to create an external XML file, and then I'll feed XML to Falsh data.
    Incase of additions or Corrections in the data, once again I'll pass the details of flash to ASP and replace the existing XML file.

    Please help me...

    Thanks in advance...

    - ****



    Thanks in advance...

    - ****

    The XML in Flash class has multiple ways to send data to pages of script on the server side. . Send(),. sendAndLoad(), etc..

    If you want the data sent in the form of XML object and not as a pair key/value as a form post, check if you set the contentType to "text/XML" before using the send() or sendAndLoad() controls.

    Read the XML code directly in ASP will require you to use the Request object.

    Set xml_dom = Server.CreateObject ("MSXML2. DOMDocument')
    xml_dom. Load (request)

    Tim

  • service of weather XML and yahoo

    Hello

    I use yahoo weather xml service http://developer.yahoo.com/weather/
    My application runs on local, but does not work on my web site. I guess it's a matter of security. but I can't find a solution. How can I use my application of xml on the web site.

    I have attached the entire application.
    www.silisyum.com/Dosya.fla
    Thanks in advance

    Suad

    Check the Security Sandbox on the Macromedia Web site. One solution might be to
    have a php script on your own Web server that analyzes yahoo XML and spits
    the result in Flash.

    John

    "drink is ' wrote in message
    News:e6s6s9$P33$1@forums. Macromedia.com...
    > Hello,
    >
    > I use yahoo weather xml service http://developer.yahoo.com/weather/
    > My application runs on local but does not work on my web site. I guess that's
    > a
    > Security. but I can't find a solution. How can I run my xml
    > application on
    > web site.
    >
    > I have attached with the application.
    > www.silisyum.com/dosya.fla
    > Thanks in advance
    >
    > suad
    >
    > book_xml = new XML();
    > book_xml.ignoreWhite = true;
    > book_xml.onLoad = {function (success)}
    > If (success) {}
    > processBook (book_xml);
    > }
    > other
    > {
    > gotoAndStop (2);
    > }
    > }
    >

  • Help, please! build the example of php services in flash builder 4.5

    Hi all all the noob here. I went through several tutorials and it keeps popping up.

    On most of these tutorials after clicking the new data service and selecting PHP tutorials have a link generating php sample.

    I use flash builder 4.5 for php premium and I do not have this link. This link has possibly been moved? I really need this feature, please can someone help me?

    Hi Anju

    not was not what I was looking for but found after clicking on all buttons in the user interface.

    For other users, that it is located on the tab/Data Service on the right hand side is a small triangle pointing down. Click on it and will be of connection options. Select to connect to PHP. Don't know why this isn't on the other tab.

    But thanks for the reply

  • only main - app.xml and main.swf appear in the content of the apk package list?

    I use Flash Builder 4.5 Pro with Flex and Air to create an Android app.

    I have a basic, MBR called swf, but I keep my property all in MainAssets. When I start the game in emulation of Android, it works well, but when I go to export, only hand - app.xml and main.swf see.

    Now I saw a forum mentioning by dragging the asset in the word bin (I did find an automated process for this yet) and assets appear in project > export Release Build. It is great EXCEPT my camera says that I'm running it in debug? (there appName - Debug is listed as the name of the game).

    If I go to file > export and select Release Build, it will build a version of my game HOWEVER as hand - app.xml and main.swf appear, which means no assets, no game.

    So, questions:

    1. Project > export Release Build actually build a release or debug? (I manually install the apks because my camera is bellicose and won't talk about FB)
    2. How can I get all my files appear in file > export? (I would like to start writing my own xml loader, but if I can't Pack xmls, it's kinda useless)
    3. Can I automate this process somehow?

    Thanks for any help.

    I am traditionally a programmer C++ awesomeness automation Flash Pro has done for me in the packaging and test android applications has not compensated for how it was difficult to code.

    In the projects that I've been compiling, FB is not copying most of the files in the output folder when I do a project-> export Release Build. Not sure why it does not copy the files during the export. There seems to be a bug in FB who has been around for at least a year or two.

    I just worked around this issue for a long time by following these steps:

    Project-> Export release build

    Click on the button "next".

    On your Mac/PC manually go to your project folder and copy your folder full resource (MainAssets in your case by the sound of it) of the CBC to your project folder in your destination folder which should now have been created (for example default bin-release-temp).

    In, click the "Finish" button to complete the building of FB.

    Hope that helps.

  • Loading a HTML or PHP page in flash

    Hello

    I would like someone to tell me if there is a way to load a html or php page into flash as a movieclip without actually navigating from the flash player (using getURL code). Basically, I wonder if there is a way to load a html file, just as we load movieclips and perform all of the functions of html page.

    Thank you

    Jean Yves

    N ° Flash can only supports displaying html in textfields and only a very limited number of html tags (look to the top of the TextFields htmlText property).  To view a html/php file is therefore not possible.

  • Publication of the ActionScript 2 settings and Flash

    Hello world

    I posted a few questions lately and fantastic benefited other members (Thanks K-Glad).

    I have what I suppose be a basic question but I can't find an answer to it.

    I added a login script to a page, as shown below.

    Stop();
    eval ("$version");
    AppName = 'mikesapp. '
    loadVariablesNum ("http://bars.bevinco.com/mike/newlogin.php", 0, "POST");

    This checks the status of users and transmits them to the part of the site they are allowed to access. 100 = regional access framework, 200 = Franchise access, 300 Frame = employee access and framework 400 = access denied and back button

    this.onEnterFrame = function () {}
    If (_root. Checklog == 100) {}
    _root.gotoAndStop (5);
    }
    If (_root. CheckLog == 200) {}
    _root.gotoAndStop (10);
    }
    If (_root. Checklog == 300) {}
    _root.gotoAndStop (15);
    }
    If (_root. Checklog == 999) {}
    _root.gotoAndStop (20);
    }
    }

    My Question

    When you test the movie, I found that it was not moving to the section of the flash file that is related to their "permission level. I.E. I manually had my echo PHP back to flash, advising that The ACCESS REGIONAL has been used , so it should be move this user of IMAGE 5 of the file.

    I found it was stay stuck on the first image and can't move beyond 1 frame that I had something to do with the stop(); appearing at the top of the actionscript.

    However, when I changed the settings FLASH PUBLICATION of Flash Player 8 to Flash Player 6, it works perfectly.

    I tried to publish using Flash 7, but it seems that FLASH 6 is as high as I can go without losing its functionality.

    I'm curious to know WHY and will limit our users to use the site if they have a lower version of Flash installed on their CPU?

    I have attached the FLA project file and the PHP file, which is used on the server to manually inform the REGIONAL file signed or a person having the status of "100" level

    As always, thanks in advance to anyone who took the time to read this post.

    See you soon,.

    Mike

    Checklog is a string (even if it looks like a number to you).  Flash 6 license code sloppiness a little more than the later versions.  Thus, it is very common to users to find the publication for the work of the FP6, while more editing for fp breaks their code.

    You must use:

    this.onEnterFrame = function () {}
    If (_root.checklog == "100") {}

    delete this.onEnterFrame

    _root.gotoAndStop (5);
    }
    If (_root.checklog == "200") {}

    delete this.onEnterFrame

    _root.gotoAndStop (10);
    }
    If (_root.checklog == "300") {}

    delete this.onEnterFrame

    _root.gotoAndStop (15);
    }
    If (_root.checklog == "999") {}

    delete this.onEnterFrame

    _root.gotoAndStop (20);
    }
    }

  • XML and the XMLDocument API confusion

    Maybe I read this wrong or missing something, but it seems that there is a circular reference in the XML and XMLDocument API. I began reading on the use of XML and can't follow what objects should be used.

    In the code XML doc page is the following line:
    Quote:

    Note: The XML class (along with related classes) go ActionScript 2.0 has been renamed XMLDocument and moved into the flash.xml package. It is included in ActionScript 3.0 for backward compatibility.
  • Remove Java and Flash Player?

    I asked here how to install Java and Flash Player, and I think I did, but I'm not sure I have remove 100%. Is there a way I can see if they are deleted?

    For Java, open Termonal paste this back in & hit...

    Java-version

    For Flash...

    http://isflashinstalled.com

  • I've updated to 41.0 FF and Flash 19; Firefox no longers is asking to activate the Flash, despite telling me to do.

    Previously, I was asked to leave Flash to run in all cases; now it works selectively (as on the Adobe website, but NOT on Youtube). This means that on Youtube (and many other sites), Flash runs without my allowing him to do so. THE BAD!

    )

    For most Firefox users, YouTube is no longer using the Flash and instead uses a HTML5 video player. Here's how to check that:

    Right click on the drive, and you should get a popup to short. The last line of the menu short should indicate if the HTML5 player or Flash Player. If you get the regular Firefox context menu, press and release the ALT key to erase that side of YouTube menu.

    HTML5? Here are a few workarounds to regain control:

    (1) use the extension Flash Control to stop HTML5 video (and Flash video) AutoPlay

    (2) YouTube forces use Flash instead of HTML5. There are a few modules for this. Either of them will do, you don't need both:

    I heard that these don't work for YouTube integrated on other sites.

    Any improvement?

Maybe you are looking for

  • Satellite L450D does not illuminate

    Hi guys Just go here, I have a Toshiba Satellite L450D, who wouldn't start in fact nothing else than the green power on light, then I decided to strip down for a look after removing the keyboard & switch cord Ribbon & all the rest I just thought I wo

  • Presentations PDF import

    Hello I need to work on a presentation PDF and import this file into keynote. Is this possible at all? See you soon,. Jens

  • Can I use a USB storage in a cRIO-9064?

    Hi all For a project I need to have more storage space on a cRIO. I'm currently looking the cRIO-9064 with USB port. Is it possible to connect a USB mass storage device this port and use it to IO files? PS. I am aware of the c modules that offer an s

  • Assignment in conditional expression

    Shouldn't this work? I get an error of the State: an unexpected token on the 2nd =: True? Locals.x = 1: Locals.x = 2 Stephen

  • Create disc netsetup to xp from vista PC computer

    I created a network on my vista computer that created a netsetup.exe file I used to install the network on other computers.  I lost the USB it's and I need now to create a new to add a new XP computer to my network