How to load an object from library by clicking on a button?

How can we load and unload an object ( like a picture ) from our library by just clicking on a button and then unload it by clicking on an other button using as2.
Thanks for the help

assign the button an instance name (eg, btn) and assign the library object a linkage id - right click the library symbol>click properties>tick export for actionscript>assign a linkage id (eg, mc_id) and click ok.  then use:
var tl:MovieClip=this;
btn.onRelease=function(){
tl.attachMovie("mc_id","mc",tl.getNextHighestDepth());
// to remove, mc.removeMovieClip();

Similar Messages

  • How to remove the Object from memory.

    Hello.
    Flash file that i made with Flex Builder uses memory too
    much.
    Look at the next example source code.
    var testCan:Canvas = new Canvas();
    this.addChild(testCan);
    this.removeChild(testCan);
    testCan = null;
    but just memory usage still goes up, is not freed instantly.
    so if i load the large flash files on my web browser,
    after 5 munites or something, the web browser is down.
    How to remove the object from memory immediately without
    delay?

    It's all about the Garbage Collector ..
    There is a nice write up here :
    http://www.gskinner.com/blog/archives/2006/06/as3_resource_ma.html

  • How to load few objects in one sence ?Please help.

    Is there any one know how to load few object into one sence ?
    I have some code , It can load one object one the sence .Please any one know how to change it . Thanks so much .
    -------------------------- model loading --------------
    private void loadModel(String fn)
        /* Load the model from fn into the scene graph using a NCSA
           Portfolio loader. Rotate and scale it to make it easier to see.
           Store the loaded model's scene in the global loadedScene,
           and its branch group in loadedBG.
          FileWriter ofw = null;
          System.out.println( "Loading: " + fn );
          try {
            ModelLoader loader = new ModelLoader();    // the NCSA portfolio loader
            // System.out.println("Loader flags: " + loader.getFlags());
            loadedScene = loader.load(fn);             // the loaded scene
            // Rotate and scale the model
            if(loadedScene != null ) {
              loadedBG = loadedScene.getSceneGroup();    // the model's BG
              Transform3D t3d = new Transform3D();
              t3d.rotX( -Math.PI/2.0 );    // models are often on their face; fix that
              Vector3d scaleVec = calcScaleFactor(loadedBG, fn);   // scale the model
              t3d.setScale( scaleVec );
              TransformGroup tg = new TransformGroup(t3d);
              tg.addChild(loadedBG);
              sceneBG.addChild(tg);   // add (tg->loadedBG) to scene
            else
              System.out.println("Load error with: " + fn);
          catch( IOException ioe )
          { System.err.println("Could not find object file: " + fn); }
        } // end of loadModel()
      private Vector3d calcScaleFactor(BranchGroup loadedBG, String fn)
      // Scale the model based on its original bounding box size
         BoundingBox boundbox = new BoundingBox( loadedBG.getBounds() );
         // System.out.println(boundbox);
         // obtain the upper and lower coordinates of the box
         Point3d lower = new Point3d();
         boundbox.getLower( lower );
         Point3d upper = new Point3d();
         boundbox.getUpper( upper );
         // store the largest X, Y, or Z dimension and calculate a scale factor
         double max = 0.0;
         if( (upper.x - lower.x ) > max )
           max = (upper.x - lower.x );
         if( (upper.y - lower.y ) > max )
           max = (upper.y - lower.y );
         if( (upper.z - lower.z ) > max )
           max = (upper.z - lower.z );
         double scaleFactor = 10.0/max;    // 10 is half the width of the floor
         System.out.println("max dimension: " + df.format(max) +
                            "; scaleFactor: " + df.format(scaleFactor) );
         // limit the scaling so that a big model isn't scaled too much
         if( scaleFactor < 0.0005 )
             scaleFactor = 0.0005;
         return new Vector3d(scaleFactor, scaleFactor, scaleFactor);
      }  // end of calcScaleFactor()

    i mean , how to load few objects in one scene. not sence ..sorry .
    if u knwo how to load few objects in . please please give me some help .......Thanks so much

  • How to pass an object from jsp to other jsp using SendRedirect

    How to pass an object from one jsp to the other jsp using ssendRedirect with out using the session
    I am having 2 jsps
    x.jsp and y.jsp
    From x.jsp using sendRedirect iam going to y.jsp
    From x.jsp i have pass an object to the y.jsp
    Is it possible without putting the object in session
    Is it possible using EncodeUrl
    Please help me Its Urgent

    Is it possible without putting the object in sessionAnything is possible. Would you accept that it is very difficult?
    When you send a redirect, it tells the browser to send a new request for the target page. That means any request parameters/attributes are lost.
    Is it possible using EncodeUrl response.encodeURL() puts the session id into a url if the browser does not support cookies. It is purely for retaining the session.
    There are two ways that you can communicate across a sendRedirect.
    1 - use the session
    2 - pass a parameter in the url.
    parameters are string based, so passing objects is almost out of the question.
    Potentially you could serialize your object, encode it in base64 (so it is composed completely as characters) and pass it as a parameter to the other page, where you retrieve it, unencode it, and then load the serialized object.
    Or you can just use the session.

  • Hi,how can i transport objects from one server to other like (Dev To Qty)

    Hi Sir/madam,
       Can u explain how can i transport objects from one server to other like (Development To Quality To Production).
    Regards,
    Vishali.

    Hi Vishali,
    Step 1: Collect all Transports(with Packages) in Transports Tab(RSA1)- CTO
    Step 2: Release the subrequests first and then the main request by pressing Truck button
    Step 3: STMS or Customized transactions
    Object Collection In Transports:
    The respective Transports should have the following objects:
    1. Base Objects -
    a. Info Area
    b. Info object catalogs
    c. Info Objects
    2. Info Providers u2013
    a. Info Cubes
    b. Multi Providers
    c. Info Sets
    d. Data Store Objects
    e. Info Cube Aggregates
    3. Transfer Rules u2013
    a. Application Components
    b. Communication Structure
    c. Data Source replica
    d. Info Packages
    e. Transfer Rules
    f. Transformations
    g. Info Source Transaction data
    h. Transfer Structure
    i. Data sources (Active version)
    j. Routines & BW Formulas used in the Transfer routines
    k. Extract Structures
    l. (Note) If the transfer structures and related objects are being transferred without preceding
    Base Objects transport (e.g. while fixing an error) it is safer to transport the related Info
    Objects as well.
    4. Update Rules u2013
    a. Update rules
    b. Routines and formulas used in Update rules
    c. DTPs
    5. Process Chains u2013
    a. Process Chains
    b. Process Chain Starter
    c. Process Variants
    d. Event u2013 Administration Chains
    6. Report Objects u2013
    a. Reports
    b. Report Objects
    c. Web Templates
    Regards,
    Suman

  • Can someone tell me how I load my music from my itunes account onto my new macbook pro??

    can someone tell me how to load my music from my itunes account on my iphone to my new macbook pro?

    See Here
    iTunes: How to move your music to a new computer

  • How to Load the data from excel file(Extension is .CSV) into the temp.table

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Hello Sachin,
    You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
    Instead of copy values into forms you can save them in your temporary table.
    Kind regards,
    Alex
    If someone's helpful or correct please mark it accordingly.

  • How to load the data from .csv file to oracle table???

    Hi,
    I am using oracle 10g , plsql developer. Can anyone help me in how to load the data from .csv file to oracle table. The table is already created with the required columns. The .csv file is having about 10lakh records. Is it possible to load 10lakh records. can any one please tell me how to proceed.
    Thanks in advance

    981145 wrote:
    Can you tell more about sql * loader??? how to know that utility is available for me or not??? I am using oracle 10g database and plsql developer???SQL*Loader is part of the Oracle client. If you have a developer installation you should normally have it on your client.
    the command is
    sqlldrType it and see if you have it installed.
    Have a look also at the FAQ link posted by Marwin.
    There are plenty of examples also on the web.
    Regards.
    Al

  • How to load the data from excel file into temprory table in Forms 11g?

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Declare
        v_full_filename         varchar2(500);
        v_server_path           varchar2(2000);
        v_separator             VARCHAR2(1);
        v_filename              VARCHAR2(400);
        filename                VARCHAR2 (100);
        v_stop_load             varchar2 (2000);
        v_rec_error_log         varchar2(4000);
        v_error_log             varchar2(4000);
        ctr                     NUMBER (12);
        cols                    NUMBER (2);
        btn                     number;
        RES                     BOOLEAN;   
        application             ole2.obj_type;
        workbooks               ole2.obj_type;
        workbook                ole2.obj_type;
        worksheets              ole2.obj_type;
        worksheet               ole2.obj_type;
        cell                    ole2.obj_type;
        cellType                ole2.OBJ_TYPE;
        args                    ole2.obj_type;
        PROCEDURE olearg
        IS
        args   ole2.obj_type;
        BEGIN
        args := ole2.create_arglist;
        ole2.add_arg (args, ctr);                                
        ole2.add_arg (args, cols);                                   
        cell := ole2.get_obj_property (worksheet, 'Cells', args);
        ole2.destroy_arglist (args);
        END;
    BEGIN
    v_full_filename := client_get_file_name(directory_name => null
                                     ,file_name      => null
                                     ,file_filter    => 'Excel  files (*.xls)|*.xls|'  
                                                                            ||'Excel  files (*.xlsx)|*.xlsx|'                                                                 
                                     ,message        => 'Choose Excel file'
                                     ,dialog_type    => null
                                     ,select_file    => null
    If v_full_filename is not null Then
    v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
    v_filename := v_separator||v_full_filename ;
    :LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);                                
    RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));     
    --Begin load data from EXCEL
    BEGIN
        filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
        application := ole2.create_obj ('Excel.Application');
        ole2.set_property (application, 'Visible', 'false');
        workbooks := ole2.get_obj_property (application, 'Workbooks');
        args := ole2.create_arglist;
        ole2.add_arg (args, filename); -- file path and name
        workbook := ole2.get_obj_property(workbooks,'Open',args);
        ole2.destroy_arglist (args);
        args := ole2.create_arglist;
        ole2.add_arg (args, 'Sheet1');
        worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
        ole2.destroy_arglist (args);
        ctr := 2;                                                     --row number
        cols := 1;                                                -- column number
        go_block('xxx');
        FIRST_RECORD;  
        LOOP       
                --Column 1 VALUE --------------------------------------------------------------------
            olearg;
            v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            :item1 := v_stop_load;
            cols := cols + 1;                                                      
              --Column 2 VALUE --------------------------------------------------------------------
            olearg;
            :item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            cols := cols + 1;
            --<and so on>
        ole2.invoke (application, 'Quit');
        ole2.RELEASE_OBJ (cell);
        ole2.RELEASE_OBJ (worksheet);
        ole2.RELEASE_OBJ (worksheets);
        ole2.RELEASE_OBJ (workbook);
        ole2.RELEASE_OBJ (workbooks);
        ole2.RELEASE_OBJ (application);
    END;
    --End load data from EXCELPlease mark it as answered if you helped.

  • How  to load the data from excel  file  into table in oracle using UTL_FI

    How to load the data from excel file into table in oracle
    and from table to excel file
    using UTL_FILE package
    Please give me some example

    This is something i tried in oracle apex
    http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
    Regards,
    CKLP

  • How to send an object from one application to another?

    Hi all,
    I have two applications over the same server. The first application needs to send an object to the other application.
    I try to put the object as a session attribute, but in the moment that the second application tries to get the attribute, the attribute doesn't exist.
    Does anybody now how can pass an object from the one application to the other?

    You can also use JMS

  • Initial down load of objects from R/3 to CRM

    Hi Experts,
    We are facing problem while we are doing initial download for the objects from R/3 to CRM. 1st 5 objects showing running(yellow) remaining all are showing waiting(red) in R3AM1.We maintained all the settings. Let me know anything we missed in this please!
    Please provide Middleware settings for down load the objects from R/3 to CRM.
    Thanks in Advance
    RAMESH

    Hi Rajesh,
    Please check for those running objects whether there are any "Parent Objects". You open that adapter object which is in "Running" state and there is a tab called "parent objects". Please check whether there are any objects present there. If there are objects present there then those needs to be run first before running the current object.
    Regarding the objects in "waiting" state the reason is because the parameter MAX_PARALLEL_PROCESSES in the table SMOFPARSFA is set to a small value I believe.Increase the value to 99 and then again try the loading of objects.
    This parameter MAX_PARALLEL_PROCESSES  indicates the total number of loads that can be done at a time.
    Thanks
    Abishek

  • How to load the data from informatica into bw & how to report the data

    Hi friends,
    how to load the data from informatica into bw & how to report the data
    using cognos.(i.e how to access the data in sap bw using cognos 8 BI suite).
    Thanks,
    madhu.

    Inorder to report BW data into Cognos you can extract data from using Open Hub to the DB table from which Cognos reads.
    For BW informatic integration refer following docs:
    http://www.aman.co.il/aman/pfd/DataInteg_BR.q103cd.pdf.pdf
    http://h71028.www7.hp.com/enterprise/cache/3889-0-0-225-121.html
    http://devnet.informatica.com/learning/ePresentations.asp
    http://72.14.203.104/search?q=cache:C741L86Q19oJ:devnet.informatica.com/showcase/resources/Essbase_DataSheet.pdfinformaticapowerconnect(BI)&hl=en&gl=in&ct=clnk&cd=3
    http://www.informatica.com/customers/utilities_energy/fpl_group.htm
    http://www.informatica.com/solutions/resource_center/technote_sapbw_65241004.pdf#search=%22Informatica%20to%20Bw%22

  • How to load master data from SAP R/3 system like Customer master...........

    How to load master data from SAP R/3 system like Customer master, materioal master , vendor master.............

    Hi Bramha,
            Check ...........
    Re: master data loading in BI 7.0
    /message/4708129#4708129 [original link is broken]
    Re: Master data loading.
    Regards,
    Vijay.

  • How to load java class from jsp page?

    hi all!
    Does anyone know how to load java class from jsp page?
    I try to load java class from jsp page.
    Is it possible to load java class fom jsp page?
    thanks and have a good day!

    What I mean is How to load/open java class file from jsp page?
    I think we can open Applet from jsp page by using
    <applet code=helloApplet.class width=100 height=100>
    </applet>
    but, how to open java class which is an application made by Frame?
    thanks and have a good day

Maybe you are looking for

  • Print pay-slip on double-sided

    Hello, We would like to print pay-slip on both side mode (we use ABAP list with report RPCEDTF0). The print is Ok but the problem is that, on the same page, there are pay data for an employee on the side and pay data for an other employee on the othe

  • Unable to find sound file

    I am having trouble getting a wav file to play back at the click of a button. I keep getting an exception error saying the system cannot find the file, however the Win1.wav file is in the default directory. Perhaps there is a problem with my code. Ca

  • Creating a small "o" with a dash over it??

    I'm using IDCS2 on a PC and need to know how to create a small "o" with a horizontal dash over the "o". I'm doing a story for a product named Zon that has a dash over the "o" so it's pronounced Zone. I have a character reference chart for Windows usi

  • How to integrate sap bw and sap pi system

    Hi all,   I am doing interface to integrate SAP BW and SAP PI syetms .here i want to send data from SAP BW infocube to pi after that i need to send the data sap apo system.sap bw and sap pi intergration part is pending so how integrate these two syst

  • Sort - not columns - but rows in 3.01

    How to sort - not columns - but rows - in 3.01?