Load Multiple Images in Crystal Report using Paths

Hi Guys,
I am currently in need of developing a new requirement for our company's client. We have to load multiple images using just link in Crystal Report. Let's say that the images are stored in a folder (e.g., C:\Datafolder\Images\) and i have to fetch two images to show in crystal report (say, C:\Datafolder\Images\imageval1 and C:\Datafolder\Images\imageval2). These are actually dynamically created and therefore the number of images are not known and so i have to iterate through the list of image links.
Is it possible using merely crystal report and how?. If not, can I do it using Crystal Report SDK?. Any help will be appreciated. Please take note that we're also using C# in developing our software applications.
Thanks and best regards.
---CHITO--

There are also a number of KBAs:
1296803 - How to add an image to a report using the Crystal Reports .NET inproc RAS SDK
1199408 - How to load an image from disk into a dataset using CSharp (C#) in Visual Studio .NET
Other related KBAs:
1216239 - How to access a Crystal Report "Preview Picture" using the CR .NET or RAS .NET SDK?
1373770 - How can I add a picture to a Crystal Reports subreport using the RAS .NET SDK?
1320507 - How to change images dynamically in Crystal Reports based on parameter selection?
And more. Please do use the search box in the top right corner. Simple search terms are best. E.g: 'crystal image net' or 'crystal image format formula', etc.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter

Similar Messages

  • Loading image in Crystal Reports using RAS SDK

    Hello,
    I have a weird problem when I try to add dynamically an to a report.
    CrystalDecisions.ReportAppServer.ReportDefModel.PictureObject boPictureObject;
    boPictureObject = boReportClientDocument.ReportDefController.ReportObjectController.ImportPicture(
                        HttpContext.Current.Server.MapPath(imageURL), boSection, 1, 1);
    The program rise a COMException with the following message "The specified path was not found.". I verified the path I'm using and it's fine. Is there another cause for this exception?!
    Edited by: Rahma Sayari on Feb 23, 2012 4:32 PM

    Hello
    I don't think there is another reason for the error.
    I'd like you to try the code as follows though:
    boPictureObject = boReportClientDocument.ReportDefController.ReportObjectController.ImportPicture(Server.MapPath("my_image.jpg"), boSection, 1, 1);
    E.g.; I do wonder if using HttpContext.Current.Server.MapPath(imageURL) is the issue here (permissions, etc., etc.)
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Load Multiple Images using link in Crystal Report

    Hi Guys,
    I am currently in need of developing a new requirement for our company's client. We have to load multiple images using just link in Crystal Report. Let's say that the images are stored in a folder (e.g., C:\Datafolder\Images\) and i have to fetch two images to show in crystal report (say, C:\Datafolder\Images\imageval1 and C:\Datafolder\Images\imageval2). These are actually dynamically created and therefore the number of images are not known and so i have to iterate through the list of image links.
    Is it possible using merely crystal report and how?. Please take note that we're also using C# in developing our software applications.
    Thanks and best regards.
    ---CHITO--

    Hi Chito,
    You cannot load multiple images dynamically. Using the 'graphic location' formula for the OLE Object, you can only point to a location that can load one image.
    For the second image, you'll need to manually insert another OLE Object and point the formula to the next image's location.
    You can try posting to the SAP Crystal Reports, version for Visual Studio space to find out whether this can be done using CR SDK.
    -Abhilash

  • Problem in Loading Multiple image in Single Sprite/MovieClip

    Hi All,
    I am having a killing problem in loading multiple images in single movie clip/sprite using a separate class.
    Here is the ImageLoader.as class
    package com.project.utils{
        import com.project.*;
        import com.project.utils.*;
        import flash.events.EventDispatcher;
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.ProgressEvent;
        import flash.display.Loader;
        import flash.events.IOErrorEvent;
        import flash.net.URLLoader;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
        import flash.display.Bitmap;
        public class ImageLoader extends EventDispatcher {
            public var imgloader:Loader;
            public var imgMc:MovieClip;
            public var imgObject:Object;
            public var loaded:Number;
            public function ImageLoader():void {
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
            public function loadImage(imgHolder:MovieClip, imgObj:Object):void {
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
                imgMc = imgHolder;
                imgObject = imgObj;
                imgloader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImgLoad);
                imgloader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onImgLoadProgress);
                imgloader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onImageLoadFailed);
                imgloader.load(new URLRequest(imgObj.FilePath));
            private function onImgLoad(Evt:Event):void {
                var image:Bitmap = Bitmap(Evt.target.content);
                try {
                    imgMc.removeChildAt(0);
                } catch (error:Error) {
                imgMc.addChild(image);
                try {
                    if (imgObject.URL != undefined) {
                        imgMc.buttonMode = true;
                        imgMc.removeEventListener(MouseEvent.CLICK, onImageClicked);
                        imgMc.addEventListener(MouseEvent.CLICK, onImageClicked);
                } catch (err:Error) {
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD"));
            private function onImageClicked(evt:MouseEvent):void {
                trace("Image Attrs:"+imgObject.URL +" Target "+imgObject.Target);
            private function onImgLoadProgress(Evt:ProgressEvent):void {
                if (Evt.bytesLoaded>0) {
                    loaded = Math.floor((Evt.bytesLoaded*100)/Evt.bytesTotal);
                    dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_PROC",loaded));
            private function onImageLoadFailed(Evt:IOErrorEvent):void {
                trace("Image Loading Failed");
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_FAIL"));
    Here I am loading some images using the above class in a for loop, like
                for (var i=0; i < 3; i++) {
                    //imgLoader=new ImageLoader;
                    imgLoader.addEventListener("CustomEvent.ON_IMGE_LOAD",onImageLoad);
                    var target:MovieClip=videolist_mc["list" + mcCount + "_mc"];
                    target.list_mc.visible=false;
                    var imgObj:Object=new Object;
                    imgObj.FilePath=list[i].Thumbnail;
                    imgObj.Url=list[i].Url;
                    imgObj.Target=list[i].Target;
                    target.list_mc.urlObj=new Object  ;
                    target.list_mc.urlObj=imgObj;
                    imgLoader.loadImage(target.list_mc.imgholder_mc,imgObj);
                    target.list_mc.lable_txt.htmlText="<b>" + list[i].Label + "</b>";
                    target.list_mc.imgholder_mc.buttonMode=true;
                    target.list_mc.imgholder_mc.addEventListener(MouseEvent.CLICK,onItemPressed);
                    mcCount++;
    In this case, the ImageLoader.as works only on the last movie clip from the for loop. For example, if i am trying to load three image in three movie clips namely img_mc1,img_mc2 and img_mc3 using the for loop and ImageLoader.as, I am getting the image loaded in the third movie clip only img_mc.
    See at the same time, If i uncomment onething in the for loop that is
    //imgLoader=new ImageLoader;         
    its working like a charm. But I know creating class objects in a for loop is not a good idea and also its causes some other problems in my application.
    So, help to get rid out of this problem.
    Thanks
    -Varun

    package com.project.utils{
        import com.project.*;
        import com.project.utils.*;
        import flash.events.EventDispatcher;
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.ProgressEvent;
        import flash.display.Loader;
        import flash.events.IOErrorEvent;
        import flash.net.URLLoader;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
        import flash.display.Bitmap;
        public class ImageLoader extends EventDispatcher {
            public var imgloader:Loader;
            public var imgMc:MovieClip;
            public var imgObject:Object;
            public var loaded:Number;
            public function ImageLoader():void {
    // better add you movieclip to the stage if you want to view anything added to it.
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
            public function loadImage(filepath:String):void {
                imgloader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImgLoad);
                imgloader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onImgLoadPr ogress);
                imgloader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onImageLoadF ailed);
                imgloader.load(new URLRequest(filepath));
            private function onImgLoad(Evt:Event):void {
                var image:Bitmap = Bitmap(Evt.target.content);
                try {
                    imgMc.removeChildAt(0);
                } catch (error:Error) {
                imgMc.addChild(image);
                try {
                    if (imgObject.URL != undefined) {
                        imgMc.buttonMode = true;
                        imgMc.removeEventListener(MouseEvent.CLICK, onImageClicked);
                        imgMc.addEventListener(MouseEvent.CLICK, onImageClicked);
                } catch (err:Error) {
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD"));
            private function onImageClicked(evt:MouseEvent):void {
                trace("Image Attrs:"+imgObject.URL +" Target "+imgObject.Target);
            private function onImgLoadProgress(Evt:ProgressEvent):void {
                if (Evt.bytesLoaded>0) {
                    loaded = Math.floor((Evt.bytesLoaded*100)/Evt.bytesTotal);
                    dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_PROC",loaded));
            private function onImageLoadFailed(Evt:IOErrorEvent):void {
                trace("Image Loading Failed");
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_FAIL"));
    Here I am loading some images using the above class in a for loop, like
                for (var i=0; i < 3; i++) {
                    var imgLoader:ImageLoader=new ImageLoader();
                    imgLoader.addEventListener("CustomEvent.ON_IMGE_LOAD",onImageLoad);
                    var target:MovieClip=videolist_mc["list" + mcCount + "_mc"];
                    target.list_mc.visible=false;
                    var imgObj:Object=new Object;
                    imgObj.FilePath=list[i].Thumbnail;
                    imgObj.Url=list[i].Url;
                    imgObj.Target=list[i].Target;
                    target.list_mc.urlObj=new Object  ;
                    target.list_mc.urlObj=imgObj;
                    imgLoader.loadImage(pass the image file's path/name);
                    target.list_mc.lable_txt.htmlText="<b>" + list[i].Label + "</b>";
                    target.list_mc.imgholder_mc.buttonMode=true;
                    target.list_mc.imgholder_mc.addEventListener(MouseEvent.CLICK,onItemPressed);
                    mcCount++;

  • Print a report in crystal Report using SDK

    Hi Dear;
    any body can publish a sample code how can i print a report built in crystal report using SDK?
    regards;

    Hi Dany,
    Hope the following code will help u .
    before calling the function make a XML by using dataset.writexml, in which you have to pass the name of your stored procedure.
    for this you have to decalre commantype as stored procedure.
    first parameter of this is rpt name . asecon paramer is ur xml name which you got from DAtaset.writexml.
    Sub ShowReport(ByVal rptName As String, ByVal SourceXML As String)
            Try
                Dim oSubReport As CrystalDecisions.CrystalReports.Engine.SubreportObject
                Dim rptSubReportDoc As CrystalDecisions.CrystalReports.Engine.ReportDocument
                Dim rptView As New CrystalDecisions.Windows.Forms.CrystalReportViewer
                Dim rptPath As String = System.Windows.Forms.Application.StartupPath & "\" & rptName
                Dim rptDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument
                rptDoc.Load(rptPath)
                For Each oMainReportTable As CrystalDecisions.CrystalReports.Engine.Table In rptDoc.Database.Tables
                    oMainReportTable.Location = System.Windows.Forms.Application.StartupPath & "\" & SourceXML
                Next
                For Each rptSection As CrystalDecisions.CrystalReports.Engine.Section In rptDoc.ReportDefinition.Sections
                    For Each rptObject As CrystalDecisions.CrystalReports.Engine.ReportObject In rptSection.ReportObjects
                        If rptObject.Kind = CrystalDecisions.Shared.ReportObjectKind.SubreportObject Then
                            oSubReport = rptObject
                            rptSubReportDoc = oSubReport.OpenSubreport(oSubReport.SubreportName)
                            For Each oSubTable As CrystalDecisions.CrystalReports.Engine.Table In rptSubReportDoc.Database.Tables
                                oSubTable.Location = System.Windows.Forms.Application.StartupPath & "\" & SourceXML
                            Next
                        End If
                    Next
                Next
                rptView.ReportSource = rptDoc
                rptView.Show()
                Dim oFrm As New System.Windows.Forms.Form
                rptView.DisplayGroupTree = False
                rptView.Dock = System.Windows.Forms.DockStyle.Fill
                rptView.Location = New System.Drawing.Point(0, 0)
                oFrm.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
                oFrm.Controls.Add(rptView)
                oFrm.Name = "rptForm"
                oFrm.Text = "rptForm"
                oFrm.ResumeLayout(False)
                oFrm.WindowState = System.Windows.Forms.FormWindowState.Maximized
                oFrm.TopMost = True
                oFrm.ShowDialog()
            Catch ex As Exception
                oApplication.MessageBox(ex.Message)
            End Try
        End Sub

  • Thumbnail images in crystal report XI R2

    Please help on how to show thumbnail images in crystal report XI R2 using Oracle datbase.We are storing the images in database using image location ex:http:
    ..jpg and not the image itself.

    Crystal does not have the bility to use thunbnails. But that would be a great enhancement. I'll add it to the Enhancement request database.

  • Need to sum hh:mm:ss in crystal report using Running Total Fields

    Hello,
    I am new to .Net and crystal reports so please go easy on me.
    I am trying to develop a crystal report using Visual Basic .NET. I have a column which displays the "Inbound Time" in "hh:mm:ss" format. I have to sum the total inbound time and display it.
    I tried using the Running Total and i am not successful.
    Here is the code which I am using in the Running total
    WhilePrintingRecords;
    if isNumeric({Report3;1.TotalInboundTime}) then
    {Report3;1.TotalInboundTime}
    else
    CStr ({Report3;1.TotalInboundTime});
    NumberVar array test2 := [ToNumber(left(CStr({Report3;1.TotalInboundTime}),2)),ToNumber(mid(Cstr({Report3;1.TotalInboundTime}),4,2)),ToNumber(right(Cstr({Report3;1.TotalInboundTime}),2))];
    StringVar test1 := CStr( (ToNumber(test2[1])3600)+(ToNumber(test2[2])60)+(ToNumber(test2[3])));
    InboundTime is the time field which is in "hh:mm:ss"  format.

    Hello Bharathi,
    There are a couple of KBs about this. I haven't tested them myself, but you could give them a try:
    [How sum multiple time fields in Crystal Reports|http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2008378]
    [Creating a running total to show the difference between two datetime fields |http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2010261]
    [Totalling time values that are stored as numbers in the database|http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2005576]
    Cheers,
    Fritz

  • Inserting images in Crystal Reports

    Hello,
    I have two questions regarding the use of pictures in a Crystal report :
    1. Is there a maximum dpi resolution limit for pictures to be inserted in a Crystal Reports.
    2. Is there a way to control the PDF output picture quality ? When exporting to PDF, the quality of the picture is reduced.
    Thank you
    Anthony

    I have the following questions about inserting images into Crystal Reports:
    1.  Can the images be positioned horizontally?
    2. When there is more that one image attached to a database record, can the number of images be limited in the report?
      (For example, limit the number of images for each record to two.)
    3. If there is more than one page to a record, how can the image for the record be suppressed on all pages subsequent to the first page of the report?
    4.  If there is no image attached to the database record, how the space reserved for the image closed up?
    Thank you.

  • Crystal reports using xml at run time??

    Post Author: avnkkishore
    CA Forum: General
    Hi,
    I have very simple requirement.
    I would like to create a crystal
    report using XML. This
    XML file will be decided at run time
    (not at design time).
    Hence i have added a crystal report viewer control to my windows form and did
    not choose any data source (i left it blank currently). Now i am trying to load
    XML file with the following simple code.
                PropertyBag
    crLogOnDetails = new PropertyBag();
    crLogOnDetails&#91;"Local XML File"&#93; = @"C:\Hosts.xml";
    crLogOnDetails&#91;"Local Schema File"&#93; = @"C:\Hosts.xsd";
    ConnectionInfo conn = new ConnectionInfo();
    conn.Attributes = crLogOnDetails;
                // create
    "Host" table
    CrystalDecisions.ReportAppServer.DataDefModel.Table tbl;
                tbl = new
    CrystalDecisions.ReportAppServer.DataDefModel.Table();
                tbl.Name =
    "Host";
    tbl.ConnectionInfo = conn;
    rcDoc.DatabaseController.AddTable(tbl, null);
    I am getting exception exactly at the above line (i.e. when adding table to
    Database Controller) saying "COMException was unhandled" with error code
    0x80004005 Unspecified error.
    Can any one please help me regarding how to resolve this.
    Thanks in advance,
    Kishore

    I am using VB6 as the front end and Microsoft Access to hold the data and Crystal Reports 8.5. I have a staff name parameter that I want the user to select which staff name to print the report.  If there is
    a new staff the name is not in the list of parameters.  How do I add to the parameter list at run time from the staff table?
    Hi,
    I am afraid that these forums don't support VB6, you could refer to this thread:
    Where to post your VB 6 questions
    You could consider posting this issue in these forums below:
    These forums do not support Visual Basic 6, however there are many third-party support sites that do. If you have a VB6-related question please visit these popular forums:
    VB Forums
    VB City
    In addition, issues related to Crystal Reports are not supported either since it belongs to third-party.
    You could post issues related to Crystal Reports to its forum to get dedicated supports.
    SAP Crystal Reports for .NET forum:
    http://forums.sdn.sap.com/forum.jspa?forumID=313
    Thanks for your understanding.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Step- by- Step on How to Load Excel data into Crystal Reports?

    Hi Friends,
                      Can anyone send me a Step- by- Step on How to Load Excel data into Crystal Reports? Pls help me. Thanks in Advance.
    Vijay

    It's also important to 'prep' the excel file prior to connecting to it.
    Give the data tab a meaningful name
    Make sure the column headers are unique and that every column has a header
    Delete any blank tabs
    If you have trouble with Excel changing the data type of a field (say, a social security number you want to be a string value rather than a number so you don't lose leading zero) an alternative would be to save the spreadsheet file as a CSV, create a schema.ini to specify the data types for each column (example below) and use the same steps to connect except instead of choosing Excel 8.0, scroll to the bottom and choose Text.  You have to make sure the CSV file is in the same folder as the schema.ini file that defines the columns.
    Schema.ini example:
    200912PUSD.csv
    ColNameHeader=True
    Format=CSVDelimited
    MaxScanRows=25
    CharacterSet=OEM
    Col1=SSN Char Width 9
    Col2=LAST_NM Char Width 25
    Col3=FIRST_NM Char Width 25
    Col4=DOB Date
    Col5=STDNT_ID Char Width 10
    Col6=SORTKEY Char Width 10
    Col7=SCHOOL_NM Char Width 30
    Col8=OTHER_ID Integer
    Col9=GRADE Char Width 2
    The filename in the first line needs to have the []  brackets around it, but I couldn't get it to display in this forum correctly.
    Edited by: Eric Petersen on Jan 27, 2010 9:40 AM

  • Converting a binary string into a JPEG image in Crystal Reports 2008

    Hi Gang
    Iu2019m having problems converting a binary string into an image in Crystal Reports 2008
    I have JPEG images stored in ECC.  ECC stores the data in binary format.
    Iu2019m using the ECC function module SKWF_PHIO_CONTENT_ACCESS_GET to retrieve the data.  This function module has an export table, FILE_CONTENT_BINARY, which returns several lines of data.  Each line contains a maximum of 1,024 characters.
    When I drop the T_ FILE_CONTENT_BINARY.LINE field into my Crystal Report detail section, I wind up with a report that displays all the lines in FILE_CONTENT_BINARY table.  (in my case, 19 lines are displayed.)
    I created a formula to collect all the data into a single string.
    whileprintingrecords;
    stringvar data:= data & {SKWF_PHIO_CONTENT_ACCESS_GET.T_FILE_CONTENT_BINARY.LINE}
    I added the formula to the detail section and itu2019s doing a great job collecting the data.
    I then inserted a picture object in the report footer, opened the format editor, navigated to the u201Cpictureu201D tab, and inserted a formula for the u201Cgraphics locationu201D.
    whileprintingrecords;
    stringvar data:=data;
    data
    My clever idea turned out to be a disappointment . . . . my picture object is blank.
    Does anyone have a solution for converting a binary string into a JPEG image?

    Save the JPEG in a format CR supports. Refer to the help file for the file types.

  • Images with Crystal Reports

    Somebody pls. advise if it's possible to display images with Crystal Reports ?!
    I want to generate a Price Catalog with images.   I have uploaded images into the system.
    Unfortunately, Oracle Report Builder has let me down.
    A short tutorial on how to achieve this will be useful as i am still trying to get acquainted with CR.
    Cheers - Mave

    Hi..
    I saw your snap shot, in your snap shot you are selecting table fields.  The option is much before selecting table fields.
    Like :
    a. Select Standard Report wizard
    b. It ask you to connect to your datasource (ODBC / OLE DB /Native)
    c.Once you connect to your database you will see below options
       - Your Database Name
          Add Command
          Tables
          Views
          Stored Procedures
    Here you need to select Add Command and it will opend a window to type your sql.
    Thanks,
    Sastry

  • Load multiple images from directory?

    What is the best way to use CF to load multiple images from a
    server directory please? I have CF calling a stored procedure that
    returns an array of file names. I am using a Flex front end, and
    wonder if I should just pass the file name array to Flex and let it
    loop through and load each image into an array. Or is it possible
    from within my CFC to use the file name array to get CF to grab the
    images and then pass that image array back to Flex? If so, is there
    any advantage to either approach? TIA,
    Mic.

    You don't want to pass the binaries to Flex, you should just
    give Flex the image names and load them via HTTP.

  • Loading multiple images in IE...

    Hi,
    I encountered a very strange problem (probably bug) while
    loading multiple images from IE. Flash is very simple (code is
    stripped version of match larger program) it contains simple for
    loop that loads image 20 times, and COMPLETE handler that position
    image.
    Running application from Flash IDE is ok, but if user run
    flash embeded into html from IE (IDE auto generated html) and
    interrupt loading (closes IE tab (not whole IE, just tab)) next
    load of same html stop working. What is event more strange, is that
    image url entered in addres field of IE will not work?!?!
    To conclude, to reproduce this behavior: run html from IE and
    close tab in middle of loading process (after few images loaded).
    Running html again will not work (or typing image url into
    address). NOTE that tab must be closed (not whole IE). Closing IE
    and running html again will work normaly.
    Is there any idea how to correct this? Note that I used
    different image links, and any of them have same behavior, so i
    excluded url as error.
    P.S. I use IE 7 under the Vista, but IE 7 with XP also have
    same behavior.
    Thanks

    If you mean that image service have simultaneous download
    limit, it does not. We have number of tile-generating services, and
    also prerendered images, and on every system we have same issue.
    Also, any flash-based map that load tiles are prone for this
    error (e.g. yahoo maps, flashearth even google flash maps).
    P.S. On Firefox it works ok.

  • Help with loading multiple images via LoadVars

    Hello everybody.
    I need a hand loading multiple images using the LoadVars
    method with a text file. I can get it to load 1 image but not
    anymore than that. I am aware of other methods like using
    components but I am looking for a method where I can access and
    change all data from 1 text file (there will be text variable text
    within the file aswell to, but I am more concerned with the images
    at the moment).
    Anyway on to the issue. I have created a much simple .fla
    file that outlines my problem.
    The movie contains 3 layers:
    - top layer contains AS
    - middle layer contains an empty movie clip with the
    instance name of mcImage1
    - bottom layer contains an empy movie clip with the instance
    name of mcImage2
    The AS layer contains the following code:
    imagedata = new LoadVars()
    imagedata.load("data.txt")
    imagedata.onLoad = function(ok){
    if(ok){
    mcImage1.loadMovie(this.Image1)
    mcImage2.loadMovie(this.Image2)
    } else trace("Problem Loading")
    In the same folder of my .swf file I have a text file called
    data.txt which contains the following
    &Image1=image1.gif
    &Image2=image2.gif
    Also in the same folder of my .swf file I have two images
    image1.gif and image2.gif.
    When I run the flash the image2.gif is imported correctly.
    image1.gif does not appear.
    You can download my source files and all images here
    http://www.myrealpage.com/projects/var_test/var_test.zip
    Any help that can be shed on this problem is much
    appreciated.
    Thanks
    Matt

    Glad to help. It is just that I see so many folks who have
    two different parts of a problem smushed together – each
    problem isn't so hard on its own, but together they are difficult
    to wrap your head around. Always try and break down each step of
    the problem and it will help you in the end.
    That being said, I'm not quite so sure on this next problem.
    I don't do so much timeline stuff along with the Actionscript. I
    can get tricky. So this I don't quite have as much of clear mental
    picture of what you are describing. But here are some questions
    that I would ask – either of myself if I was doing it or of
    you.
    Is there a stop() on frame one to wait for the
    LoadVars.onLoad? Does the onLoad then say to play?
    If not, what happens if we get to Frame 10 before the
    LoadVars has even finished? That could be a problem.
    Remember that the LoadVars object is an actual object that
    will exist until it is deleted or removed in various ways. You can
    access it at any time after it is loaded. The onLoad event handler
    is just that thing you want to happen immediately after it is
    loaded.
    So my design would probably be.
    LoadVars on Frame 1.
    Where I am stopped.
    In the onLoad handler load the first image and tell the
    timeline to play
    On frame 10, the LoadVars object will still exist (unless
    you've deleted it)
    Get the variable out of the LoadVars and load the image.
    If you want to check this. Put a stop() in frame 10 and run
    it in the testing environment. When it gets to that frame, go to
    the debug menu and List Variables. You should see that your
    LoadVars object is still there.
    Does that answer your question or am I totally missing the
    point?

Maybe you are looking for

  • "#" in the ODS active data view

    Hi all, I have a question. I load data (text strings) into ODS object. Then I look into new or active data and I can see symbols "#" on the places in strings, where occurs any special character (for example from any language). I do not know wheteher

  • TS3992 Can i use iCloud to sync data between my Apple devices?

    I have a MacBook Pro and an iMac that I would like to sync my data on, and was wondering what the best way to do that is?  The data that I am trying to sync is on my desktop, and a subfolder within my Documents folder. Thanks Matt

  • New SF300-24P 10/100 POE Switch effecting Sybase App

    I recently moved my office. I am running a small Network on Windows 8.1. The main program for my Business no longer has tech support. The program uses sybase sql anywhere 9.0 to network. When I moved from one location to another the only thing that c

  • IPhoto Books and Calendars

    Is it true that I cannot get a book printed from IPhoto just because I live in Australia?? John

  • JDeveloper Extension

    I'm trying to create an extension in JDeveloper that creates a certain file structure. While the examples provided by Oracle provide a way to create a project, they do not show a way to create folders automatically within this project (which I need t