Allocation of multiple expenses in single posting template

Hi
With reference to Message 843069, we would like to suggest improvement to enable multiple allocation of expenses to respective departmental segments using a single Posting Template when each expense is allocated in various proportions of 100% among its Departments.
Example
Allocation of Stationery expense (1000 00) to its Department (1000 01) 1
and (1000 02) 2 at 50% each and allocation of Postage expense (2000 00)
to its Department (2000 01) 1 at 60% and (2000 02) 2 at 40%.
We need these allocations to be saved in a single Posting Template to
create a single Journal Entry at one goal.
Kedalene Chong

If you are using multiple queries then how are you designing the final web template, I meant are you doing data binding for queries with web tempaltes and then insert all the templates in to a main template?
or are you just using multiple table web items and using a single template for all the queries?
If you have Javascript then try using multiple templates for multiple queries and write the javascript for the related template and then put all in a main template.

Similar Messages

  • Allocation of multiple expenses in various 100% proportions

    Hi
    With reference to Message 843069, we would like to suggest improvement to enable multiple allocation of expenses to respective departmental segments using a single Posting Template when each expense is allocated in various proportions of 100% among its Departments.
    Example
    Allocation of Stationery expense (1000 00) to its Department (1000 01) 1
    and (1000 02) 2 at 50% each and allocation of Postage expense (2000 00)
    to its Department (2000 01) 1 at 60% and (2000 02) 2 at 40%.
    We need these allocations to be saved in a single Posting Template to
    create a single Journal Entry at one goal.

    I am much more familiar with reclassifications than allocations, but am certain the results from either can usually be obtained.
    A method layout with trigger of items X,Y and Z, then different source and target is necessary. Then the specifics may be defined as needed.
    It is most likely 2 allocations or reclassifications are needed because for group level allocations or reclassifications it is necessary to use posting level 30 document.

  • Grouping the same Resources Names and summarizing % Allocation from multiple files in one master file

    Hello,
    We are reviewing resource % allocation from multiple project files at once in a 'master' project file (via the Insert -> Project function). Each resource has the same name in each of the respective 'sub-files', and so we created a group in the master
    to group by name.
    When we apply the group to the resource usage view, the hours summarize correctly for 'Work', but when switching to % allocation to make things easier, the 'Summary' line doesn't sum the individual lines below it:
    url: goo.gl/r6daeI (I can't paste a link in this message right now)
    Does anyone have a solution for this nesting?
    Thanks!

    VSAT Ryan,
    I don't have Project open at the moment but a couple of thoughts come to mind. First of all it sounds like you are creating a dynamic master without a resource pool. In that configuration, your resources will show separately for each subproject. If you instead
    create a static master (i.e. uncheck the Link to Project option in the lower right corner of the Insert Project window when you build the master), identical resources in each subproject will automatically be combined into a single resource in the new master.
    Then you won't need to use grouping to see the data you want. Another advantage of creating a static master is that it will not be prone to file corruption like a dynamic master. The disadvantage of a static master is that it is a snapshot in time of the subprojects
    and there will be no dynamic interaction between the static master and the subproject files. You will need to build a new static master each time you want to update the combined data for all subprojects. This however is a pretty easy process and you can record
    a macro while doing it the first time such that it be even easier thereafter.
    Another approach is to create a resource pool file. That consolidates all resources into a single resource only file and should also eliminate the need to use grouping to get the data you want. And with a resource pool, you won't necessarily need to create
    a master since the pool file will contain the resource data you want. Use of a resource pool is however also a linked structure like a dynamic master and is therefore also prone to file corruption.
    Hope this helps
    John

  • 10G-form: How to do MULTIPLE WORD OR SINGLE WORD SEARCH at ITEM?

    I am using 10G DB + 10G Form Builder.
    I've 'database_item' where I am storing multiline text data.
    I want to do MULTIPLE WORD OR SINGLE WORD SEARCH at this item through FORM.
    I've tried by creating the following NON Database Items on the form:
    - multiline_search_text_item, and
    - multiline_result__text_item
    And then writing execute_query in KEY-NEXT-ITEM trigger.
    I've also tried using this in the POST-TEXT-ITEM at multiline_search_text_item:
    select table.database_item into :multiline_result__text_item from table where multiline_search_text_item = :multiline_search_text_item;
    Pl help me asap.
    Gaurav

    What you want to do is not clear.
    The query you wrote will select records where the table contains exactly what has been written in the search item. You can use LIKE and a wildcard search to find records which contain the search text:
    select table.database_item into :multiline_result__text_item
    from table
    where multiline_search_text_item LIKE '%'||:multiline_search_text_item||'%';
    You can use UPPER to make this case insensitive:
    select table.database_item into :multiline_result__text_item
    from table
    where Upper(multiline_search_text_item) LIKE Upper('%'||:multiline_search_text_item||'%');
    But I suspect you want either to match the individual words in the search text to individual words in the database multiline field, or find records where the search words appear (not necessarily as whole words). In that case, check out the following:
    -- set up a table (multiline and various whitespaces)
    DROP TABLE t;
    CREATE TABLE t AS
    SELECT
      ROWNUM rn,
      owner||Chr(9)||object_name||Chr(160)||subobject_name||'    '||object_id||' '||
      data_object_id||Chr(10)||object_type||' '||created||' '||last_ddl_time||' '||
      timestamp||' '||status||' '||temporary||' '||generated||' '||secondary AS col
    FROM all_objects;
    -- check the format of the multiline text item (col)
    SELECT * FROM t WHERE ROWNUM < 4;
    -- a type for the function below
    CREATE TYPE string_tab AS TABLE OF VARCHAR2(255);
    -- this function takes a string and cuts out each word, idetifying words
    -- as being separated by any whitespace.  it returns a collection
    CREATE OR REPLACE FUNCTION string_to_tab(
      p_string IN VARCHAR2) RETURN string_tab IS
      l_string LONG DEFAULT
        RTrim(regexp_replace(p_string,'[[:space:]]+',' ')) || ' ';
      l_data string_tab := string_tab();
      n NUMBER;
    BEGIN
      LOOP
        EXIT WHEN l_string IS NULL;
        n := InStr(l_string, ' ');
        l_data.extend;
        l_data(l_data.Count) := LTrim(RTrim(SubStr(l_string, 1, n - 1)));
        l_string := SubStr(l_string, n + 1);
      END LOOP;
      RETURN l_data;
    END string_to_tab;
    -- selecting from t where ANY of the words in the search text has
    -- a match in the multiline field (as a word or part of a word), so SYS
    -- matches to MDSYS and SYSTEM
    SELECT DISTINCT
      t.rn, t.col
    FROM
      t,
      (SELECT column_value
       FROM TABLE(CAST(string_to_tab('SYS   INDEX') AS string_tab))) x
    WHERE InStr(t.col,x.column_value) > 0;
    -- selecting from t where ALL of the words in the search text has
    -- a match in the multiline field (as a word or part of a word), so SYS
    -- matches to MDSYS and SYSTEM
    SELECT rn, col FROM(
    SELECT
      t.rn, t.col, cnt_x, Count(*) cnt
    FROM
      t,
      (SELECT column_value , Count(1) over(PARTITION BY 1)cnt_x
       FROM TABLE(CAST(string_to_tab('SYS   INDEX') AS string_tab))) x
    WHERE InStr(t.col,x.column_value) > 0
    GROUP BY t.rn, t.col, cnt_x
    WHERE cnt = cnt_x;
    -- selecting from t where ANY of the words in the search text
    -- match a word in the multiline field, so SYS matches only to SYS
    SELECT DISTINCT
      t.rn, t.col
    FROM
      t,
      (TABLE(CAST(string_to_tab(t.col) AS string_tab))) t2,
      (SELECT column_value
       FROM TABLE(CAST(string_to_tab('SYS   INDEX') AS string_tab))) x
    WHERE t2.column_value = x.column_value;
    -- selecting from t where ALL of the words in the search text
    -- match a word in the multiline field, so SYS matches only to SYS
    SELECT rn, col FROM(
    SELECT
      t.rn, t.col, cnt_x, Count(*) cnt
    FROM
      t,
      (TABLE(CAST(string_to_tab(t.col) AS string_tab))) t2,
      (SELECT column_value , Count(1) over(PARTITION BY 1)cnt_x
       FROM TABLE(CAST(string_to_tab('SYS   INDEX') AS string_tab))) x
    WHERE t2.column_value = x.column_value
    GROUP BY t.rn, t.col, cnt_x
    WHERE cnt = cnt_x;For your application you would replace 'SYS INDEX' with a variable (the search field). You can use upper() and wildcards for case insensitive & 'fuzzy' searches. You might need to modify the function so it removes other delimiters such as commas and colons.

  • Can we create multiple application with single MSI(or Same MSI) in biztalk admin console ?

    Can we create multiple application with single MSI(or Same MSI) in biztalk admin console ?
    My client requirement is process 100 files  from biztalk with in 5 min ,actually it is taking 20 min .
    So I decided to created same instance of the application with multiple time in BTS admin console ,as I understand biztalk admin console never allow to install same
    schema’s with multiple  time .
    Any help can be  appreciate ..

    BizTalk will automatically process multiple messages on separate threads so you may need to tune your system. The following link should get you started:
    http://social.technet.microsoft.com/wiki/contents/articles/7801.biztalk-server-performance-tuning-optimization.aspx
    Another possibility is to set the Batch Size property on your receive location if the adapter uses batch size to determine how messages are picked up.  As an example, it you want  the MSMQ adapter to immediately pick up messages and start
    to process them, set the batch size to 1.
    You may also need to distribute the processing across multiple BizTalk servers by installing BizTalk on additional servers and joining the existing BizTalk group.
    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

  • Would like project entry on Recurring JEs and Posting Templates

    From our customer:
    Version:  SAP 2007A PL 49
    Description of requirements: (When setting up recurring entries and Posting Templates there is no place to enter the project code.  There is a field to enter the distribution code.  For some monthly recurring entries such as vehicle insurance, we wish to record a project code on the recurring journal entry which represents the vehicle.
    Valid as of: (Not a legal requirement)
    Business needs: (We use project codes to record all expenses against a given area.  Automated postings such as recurring journal entries that do not post to the project codes jeopardize the accuracy of reports afterwards.)
    Examples: (When creating a new Recurring Journal Entry, there should be a field displayed that allows the user to enter a valid Project Code just like there is for Distribution (Cost Centre) Code.  Then when the Recurring Journal Entry is added on the proper date it will contain the valid Project Code.)
    Current Workaround: (Manually add the project code to the newly created journal entries after the fact.  Hard to find entries and high possibility to miss entries or make mistakes.)
    Proposed solution: (Please see response under Examples.)
    Sally Weinrauch,
    Senior Support Analyst
    Coastal Range Systems Inc.
    Recipients of: SAP's Partner of the Year 2007 & 2005,
    North America's Top Ten 2008, 2007 & 2006.
    Edited by: CRS Notes on Jul 22, 2009 10:39 PM

    Hi
    Adding "project" into Recurring posting and Posting templates has been already considered for B1 later version.
    Yan

  • Single report with multiple queries OR multiple reports with single query

    Hello Experts,
    I have a confusion regarding Live Office connection for many days. I asked many people but did not get a concrete answer. I am re-posting this question here and expecting an answer this time.
    The product versions that I am using are as follows:
    FrontEnd:
      BOE XI 3.1 SP4 FP 4.1
      Xcelsius Enterprise 2008 SP4
    Backend:
      SAP BW 7.0 EHP1
    I have created a dashboard which is getting data from a webi report using LO connections.
    The webi report has five report parts which are populated by five different queries.
    Now my question is, when the five LO connections are refreshed, is the webi report refreshed five times or just once?
    If the report is refreshed five times, then I guess it is better to have five different webi reports containing single report part, because in that way we can prevent same query being executed multiple times.
    SO what is the best practice- to have a single report having multiple queries - OR - to create multiple webi reports with single query?
    Thanks and Regards,
    PASG

    HI
    I think Best Practice is Multiple reports with single query
    Any way If LO connections refresh 5 time the query will refresh 5 timesRegards
    Venkat

  • Handling multiple submits in single form with JSP

    HI,
    I need to handle multiple submits in single form in a JSP.
    <html>
    <body>
    <form action="/Compute" method="post">
    <input type = "Submit" value="Find"/>
    <input type = "Submit" value="Add"/>
    <input type = "Submit" value="Delete"/>
    </form>
    <body>
    <html>
    /Compute wld take the control to a servlet named ComputeController.java .
    In this servlet how should I distinguish which Submit has been clicked(Find or add or Delete).
    TIA

    Give the submit button a name. It will be sent as well, so you can see it in the request variables.

  • Multiple Approval on single document

    Friends,
    How we will handle multiple approval on single document.
    Thanks in Advance
    Sukhjinder Singh

    Dear Sukhjinder Singh,
    In SAP Business One approvals on Documents is performed via the Approval templates (Administration - Approval Procedures - Approval templates). One of the aspects of the Approval Templates is the 'Stages'. In the Stage tab of the Approval Template the Approval Stage is chosen. If more than one approver of a document is required then in the 'Approval Stage' the field 'No. of Approvals required' should be set to number of approvals which the document needs. For Example, if a Sales Order should be approved by 2 people then the field 'No. of Approvals required'  should be set to 2.
    It is also worth noting that more than 2 approvers can be listed as approvers and any 2 of these approvers can approve the document.
    To find out more about approval procedures in SAP Business One read the document "Approval Procedures in Release 2004 A" which can be found on the documentation resource centre at the following location
    Service.sap.com -> Channel Partner Portal -> Solutions -SAP Business One -> Support -> OnLine Support - Documentation  Resource Centre -> SAP Business One 2004 A -> How to guides.
    I hope this helps.
    Noreen

  • BAPI to store multiple plants against single material

    Hi ,
    Is there a BAPI to store multiple plants against single material and  to store multiple sales organizations against single material.
    Thanks
    Regards,
    Vipin

    Hi,
    Im afraid whether you will be able to upload multiple plant and sales view together in one post. Probably check the BAPI which one of our sdn guys have suggested.
    I have only used IDocs to post and through that i can say you for sure, it is only possible to upload one at a time.
    And so does through your MM01 and MM02. You can attach only one plant at a time.
    Regards,
    Yogesh

  • MULTIPLE POSITIONS FOR SINGLE EMPLOYEE

    HI EXPERTS,
                     I AM AN ABAPER AND NOW I AM WORKING WITH HR DEPT .I HAVE TO BRING MANY POSITIONS TO A SINGLE EMPLOYEE.
    EX) RAM WILL BE THE AAST MANGAER FOR FINANCE AND BUSINESS EXECUTIVE AND WILL BE ONE AMONG THE BOARD OF DIRECTOR.
    SO WHEN WE CREATE ACTIONS WE CAN CREATE ONLY ONE POSITION AT A TIME .
    SO HOW TO CREATE MULTIPLE POSITIONS FOR A SINGLE EMPLOYEE.???

    Hi,
    You can assign multiple position to single employee, based on the Employment Percentage in IT001, you can assign multiple position.
    This concept is especially called Concurrent Employment. Assigning of multiple position, in Concurrent Employment, SAP has developed in such a way that, it will synchronize your Work schedule and show it one screen and payroll will calculate the amount from various assignment.
    I have posted the Wiki about the Concurrent Employment in the Wiki section. If you want go through that, you will get little idea.
    Good Luck
    Om
    Reward it, if u feel helpful.

  • Merge multiple rows into single row (but multiple columns)

    How to merge multiple rows into single row (but multiple columns) efficiently.
    For example
    IDVal IDDesc IdNum Id_Information_Type Attribute_1 Attribute_2 Attribute_3 Attribute_4 Attribute_5
    23 asdc 1 Location USA NM ABQ Four Seasons 87106
    23 asdc 1 Stats 2300 91.7 8.2 85432
    23 asdc 1 Audit 1996 June 17 1200
    65 affc 2 Location USA TX AUS Hilton 92305
    65 affc 2 Stats 5510 42.7 46 9999
    65 affc 2 Audit 1996 July 172 1100
    where different attributes mean different thing for each Information_type.
    For example for Information_Type=Location
    Attribute_1 means Country
    Attribute_2 means State and so on.
    For example for Information_Type=Stats
    Attribute_1 means Population
    Attribute_2 means American Ethnicity percentage and so on.
    I want to create a view that shows like below:
    IDVal IDDesc IDNum Country State City Hotel ZipCode Population American% Other% Area Audit Year AuditMonth Audit Type AuditTime
    23 asdc 1 USA NM ABQ FourSeasons 87106 2300 91.7 46 85432 1996 June 17 1200
    65 affc 2 USA TX AUS Hilton 92305 5510 42.7 46 9999 1996 July 172 1100
    Thanks

    Hi,
    That's called Pivoting . The forum FAQ has a section on this subject: {message:id=9360005}
    I hope this answers your question.
    If not, post your best attempt, along with a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data. (You did post the results you wanted, but they're very hard to read because they're not formatted. Use \ tags, as described in the forum FAQ, below.)
    Explain, using specific examples, how you get the results you want from the data given.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).  This is always important, but especially so with pivots.
    See the forum FAQ {message:id=9360002}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Transforming from multiple node to single node

    Hi,
    I new to BPEL trying to transform data from two different multiple nodes to single node of complex type.
    For Eg where 'req1' and 'req2' are multiple nodes in request:
    Request::
    <req1>
    <a1/>
    </req1>
    <req2>
    <b1/>
    </req2>
    Response::
    <c>
    <ca1>
    <cb2>
    </c>
    Please can anyone help me in getting the solution.
    Hope the pseudo-logic is clear!!!
    Edited by: c devi on Oct 18, 2011 7:12 AM
    Edited by: c devi on Oct 18, 2011 7:12 AM

    Hi',
    You can try this,
    <xsl:template match="/">
    <client:processResponse>
    <xsl:for-each select="$Var2.payload/client:process">
    <client:result>
    <xsl:value-of select="client:input"/>
    </client:result>
    </xsl:for-each>
    <xsl:for-each select="/client:process">
    <client:result>
    <xsl:value-of select="client:input"/>
    </client:result>
    </xsl:for-each>
    </client:processResponse>
    </xsl:template>
    Source:
    <req1>
    <a1/>
    </req1>
    <req2>
    <b1/>
    </req2>
    Target
    <c>
    <c1/>
    </c>
    You can do like this,
    Inside the Transform first put the for-each over the target variable, i.e. just above c1, then right click on the for-each > add XSL node > 'Clone' for-each.
    This will create the source one more time i.e. you will have now 2 targets of the same type,
    Like this.
    Target
    <c>
    <c1/>
    </c>
    <c>
    <c1/>
    </c>
    now join the wires from source to target for both of them, now right click on the transform (in the center) and do Test, this will give you the output.
    -Yatan

  • Scanning multiple pages into single document

    Is there a way to scan multiple pages into single document?  I am using the following: HP pavilion laptop with windows 8,  HP photosmart C6380 all in one printer scanner copier.

    Hi,
    Please try
    Double click printer icon on desktop,
    Select Scan a Document or Photo,
    Put the first page on the glass (face down),
    Check options (size, dpi ...), and select Scan document to file,
    Click Scan - machine will scan the first page
    Remove the first page on the glass, put the second page,
    Click + (plus sign) It sits on the left hand side of a red x
    Machine will scan the second page, put 3rd page on the glass and click + again ..... to the end then click Save
    Click Done after Save
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • 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++;

Maybe you are looking for

  • Problem with Audio on HP Envy 6-1130sw (C6F62EA)

    Hello everyone. I have a problem with audio on my ultrabook HP Envy 6. Sometimes when I try to play music there are no low tones and music plays really silent... And then when I restart PC problem dissapears and music plays fine... I thought there is

  • How to send pdf or excel attachment as saved alv layout in email

    Hi Guru, I am developing a report in which, i am sending report as excel attachment after clicking a button on top of alv grid, and pdf attachment after clicking another button on top of alv grid. I am sending mail by two ways they are: 1) I am popul

  • Page break, or start to next page?

    Hi, I have a paragraph style that must be mirrored in a running header. So, I must create a single style for both paragraphs staying in the same page, and paragraphs starting in a new page. Therefore, I must add the break manually when needed (unless

  • Somebody has stolen my macbook pro. What can I do?

    Yesterday somebody stole my computer macbook pro. I want to know if there is any thing that I can do. Thanks!!

  • Sound iPad Mini

    Why is sound distorted on my iPad Mini, less than a yr old? Has anyone experienced this problem?