XML to load images

Is it possible to have XML pull images into into a
gallery?

HI,
it is very much possible to pull images into the gallery with
XML. It is the
same XML parsing which is used for Flash Player. There is
another way to
pull images without XML by startegically naming your image
files..
..Debashish
"frexx" <[email protected]> wrote in message
news:e0rpfr$e7n$[email protected]..
> Is it possible to have XML pull images into into a
gallery?

Similar Messages

  • XML to load images dynamically

    Hi,
    I have an XML file which is programmed to load images into a slide show dynamically. So it must be associated with a button to launch this I'd imagine.
    If I want to add more buttons, do I simply add more script to that one XML file giving the new images different names than what was used with button #1, or do I create an XML file for each button and upload all to the web?
    Thanks.

    xml files can't program anything.  they store data (and are there a from of database).
    it's not clear what adding more buttons has to do with your xml file.   is there data in the xml file that relates to buttons?
    and it's not clear what images and a slide show have to do with anything.
    but commonly, an xml file would store data about what images to display in a slideshow.  and the xml file might even contain text to display for each image and possibly an external link associated with each image and maybe some specifics about how to display the image.

  • How to load images using xml in flash

    Hi
    im working on a quiz project where i plan to load images using xml in to flash, can any one help with the script with AS2 or 3

    You'll find a tutorial for what you are after here:
    http://www.gotoandlearn.com/play?id=22

  • XML scrolling thumbnail, image loader, & Buttons [halfway works]

    Intro:
    I started a flash-based website a few years ago. Back in 2006 I was able to get a xml scrolling thumbnail, image loader to work without a glitch.
    For numerous reasons I had to put the project on hold until now. [one was that my 30 day trial of flash expired and only recently was I able to purchase the Adobe Web Suite CS4 as well as a new computer which could run the apps.]
    Last Friday saw a bump in the road in the development of my site as two, rather straightforward task, turned into something short of a nightmare as I have been unable to get past these two, seemingly, relatively simple task.
    I have posted in 4 other flash forums the issues, in detail, that I am facing - and have quite a bit of interest/views in the topic as the numbers suggest - yet no response/answer as of yet. [Which confirms other messages I have seen which seem to state that working with buttons has become increasingly difficult with the newer version of flash - something Im a bit surprised with actually from Adobe. - I would have thought there would be a palette where you could set parameters...]
    Screenshot of Site/Timeline:
    Before getting into the two questions I have, I would like to post an image of the site as it looks whenever an swf file is saved out, as well as a piece of the timeline in the back for reference.
    Issue #1
    As of now when the swf file is saved out you get exactly what you see above:
    a: A scrolling thumbnail
    b: ...which loads a large image when clicked on it - PEFECT...
    BUT...
    1a: I need for the buttons to load in this action, not for it to just load on its own.
    [i.e., the silk_paintings gallery is what is open, so I need the "silk_paintings" button to call up this action]
    note: Initially I had attacked this problem by taking out the actions layer you see above and applying it directly to the individual buttons with some crude MouseEvent Listener/Handerls... that did not work - at all.
    Im sure it may be "easier" to make an array out of it, but with my coding level it may be "easier" to apply it to the buttons.
    1b: How I currently see it, I would take the xml-list and duplicate it for the number of galleries I have.
    [I would then re-name the xml-list to reflect the name of the galleries they are to represent, i.e. "silk_paintings"]
    [also, I would have to rename the folders to "thumbnails1,2,3, etc., & "images 1,2,3, etc"
    From there I would duplicate the actions and paste it into the buttons, changing the xml-list name to that of "silk_paintings", etc., as well as write in the MouseEvent listener Handler to make it work. [ah, ha, but what is that magic phrase, I have tried to implement various code from other tutorials, and all in vein.]
    Issue #2
    At this point I would be tickled pink just to get this to basic function to work.
    However, once the buttons are working and calling up the xml, etc., then I need the buttons to stay on the semi-transparent blue color it is whenever in the 'hit' state. [note: NOT pictured above.]
    With the way the buttons are currently set up, and with wanting to use scripting to get them to interact with the thumbnail gallery, it will have to be some miraculous code to tell that button what color to stay as whenever its clicked, and of course it going back to white when another button is clicked.
    Conclusion:
    Since this is an Adobe Forum I would like to make a few additional statements in hopes that the developers, etc. may take heed.
    Adobes products are not cheap, and when I went to purchase the websuite I went in as a designer needing a program as not to need to program.
    I understand the flexibility that coding gives, but something as simple as linking buttons should not be in the realms of rocket science. [yes, for many its not...but my brain just does not operate that route despite all the tutorials thrown at me.]
    Again, it would seem that there would be a button panel where you could drag options like scrolling thumbnail slider, loader, and then parameters would come up. [much like Apples iWeb. - but before the argument of one being pro and the other for non-pros, I see it differently. Software should not be the limiting factor in how flexible you can design, or rather ones lack of programming shouldnt be. With all the talented, and I say this in all humility and honesty, programmers working for Adobe, Im sure something could be programmed like what Im asking for.]
    note: Director is a good example, back in 1997 I knew nothing of multimedia and in one week I had assembled a portfolio, clicking buttons, speech, movies, and all. - and no, I dont have the money to buy more software!
    At this moment I am at the mercy of someone who reads code like its a nighttime tale they are telling their kids, and who can see the exact issue I have and can share the appropriate, correct code. [as I have noticed, it has to be on target - naturally - but this target changes with just a slight change in the design.]
    Thank you,
    peace
    Dalen
    p.s.
    The actionscript: [note: This is only the current working/good code that Im trying to get the buttons to call up.]
    stop();
    fscommand("allowscale", false);//keep SWF display at 100%
    var x:XML = new XML ();//Define XML Object
    x.ignoreWhite = true;
    var fullURL:Array = new Array;//Array of full size image urls
    var thumbURL:Array = new Array;//Array of thumbnail urls
    var thumbX:Number = 25;//Initial offset of _x for first thumbnail
    x.onLoad = function(){ //Function runs after XML is loaded
        var photos:Array = this.firstChild.childNodes;//Defines variable for length of XML file
         for (i=0;i<photos.length;i++) {//For loop to step through all entry lines of XML file
              fullURL.push(photos[i].attributes.urls);//Each loop, adds URL for full sized image to Array fullURL
              thumbURL.push(photos[i].attributes.thumbs);//Each loop, adds URL for thumbnails to Array thumbURL
              trace(i+". Full Image = "+fullURL[i]+"  Thumb Image = "+thumbURL[i]);         
              var t = panel.attachMovie("b","b"+i,i);//Each loop, Define local variable 't' as a new instance of 'b' movie clip, given unique instance name of 'b' plus the index number of the For loop
              t.img.loadMovie(thumbURL[i]);// Each loop, load thumbnail image from XML data into variable movie clip
              t._y = 0;//Set Y coordinate of variable movie clip
              t._x = thumbX;//Set X coordinate of variable movie clip based on variable thumbX
              t.numb = i;//Set sub-variable 'numb' inside variable t to hold index number
              t._alpha = 75;//Set the Alpha value of the variable movie clip to 75% - for onRollOver highlight action
              thumbX += 55;//Increment thumbX value so next thumbnail is placed 125 pixels to the right of the one before
              t.onRollOver = function () {//define onRollOver event of the variable movie clip
                   this._alpha = 100;//Set thumbnail alpha to 100% for highlight
              t.onRollOut = function () {//define onRollOut event of the variable movie clip
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onPress = function () {//define onPress event of the variable movie clip
                   this._rotation += 3;//rotates thumbnail 3 degrees to indicate it's been pressed
                   this._x += 3;//Offset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y -= 3;//Offset Y coordinate by 3 pixels to keep clip centered during rotation
              t.onReleaseOutside = function () {//define onRelease event of the variable movie clip
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during rotation
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onRelease  = function () {//define onRelease function to load full sized image
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during
                   this._alpha = 75;//Reset thumbnail alpha to 75%
                   holder.loadMovie(fullURL[this.numb]);//Load full sized image into holder clip based on sub-variable t.numb, referenced by 'this'
         holder.loadMovie(fullURL[0]);//Initially load first full size image into holder clip
    x.load ("silk_paintings.xml");// path to XML file
    panel.onRollOver = panelOver;
    function panelOver() {
         this.onEnterFrame = scrollPanel;
         delete this.onRollOver;
    var b = stroke.getBounds(_root);
    function scrollPanel() {
         if (_xmouse<b.xMin||_xmouse>b.xMax||_ymouse<b.yMin||_ymouse>b.yMax) {
         this.onRollOver = panelOver;
         delete this.onEnterFrame;
         if (panel._x >= 740) {
         panel._x = 740;
    if(panel._x <= (thumbX-10))  {
              panel._x = (thumbX-10)
         var xdist = _xmouse - 830;
         panel._x += -xdist / 7;
    The xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <slideshow>
    <photo thumbs="thumbnails/i_brown_fairy.jpg"  urls="images/brown_fairy.jpg"  />
    <photo thumbs="thumbnails/i_blonde_fairy.jpg"  urls="images/blonde_fairy.jpg"  />
    <photo thumbs="thumbnails/i_flower_fairy.jpg"  urls="images/flower_fairy.jpg"  />
    <photo thumbs="thumbnails/i_red_fairy.jpg"  urls="images/red-fairy.jpg"  />
    </slideshow>
    Attached is a link to the file I made named "index".
    https://rcpt.yousendit.com/706233226/5e7b4fe0973dacf090b5cbae32c47398
    I would have liked to have included the following files but was limited due to "you-send-it" not uploading folders.  Files not included: [but functioning] : xml list - images [folder] - thumbnails [folder]
    Again, Thank you
    Dalen

    The issues with the buttons calling up the scrolling thumbnail panel have been resolved, as well as keeping the buttons in their hit state once clicked, thanks to Rob.
    Those that have been following this thread, or stumble upon it in their searches later, may appreciate to see the final solution to this particular issue.
    [Hopefully I will be able to update this thread with a url in the future to show the site in operation, which may help somebody with their project in the future if its set up similarly.]
    Alas, it would be nice if future versions of flash had a more direct, flexible, user friendly method for creating navigation.
    [We may see development beyond the flash ads which everyone seems to loathe... and more creativity with flash in terms of games, web interactivity, &  animation.
    Below are 2 sets of code:
    a] the first is located within the first frame of the first button, and has some extra variables in it that the additional buttons call upon...
    b] the second is the code applied to every other button.
    stop();
    fscommand("allowscale", false);//keep SWF display at 100%
    var x:XML = new XML();//Define XML Object
    x.ignoreWhite = true;
    var fullURL:Array = new Array();//Array of full size image urls
    var thumbURL:Array = new Array();//Array of thumbnail urls
    //  .......  CHANGE
    var thumbX:Number;// = 25;//Initial offset of _x for first thumbnail
    // make an array of all of the instance names of each button object...
    // only do this once
    var buttonsList:Array = new Array(shadesOfGrey, silkPaintings);
    shadesOfGrey.isLatched = false;
    // the rollover function... repeat for each button
    shadesOfGrey.onRollOver = shadesOfGrey.onDragOver=function ():Void {
         if (!this.isLatched) {
              this.gotoAndStop(2);
    // the rolloff function... repeat for each button
    shadesOfGrey.onRollOut = shadesOfGrey.onDragOut=shadesOfGrey.onReleaseOutside=function ():Void {
         if (!this.isLatched) {
              this.gotoAndStop(1);
    // the mouse press function... repeat for each button
    shadesOfGrey.onPress = function():Void  {
         resetAllButtons();
         this.isLatched = true;
         this.gotoAndStop(3);
    shadesOfGrey.onRelease = function():Void  {
         x.load("shadesOfGrey.xml");// path to XML file
         thumbX = 25;
    function resetAllButtons():Void {
         for (b in buttonsList) {
              buttonsList[b].isLatched = false;
              buttonsList[b].gotoAndStop(1);
    x.onLoad = function() {//Function runs after XML is loaded
         //  resets the position of the panel on each new load
         panel._x = 740;
         //  .......  CHANGE  removes the existing movieclips from the panel before any new load...
         for (c in panel) {
              if (typeof (panel[c]) == "movieclip") {
                   removeMovieClip(panel[c]);
         var photos:Array = this.firstChild.childNodes;//Defines variable for length of XML file
         for (i=0; i<photos.length; i++) {//For loop to step through all entry lines of XML file
              fullURL.push(photos[i].attributes.urls);//Each loop, adds URL for full sized image to Array fullURL
              thumbURL.push(photos[i].attributes.thumbs);//Each loop, adds URL for thumbnails to Array thumbURL
              //trace(i+". Full Image = "+fullURL[i]+"  Thumb Image = "+thumbURL[i]);
              var t = panel.attachMovie("b", "b"+i, i);//Each loop, Define local variable 't' as a new instance of 'b' movie clip, given unique instance name of 'b' plus the index number of the For loop
              t.img.loadMovie(thumbURL[i]);// Each loop, load thumbnail image from XML data into variable movie clip
              t._y = 0;//Set Y coordinate of variable movie clip
              t._x = thumbX;//Set X coordinate of variable movie clip based on variable thumbX
              t.numb = i;//Set sub-variable 'numb' inside variable t to hold index number
              t._alpha = 75;//Set the Alpha value of the variable movie clip to 75% - for onRollOver highlight action
              thumbX += 55;//Increment thumbX value so next thumbnail is placed 125 pixels to the right of the one before
              t.onRollOver = function() {//define onRollOver event of the variable movie clip
                   this._alpha = 100;//Set thumbnail alpha to 100% for highlight
              t.onRollOut = function() {//define onRollOut event of the variable movie clip
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onPress = function() {//define onPress event of the variable movie clip
                   this._rotation += 3;//rotates thumbnail 3 degrees to indicate it's been pressed
                   this._x += 3;//Offset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y -= 3;//Offset Y coordinate by 3 pixels to keep clip centered during rotation
              t.onReleaseOutside = function() {//define onRelease event of the variable movie clip
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during rotation
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onRelease = function() {//define onRelease function to load full sized image
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during
                   this._alpha = 75;//Reset thumbnail alpha to 75%
                   holder.loadMovie(fullURL[this.numb]);//Load full sized image into holder clip based on sub-variable t.numb, referenced by 'this'
         holder.loadMovie(fullURL[0]);//Initially load first full size image into holder clip
    // this one function scrolls the panel for all of the buttons, it gets the
    // size of the panel when the images are loaded by any given button...
    stroke.onEnterFrame = function() {
         if (this.hitTest(_xmouse, _ymouse, false)) {
              if (panel._x>=740) {
                   panel._x = 740;
              if (panel._x<=740-panel._width+mask._width) {
                   panel._x = 740-panel._width+mask._width;
              if ((panel._x<=740) && (panel._x>=740-panel._width+mask._width)) {
                   var xdist = _xmouse-830;
                   panel._x += -xdist/7;
    Of note is the change to how the movie clips are measured... this change in and of itself has really helped to make the thumbnail panels operation more efficient.
    Below is the script for each additional button: [Having issues with the forums not letting me post additional code, so I will put the remaining code in a reply below.]
    cont.

  • How can I load images without XML, please?

    Hello Everyone,
    I would highly appreciate it if someone can point me into the right direction. I have some AS2 code which loads up the images via an xml file. I have been asked to eliminate XML entirely and have images be loaded from with in the library. Aside from images, there are other xml nodes such as:
    image_name, image_description and such.
    What would be the best way going about eliminating the XML and getting the code to load images and other related info from the library. I would highly appreciate your help on this, please.
    Thanks a lot.

    create arrays that contain the same info as the xml.
    p.s.  and, you'll use attachMovie() instead of loadMovie().

  • Problem loading Image through XML!

    Hi,
      I am Akshay and am beginner in this forum. I am trying to load images using flickr API and having problem.
    I am doing it in following fashion:
    1) I am calling the Httpservice to get the xml through flickr API as
    <s:HTTPService id="photoService" url="http://api.flickr.com/services/feeds/....FullAPI" resultFormat="e4x" result="photoResultHandler(event);" fault="photoFaultHandler(event);"/>
    2) In photoResultHandler I am retrieving the XML
    private function photoResultHandler(re:ResultEvent):void
    photoXml= re.result as XML;
    However, I am struggeling to retireve elements from photoXML and then use it to display image in :
    <mx:Image  id="img0" x="151" y="98" width="520" height="291"/>
    The XML structure is as below:
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <feed">
    <entry>
         <author>  </author>
         <link rel="enclosure" type="image/jpeg" href="http://farm5.static.flickr.com/4484460580_04bbced2d8_o.jpg"/>
    </entry>
    <entry>
    </entry>
    I need to load the href value of link  which can be found in feed-->entry-->link in the above xml.
    Please help!
    -Akshay

    Hello Dave,
       Thanks for your prompt reply. Here's the mxml code :
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" creationComplete="photoService.send()"  minHeight="600">
    <fx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import mx.events.MoveEvent;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    public var photoXml:XML;
    private function photoResultHandler(re:ResultEvent):void
    photoXml= re.result as XML;
    //var src :int =  "{photoXml.feed.entry.updated}" as int;
    img0.source= String(photoXml.entry[0].link[1].@href);
    private function photoFaultHandler(fe:FaultEvent):void
    Alert.show(fe.fault.message);
    ]]>
      </fx:Script>
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    <s:HTTPService id="photoService" url="http://api.flickr.com/services/feeds/photos_public.gne?id=48951865@N07" resultFormat="e4x" result="photoResultHandler(event);" fault="photoFaultHandler(event);"/>
    </fx:Declarations>
    <mx:Image  id="img0" x="151" y="98" width="520" height="291"/>
    </s:Application>
    Hope it helps you in finding out the problem...DO let me know your thouhgts
    Thanks again for your replies so far......
    -Akshay

  • Trouble loading images from XML files using AS

    I am creating a slideshow and found a script that will load
    the images via an XML document, but I believe the script is for an
    absolute references image such as <a href="
    http://www.myimages.com/image1.jpg">
    and I want to be able to have them in a file and reference the file
    in the XML such as :
    <pic>
    <image>images/04_02.jpg</image>
    <caption>Soleil Center 4</caption>
    </pic>
    When I test movie I get an error
    Error opening URL "path_to_image/01_02.jpg"
    Is there something I need to change in the AS to be able to
    reference a folder on my desktop (in the same directory as .fla
    file).
    here is the AS 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;
    }

    something is still amiss here becuase I placed the xml and
    images at the root level and the images still do not load. I don't
    get any kind of error and Trace tells me the file is being loaded.
    took out the /images/ part so that in the XML it's now :
    <pic>
    <image>07_02.jpg</image>
    <caption>Image Description</caption>
    </pic>
    and here is the AS code:
    var image:Array = new Array();
    var description:Array = new Array();
    function loadXML(loaded) {
    if (loaded) {
    var xmlNode:XMLNode = this.firstChild;
    var total:Number = xmlNode.childNodes.length;
    for (var i:Number = 0; i<total; i++) {
    image.push(xmlNode.childNodes
    .childNodes[0].firstChild.nodeValue);
    description.push(xmlNode.childNodes.childNodes[1].firstChild.nodeValue);
    trace('File Name Value: '+xmlNode.childNodes);
    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;
    }

  • Load image dynamically by scripting to dynamic xml pdf, is it possible?

    Hi All,
    I've uploaded static pdf form to http://groups.google.com/group/livecycle/web/logo.pdf.
    The form contains ImageField.
    In the "docReady" event of the form I wrote a script:
    ImageField1.value.image.href="http://www.quicksoft.co.il/images/
    quicksoftlogo2.jpg";
    When the form is loaded the ImageField shows the image from the url
    I've updated in the script.
    Once the form is saved as dynamic xml pdf the script stop working.
    Is that means that it is not possible to load images by scripting to
    dynamic xml pdfs?
    Anyone familiar with workarounds for it?
    Thanks in advance,
    Rbuz

    I got an answer from Adobe:
    Dynamic change of an image href has been disabled due to potential security issues. There are however a few workarounds to choose from:
    1. Embedding the images in the form as hidden objects. They can then be set to visible on initialize or clicking a button. This will affect performance, but if the images are in a compressed format, this can be minimized.
    2. Create a Web service interface to grab the image from wherever they are stored, base64 encode it and return it to the form. You would also have to update the bindings for the image field on the form (a one time operation).

  • Loading images from an Array generated from XML

    OK, this is my first day trying to use AS3 and I'm kind of
    confused on how to load an image onto the screen and then be able
    to resize it, scale it, etc..
    I'm loading up to 5 images in from an XML file that will be
    generated on a server. (right now I'm just using a test.xml file).
    Normally I would load the images into dynamically created
    movie clips (whatever0_mc through whatever4_mc generated by code in
    AS2). But I can't seem to get anything working.. I've looked on the
    internet and read through some information but I'm still just
    REALLY confused... this is what I have so far. To make it easier on
    me in the future, I've put different code on different layers so I
    can look at it closer.. I've separated the code into the different
    layers they're on here:
    First Layer:
    import flash.events.Event;
    import flash.net.URLLoader; // URL Loader Import for Images
    import flash.net.URLRequest; // URL Requests Import for
    Images
    import flash.display.Loader; // Loader
    import flash.events.ProgressEvent; // Progress for Loader
    import flash.text.TextField; // Imports for Text Fields
    import flash.display.Sprite; // Imports Sprite stuff for
    loaded Images
    import flash.display.Bitmap; // Imports stuff to display a
    bitmap
    Second Layer:
    var imgLoader:Loader = new Loader(); // Initialize Image
    Loader
    // Listeners for the Image Loaders //
    function showPreloader(evt:Event):void {
    trace("-- ** showPreloader ** --");
    addChild(loadProgress_txt);
    function showProgress(evt:ProgressEvent):void {
    trace("-- ** showProgress ** --");
    var totalLoaded:Number = evt.bytesTotal;
    var currentLoaded:Number = evt.bytesLoaded;
    var thePercent:Number = (currentLoaded * 100) / totalLoaded;
    loadProgress_txt.text = thePercent + "%"; // Show bytes
    loaded
    function showLoadResult(evt:Event):void {
    trace("-- ** showLoadResult ** --");
    Third Layer:
    // Setup Variables //
    var imageArray:Array = new Array();
    var galleryTitle:String;
    var numPhotos:Number;
    var gallerySubmitter:String;
    // XML Info //
    XML.ignoreComments = true;
    XML.ignoreWhitespace = true;
    var galleryXML:XML;
    var xmlLoader:URLLoader = new URLLoader();
    var request:URLRequest = new URLRequest("test.xml");
    xmlLoader.load(request);
    xmlLoader.addEventListener(Event.COMPLETE, XMLComplete);
    function XMLComplete(evt:Event):void {
    trace("-- ** XMLComplete ** --");
    var loader:URLLoader = evt.target as URLLoader;
    if (loader != null){
    galleryXML = new XML(loader.data);
    galleryTitle = galleryXML.children()[0].attributes()[0];
    numPhotos = galleryXML.children()[0].attributes()[1];
    gallerySubmitter = galleryXML.children()[0].attributes()[2];
    trace("galleryTitle: " + galleryTitle);
    trace("numPhotos: " + numPhotos);
    trace("gallerySubmitter: " + gallerySubmitter);
    for(var i:Number = 0; i<numPhotos; i++) {
    imageArray.push(galleryXML.children()[0].children()
    .attributes()[1]);
    } // for(var i:Number = 0; i<numPhotos; i++)
    trace(imageArray.toString());
    trace("loading: images\\gallery\\" + imageArray[0]);
    var imgRequest:URLRequest = new
    URLRequest("images\\gallery\\" + imageArray[0]); // Request the
    Image into the Loader
    imgLoader.load(imgRequest);
    imgLoader.contentLoaderInfo.addEventListener(Event.OPEN,showPreloader);
    imgLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress);
    imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showLoadResult);
    } else { // if (loader != null){
    trace("loader is not a URLLoader!");
    } // if (loader != null){
    } // function onComplete(event:Event):void {
    // End XML Info //
    Can anyone point me in the next direction?
    thanks...

    When you used the IMAQ create VI you specified each image to use the same name of "image".  Each image has to have a unique name.  I edited your VI to give a unique name for each image and I was able to view three different images in three different viewing panes.
    Attachments:
    Image Array Reworked.vi ‏19 KB

  • Swapping xml loaded Images to scene elements?

    Hi there!
    I have a small quick question about xml loaded images.
    Can you append/attach/swap the images to elements in your scene?
    I would like to manually animate a movieclip using keyframes and motion tweens. For example, to have a movieclip FLY! accross the screen! lol But I want the image on it to be of one that has been dynamically loaded.
    I can't seem to work out how to replace an image on a movieclip from a dynamically loaded image.
    Is it even possible?
    Thanks heaps for your time you guys!

    If the original image is the only object within the movieclip, you can use removeChildAt(0) to get rid of it, and use addChild(your_new_image) to replace it.

  • I'd like to load images using XML and Java - hints??

    I have a XML files that are created on a timed basis....they describe a photo and point to a dir where the photo is stored...like...
    <image>
    <user>bill</user>
    <img>photo.jpg</img>
    <img_dir>'/tmp/photos'</img_dir>
    </image>
    I'd like to write a Java program that parses the XML and loads the images, data into Oracle.
    Suggestions on Oracle tools, downloads that will help me accomplish this???
    Thanks!

    I pass a URL and then when I parse the XML I download the file from the URL.
    A.

  • Problems loading images dynamically with XML

    Hi Everyone,
    I am working with a project that was build by another
    developer and I have been asked to modify it several ways. This is
    an interactive map for a hotel brand where when you click on the
    USA, you get a list of all the states, click a state and a list of
    all the hotels in that state comes up, click a hotel, the hotel's
    information is displayed. I understand the structure of the files,
    how they make them work, though I couldn't build it myself.
    The problem I am having is this. can't make the hotels'
    photos load into the flash through the XML. I created a target
    movie file that the image could load into but something is not
    happening as far as loading the images. I don't know if the movie
    clip that I created is the right way to go (it was made as an
    object in the library that is exported via AS), or if I should
    create one in the action script file that loads the XML data.
    I looked at some tutorials about how to load images with XML
    but those didn't get into the level of detail that I need for this
    project.
    I've attached some partial code to see if anyone can help me
    work through this.
    Any and all suggestions are welcome.
    Thanks for the help in advance.
    Jeremiah

    I'm a noob at AS3 and trying to learn this XML stuff myself,
    but i have been able to load pictures to the stage...this might
    help you...my xml file photo section is similar to yours, only I
    have it labeled as "href" instead of "source"...
    var imageLoader:Loader;
    var xml:XML;
    var xmlList:XMLList;
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load(new URLRequest("xmldata/images.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    function xmlLoaded(event:Event) :void {
    xml = XML(event.target.data);
    xmlList = xml.children();
    for (var i:int = 0; i<xmlList.length(); i++) {
    imageLoader = new Loader();
    imageLoader.load(new URLRequest(xmlList
    .attribute("href")));
    imageLoader.x = 0;
    imageLoader.y = 0;
    addChild(imageLoader);

  • Load images from XML to specific movieclip

    I'm still begginer. I have to load images in specific movieclip, because they're loading over all the other layers. What should I do?
    I made a simple slideshow by tutorial.
    I guess it would be better that I show all the code not specific parts:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;
    var my_speed:Number;
    var my_total:Number;
    var my_images:XMLList;
    var my_loaders_array:Array=[];
    var my_labels_array:Array=[];
    var my_success_counter:Number=0;
    var my_playback_counter:Number=0;
    var my_slideshow:Sprite = new Sprite();
    var my_image_slides:Sprite = new Sprite();
    var my_label_slides:Sprite = new Sprite();
    var my_preloader:TextField;
    var my_timer:Timer;
    var my_prev_tween:Tween;
    var my_tweens_array:Array=[];
    var my_xml_loader:URLLoader = new URLLoader();
    my_xml_loader.load(new URLRequest("sshow.xml"));
    my_xml_loader.addEventListener(Event.COMPLETE, processXML);
    function processXML(e:Event):void {
        var my_xml:XML=new XML(e.target.data);
        my_speed=my_xml.@SPEED;
        my_images=my_xml.IMAGE;
        my_total=my_images.length();
        loadImages();
        my_xml_loader.removeEventListener(Event.COMPLETE, processXML);
        my_xml_loader=null;
    function loadImages():void {
        for (var i:Number = 0; i < my_total; i++) {
            var my_url:String=my_images[i].@URL;
            var my_loader:Loader = new Loader();
            my_loader.load(new URLRequest(my_url));
            my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
            my_loaders_array.push(my_loader);
        my_preloader = new TextField();
        my_preloader.text="Loading";
        my_preloader.autoSize=TextFieldAutoSize.CENTER;
        my_preloader.x = (stage.stageWidth - my_preloader.width)/2;
        my_preloader.y = (stage.stageHeight - my_preloader.height)/2;
        addChild(my_preloader);
    function onComplete(e:Event):void {
        my_success_counter++;
        if (my_success_counter==my_total) {
            startShow();
        var my_loaderInfo:LoaderInfo=LoaderInfo(e.target);
        my_loaderInfo.removeEventListener(Event.COMPLETE, onComplete);
    function startShow():void {
        removeChild(my_preloader);
        my_preloader=null;
        addChild(my_slideshow);
        my_slideshow.addChild(my_image_slides);
        nextImage();
        my_timer=new Timer(my_speed*1000);
        my_timer.addEventListener(TimerEvent.TIMER, timerListener);
        my_timer.start();
    function nextImage():void {
        var my_image:Loader=Loader(my_loaders_array[my_playback_counter]);
        my_image_slides.addChild(my_image);
        my_image.x = (stage.stageWidth - my_image.width)/2;
        my_image.y = (stage.stageHeight - my_image.height-20)/2;
        my_tweens_array[0]=new Tween(my_image,"alpha",Strong.easeOut,0,1,2,true);
    function timerListener(e:TimerEvent):void {
        hidePrev();
        my_playback_counter++;
        if (my_playback_counter==my_total) {
            my_playback_counter=0;
        nextImage();
    function hidePrev():void {
        var my_image:Loader=Loader(my_image_slides.getChildAt(0));
        my_prev_tween=new Tween(my_image,"alpha",Strong.easeOut,1,0,2,true);
        my_prev_tween.addEventListener(TweenEvent.MOTION_FINISH, onFadeOut);
    function onFadeOut(e:TweenEvent):void {
        my_image_slides.removeChildAt(0);

    I don't see a problem in the code you provided. All the pictures are put in single one MovieClip, my_image_slides. Of course, there can be only one DisplayObject in a DisplayObjectContainer's layer (depth), so when you call function addChild again and again, the child displayObjects keep stacking up one on the other. I found one strange thing though:
    my_tweens_array[0]=new Tween(my_image,"alpha",Strong.easeOut,0,1,2,true);
    Why would you create an array just to limit it to one item and overwrite it every time? I would use this instead:
    my_tweens_array.push(new Tween(my_image,"alpha",Strong.easeOut,0,1,2,true));
    Can you upload it somwhere so we can see it in action? At this point I can only guess what the problem is.

  • How do i backup the list of load images automatically exceptions under Options- Content. I want to transfer to another comp without re-adding one at a time

    How do i backup the list of load images automatically exceptions under Options->Content. I want to transfer to another comp without re-adding one at a time. EVen if there is no way to backup, what is the system file for Firefox that stores these, so i can transfer this file or open it in an XML or similar editor to copy them out?

    The permissions.sqlite file stores 'allow' and 'block' exceptions for cookies, images, pop-up windows, and extensions (software) installation.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder
    See also:
    *https://support.mozilla.org/kb/Recovering+important+data+from+an+old+profile
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Loader will load images from another server, but then we get error on Bitmap operation

    I'm developing an app that currently is using Loader to get images from another server.  This shouldn't currently work since we are still waiting for the owner of that server to put a crossdomain file in place.  However, it does work -- sort of .
    Loader can load the images fine, without an error.  But then the app has a feature in which we are making a larger duplicate of the image to display in a sidebar, we do this in this manner:
    var myBitmap:Bitmap = Bitmap(loader.content);
    and when this runs we get a Flash player security error 2122, sandbox violation.
    So while I'm hoping all this will fix itself when the crossdomain.xml file is put in place, I'm confused as to why we only get the sandbox error when we make a Bitmap from the image, and not when we initially try to retrieve the image.
    (Incidentally: is there a better way to make a "copy" of an image loaded by a Loader, and then change its width and height for simultaneous display in another part of the stage?  I don't need to change its actual dimensions -- I just need to change its display width and height.)
    Thanks!

    The sandbox allows viewing, not editing from another server without a crossdomain.
    So, when you try to load it up, it loads it, but "read-only" and gives you an error when you try to "edit" it by making a new Bitmap out of it.
    This should resolve itself once that crossdomain is in place.
    ||EDIT||
    I just realized I should clarify my statement a little more.
    When you load images from another server without a crossdomain, it allows the load for display only.  When you try to load data, it will fail.  This is because, XML data, or some other type of data is editable by default, and images are only viewable by default.  So, the image fails when you try to convert it into an editable form.

Maybe you are looking for

  • How to make text part of object

    I have a square box that I created that is black. I have a white letter placed on the box(2D by the way). I want the letter to be part of the box, not just a croup, but merge the two. On a similar note, how do I merge two objects? Thanks

  • Submit by email with Mac OS

    Hi there, First time posting.  Thanks to everyone who is so amazing at answering questions here. I've learned alot. I have a form created with Live Cycle Designer ES4.  I have enabled reader rights by doing "Save as other" in Acrobat Pro. The "Submit

  • 1.8" Enclosures

    Hello, I have an HP Elitebook 2350p notebook. I need to take out the 1.8" hard drive and install it in an enclosure to take off some data. Do you know what type of enclosure I need. There seem to be SATA, ZIF and LIF enclosures available. Many thanks

  • Txt from Nokia to say an update is available, but ...

    Last night I got a text from "My Nokia" which said: "A software update for your device is available from Nokia. Visit www.nokia.com/softwareupdate or your local Nokia support pages for more details." I've been waiting for v6.xx for my phone for a whi

  • Exception while calling DOC_INFO service from a filter

    Hello All, I am coding for a requirement where I need to extract the document meta-data information (author) and sent out the mail notifications to the original doc-author whenever a workflow on a document is finished. For this I hooked a custom java