Displaying an array of movieclips

hello
I am trying to create an array of several movieclips (they
are actually just one frame graphics) that will display only one
movieclip at any given time depending on a counter value.
I setup an array with movie clip names in quotes
var ChlogoAr:Array = new
array("sixties","fifties","forties");
The only way i know how to make this work is to palce all the
movieclips on the stage, but outside the document area, then change
the ._y value of the one I want displayed
ie.
ChlogoAr[2]._y = 40;
but actually, that doesnt work. Is there a way to accomplish
this? Ideally, I would want to setup a placement holder and then
display whichever movieclip that matched up with the counter. thank
you for any advice.

you can use a dynamic textfield to allow users to type a
movieclip _name or part of a movieclip name which you then use to
reference a movieclip. again, you would use the array operator to
help flash resolve a string to an object (like a movieclip).

Similar Messages

  • Display color array then 1 second later display same array with color change

    Hi there, I'm new to LabVIEW and this is my first post. I'm using LabVIEW 9.0.1
    Please have a look at this simple program attached below; when I've worked out this part of the program, it will be the starting up sequence of a game
    the lights need to be set to white before running the program.. When the program runs the hexadecimal 'array 2' is projected as colors on 'array'. Then 1 second later, a green light is added to the centre and displayed in 'array 4'...
    I am attempting to have the green light go on on the same array after 1 second. As opposed to on array 4...
    When I've figured out how to do this I'll add many more time iterations, whereby a color is changed on each one. Thus making a nice startup sequence.
    any help is appreciated, thanks in advance for your help!
    p.s. add 00FF0000 to the last box in 'array 2' before you hit play.
    Attachments:
    attempt 1.vi ‏10 KB

    I think you should learn about shift registers.
    Your larger program will probably work better and be easier to modify and maintain if you use a state machine in place of the sequence structure.
    Lynn

  • I need to display an array of doubles on a table and I am loosing my percision

    Hello,
    I need to display an array of doubles on a table but I am losing my decimal precision. I am converting the array to a string in order to display it on the table with a number to decimal function. This is where I lose my precision since that control converts the double into an integer and then into the string. What control do I need to use instead of that in order to preserve my decimal precision all the way to the table? I have attached my VI. Thanks in advance!
    Gregory Osenbach, CLA
    Fluke
    Attachments:
    canalyzer_prototype_1.vi ‏52 KB

    Thank you both for the quick response. Its just the info I needed!
    Gregory Osenbach, CLA
    Fluke

  • Functions to read and display an array of integers

    Hi guys,
    I am trying to implement with a class called Sort a function to read in an array of integers from a file and a function to display that array.
    public class Sort
         public static int[] read(String file) throws IOException
            /* Create Reader object to read contents of file */
            BufferedReader br = new BufferedReader(new FileReader(file));
            /* Read file and store lines in ArrayList */
            ArrayList<Integer> list = new ArrayList<Integer>();
            /* Variable */
            String in;
            /* While not equal to null reads data from file */
            while ((in = br.readLine()) != null)
                /* Adds data from file to ArrayList */
                list.add(Integer.parseInt(in));
            /* Converts ArrayList into an array */
            int[] array = new int[list.size()];
            for(int i = 0; i < list.size(); i++)
                /* Get array elements */
                array[i] = list.get(i);
            /* Returns array */
            return array;
        public int display()
            for (int i = 0; i < list.size(); i++)
                System.out.println(list.get(i));
    }I am having one of those moments when you forget everything, I need help with display the array in a seperate function, will someone help me please?
    Thanks!

    I know that its just implementing it.
    I have:
    public void display()
            for(int i = 0; i < array.length; i++)
                System.out.println(array);
    But I'm lost on how to make this work, i.e it says "cannot find array variable". I've not done Java for a while and feel like I have forgot everything!
    Edited by: mbruce10 on Nov 15, 2009 1:31 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Access XML array inside MovieClip. How ?!

    Hello,
    Ok, I have a code to load Multiple XML files at once and save it to an array named xmlDocs like this:
    //each xml file to load
    var xmlManifest:Array = new Array();
    //the xml for each file
    var xmlDocs:Array = new Array();
    //the xml file with all the xml files to be loaded.
    var RSSWidgetRequest:URLRequest = new URLRequest("xml/rss-widget.xml");
    var urlLoader:URLLoader = new URLLoader();
    var docsXML:XML = new XML();
    docsXML.ignoreWhitespace = true;
    //when COMPLETE is loaded run function loadDocs
    urlLoader.addEventListener(Event.COMPLETE,loadDocs);
    urlLoader.load(RSSWidgetRequest);
    //load the docs
    function loadDocs(event:Event):void {
    docsXML = XML(event.target.data);
    //m21m is the name space defined in my doc m21m:feed... you don't need one.
    var m21m:Namespace=docsXML.namespace("m21m");
    //get all the feed nodes
    var feeds=docsXML..m21m::feed;
    for (var i:int=0; i < feeds.length(); ++i) {
      //add the feed to the xmlManifest array
      xmlManifest[xmlManifest.length] = feeds[i].attribute("feed");
    //load the xml for each doc
    loadXMLDocs();
    //load all the XML files
    function loadXMLDocs() {
    if (xmlManifest.length>xmlDocs.length) {
      var RSSURL:URLRequest = new URLRequest(xmlManifest[xmlDocs.length]);
      var urlLoader:URLLoader = new URLLoader();
      var xmlDoc:XML = new XML();
      xmlDoc.ignoreWhitespace = true;
      urlLoader.addEventListener(Event.COMPLETE,getDoc);
      urlLoader.load(RSSURL);
      function getDoc(event:Event) {
       xmlDoc = XML(event.target.data);
       //hold all the xml of each doc in an array
       xmlDocs[xmlDocs.length] = xmlDoc;
       loadXMLDocs();
    } else {
      trace(xmlDocs)
      //do something when all xml is loaded
    How i can access xmlDocs array difinte on main timeline from insted MovieClip...?!
    Regards,

    It does not work. I used this code to display the data:
    var xmlList:XMLList;
    var xmlData:XML = new XML(MovieClip(this.parent.parent).xmlDocs[0].data);
    xmlList = xmlData.class10;
    sId10_btn.addEventListener(MouseEvent.CLICK, displayData);
    function displayData(evt:MouseEvent):void
              for each (var grade:XML in xmlList)
                        if (myTextField.text == grade.st_id.text())
                                  content10.sName10.text = grade.st_name;
                                  content10.sQuran10.text = grade.quran;
                                  content10.sIslamic10.text = grade.islamic;
                                  content10.sArabic10.text = grade.arabic;
                                  content10.sEnglish10.text = grade.english;
                                  content10.sMath10.text = grade.math;
                                  content10.sChemistry10.text = grade.chemistry;
                                  content10.sPhysics10.text = grade.physics;
                                  content10.sBiology10.text = grade.biology;
                                  content10.sSocial10.text = grade.social;
                                  content10.sSport10.text = grade.sport;
                                  content10.sComputer10.text = grade.computer;
                                  content10.sNesba10.text = roundNumber(Number(grade.nesba), 2);

  • Display 2D array in a table, 1 row at a time

    I am using a For Loop to read a serial port 40 times and display the values in a table of 40 rows and 5 columns.  I auto index the output of the For Loop to build the 2D string array. The problem is that the serial port takes too long to answer and the VI takes about two minutes to display the values in the table because it doesn't do it until the For Loop finish its 40 iterations. Is it possible to display each iteration as it executes? I mean, to pass the value of the 1st iteration to the 1st row of the table and then do the 2nd iteration, pass its value to the 2nd row of the table and so on? Thanks a lot! (Merry Christmas to the ones that celebrate it)
    Solved!
    Go to Solution.

    Hello Farracillo,
    Your welcome,
    It's pretty cool to have backup if an answer mach correctly for a problem and so
    others members don't have to work on , i mean for more complexes questions
    and ever even more cool to give/receive kudos to keep up motivation ...
     see you for others questions...
    @+
    Tinnitus
    Message Edité par tinnitus le 12-26-2008 09:33 AM
    CLAD / Labview 2011, Win Xp
    Mission d'une semaine- à plusieurs mois laissez moi un MP...
    RP et Midi-pyrénées .Km+++ si possibilité de télétravail
    Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
    Don't forget to valid a good answer / pensez à valider une réponse correcte

  • Displaying byte array PDF file in Portal

    Hi,
    i need to display a PDF file. The PDF is stored in a byte array. This works fine when i run my code (see below) from the .jpf via the debugger/browser, but when i use it as a portlet, in the portal, it does not work ?
    Any help is much appreciated.
    Thanks
    Mark
    byte[] pdfDocument = docStore.getPDF();
    ServletOutputStream outPdf = response.getOutputStream();
    response.setContentType("application/pdf");
    outPdf.write(pdfDocument);
    outPdf.flush();
    outPdf.close();

    Mark,
    Note that the portal sets the content type (e.g, text/html) and encoding
    as the portal page starts rendering. In your case, the
    setContentType() would be useless since the servlet container won't let
    you change it. You can either use a popup browser window for the pdf as
    Kunal suggested, or use an iframe if you want to render the pdf inside
    the portlet window.
    Subbu
    Mark Gilleece wrote:
    Hi,
    i need to display a PDF file. The PDF is stored in a byte array. This works fine when i run my code (see below) from the .jpf via the debugger/browser, but when i use it as a portlet, in the portal, it does not work ?
    Any help is much appreciated.
    Thanks
    Mark
    byte[] pdfDocument = docStore.getPDF();
    ServletOutputStream outPdf = response.getOutputStream();
    response.setContentType("application/pdf");
    outPdf.write(pdfDocument);
    outPdf.flush();
    outPdf.close();

  • Displaying Byte Array images in coldfusion

    This has been driving me crazy for a couple of days now.I
    have a Java class that returns pictures stored in a DB as a Byte
    Array.
    I am able to display the image but that is all i am able to
    do - I want to display the image name, description etc in a HTML
    before i display the actual image but i can't seem to find a way to
    do that.
    I tried using CFcontent as well and that did not help
    either.This is what i am currently doing - and all that displays on
    the screen is the picture and all content before the picture is
    nowhere to be seen.
    Picture Name: #variables.picName#
    Picture Description:#variables.picDescription#
    <cfscript>
    context = getPageContext();
    response = context.getResponse().getResponse();
    out = response.getOutputStream();
    response.setContentType("image/jpeg");
    response.setContentLength(arrayLen(session.picture));
    out.write(session.picture);
    out.flush();
    out.close();
    </cfscript>
    Any help will be greatly appreciated.

    Mark,
    Note that the portal sets the content type (e.g, text/html) and encoding
    as the portal page starts rendering. In your case, the
    setContentType() would be useless since the servlet container won't let
    you change it. You can either use a popup browser window for the pdf as
    Kunal suggested, or use an iframe if you want to render the pdf inside
    the portlet window.
    Subbu
    Mark Gilleece wrote:
    Hi,
    i need to display a PDF file. The PDF is stored in a byte array. This works fine when i run my code (see below) from the .jpf via the debugger/browser, but when i use it as a portlet, in the portal, it does not work ?
    Any help is much appreciated.
    Thanks
    Mark
    byte[] pdfDocument = docStore.getPDF();
    ServletOutputStream outPdf = response.getOutputStream();
    response.setContentType("application/pdf");
    outPdf.write(pdfDocument);
    outPdf.flush();
    outPdf.close();

  • Display byte array image or ole object in Section through dynamic code?

    To Start I am a Complete Newbe to Crystal Reports. I have taken over a project originally written in VS2003 asp.net using SQL Server 2005 and older version of Crytal Reports. I have moved project to VS2010 and Cryatal Reports 10 still using SQL Server 2005. Have multiple reports (14 to be exact) that display data currently being pulled from database suing a dataset, each report has from 4 to 14 Sections. I have modified database table with two new fields. Field1 contains string data with full path to a scanned document (pdf or jpeg). Field2 holds a byte array of the actual image of the scanned document. I have tested the database and it does infact contain the byte array and can display the image via VB.net code. I can make the report display the scanned image using ole object.
    Now my real question: I need to add a new Section and it should display either the byte array of the scanned image or the actual scanned image (pdf or jpeg) . How can I have it do either of these options via code dynamicly while application is running?

    First; only CRVS2010 is supported on VS2010. You can download CRVS2010 from here;
    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads
    Developer Help files are here:
    Report Application Server .NET API Guide http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/xi4_rassdk_net_api_en.zip
    Report Application Server .NET SDK Developer Guide http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/xi4_rassdk_net_dg_en.zip
    SAP Crystal Reports .NET API Guide http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_api_2010_en.zip
    SAP Crystal Reports .NET SDK Developer Guide http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_dg_2010_en.zip
    To add the images, you have a number of options re. how to. You even have two SDKs that y ou can use (RAS and CR).
    Perhaps the best place to start is with KB [1296803 - How to add an image to a report using the Crystal Reports .NET InProc RAS SDK|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233393336333833303333%7D.do]. The KB describes how to add images to a report using the InProc RAS SDK, but also references other KBs that use CR SDK.
    Also, don't forget to use the search box in the top right corner of this web page.
    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]

  • Display byte array of jpeg  in jsp

    I have a byte array of jpeg image in my jsp. Now I want to display it in my image. I tried but i could not see the image but a red mark image is comming on the screeen
    Please help me out. I deadly help need ASAP. Thanks in advance.
    this is how i tried
    response.setContentType("image/jpeg");
    ServletOutputStream os = response.getOutputStream();
    // i get byte array from loDocumentDVO.getFileContents():
    byte[] fileContent = loDocumentDVO.getFileContents();
    os.write(fileContent);
    os.flush();

    Thank you for your sharp words.
    I have now compiled the ImageServlet I have adapted slightly from http://balusc.xs4all.nl/srv/dev-jep-img.html
    I am trying to run it with
    <html>
    <body>
    <img src="image?file=plan.jpg" alt="Plan" />
    </body>
    </html>
    but all that is displayed is the word Plan.
    My servlet has been compiled and put into webapps\test\classes\example directory.
    My web.xml contains
    <servlet>
    <servlet-name>ImageServlet</servlet-name>
    <servlet-class>example.ImageServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ImageServlet</servlet-name>
    <url-pattern>/image/*</url-pattern>
    </servlet-mapping>
    The servlet code is
    package example;
    import java.io.*;
    import java.net.URLConnection;
    import javax.servlet.*;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class ImageServlet extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
            String imageFilePath = getServletContext().getRealPath("/WEB-INF/images");
            // Get file name from request.
            String imageFileName = request.getParameter("file");
         System.out.println("Path: "+imageFilePath+" Name: "+imageFileName);
            // Check if file name is supplied to the request.
            if (imageFileName != null) {
                // Strip "../" and "..\" (avoid directory sniffing by hackers!).
                imageFileName = imageFileName.replaceAll("\\.+(\\\\|/)", "");
            } else {
                return;
            // Prepare file object.
            File imageFile = new File(imageFilePath, imageFileName);
            // Check if file actually exists in filesystem.
            if (!imageFile.exists()) {
                return;
            // Get content type by filename.
            String contentType = URLConnection.guessContentTypeFromName(imageFileName);
            // Check if file is actually an image (avoid download of other files by hackers!).
            // For all content types, see: http://www.w3schools.com/media/media_mimeref.asp
            if (contentType == null || !contentType.startsWith("image")) {
                return;
            // Prepare streams.
            BufferedInputStream input = null;
            BufferedOutputStream output = null;
            try {
                // Open image file.
                input = new BufferedInputStream(new FileInputStream(imageFile));
                int contentLength = input.available();
                // Init servlet response.
                response.reset();
                response.setContentLength(contentLength);
                response.setContentType(contentType);
                response.setHeader(
                    "Content-disposition", "inline; filename=\"" + imageFileName + "\"");
                output = new BufferedOutputStream(response.getOutputStream());
                // Write file contents to response.
                while (contentLength-- > 0) {
                    output.write(input.read());
                // Finalize task.
                output.flush();
            } catch (IOException e) {
                // Something went wrong?
                e.printStackTrace();
            } finally {
                // Gently close streams.
                if (input != null) {
                    try {
                        input.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                        // This is a serious error. Do more than just printing a trace.
                if (output != null) {
                    try {
                        output.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                        // This is a serious error. Do more than just printing a trace.
    }The servlet isn't being called - nothing is output to my server log file. Changing the name of my servlet doesn't change the result.
    I can't see why the servlet isn't being called.
    I have built another simple servlet that does work so I know my server is OK.
    Any suggestions?
    Thanks,
    David

  • Reading in a binary file and displaying an array correctly

    I am teaching myself Labview 7.1 and what I am trying to do is read in a text file of binary digits 10011001, 11011101 etc and then output these to a series of leds (boolean array) as well as to another array to display what was read in. I can get this to happen when I format the text file as 1,0,0,1,1,0,0,1 but then the array is 1 column by 8 rows (is this a 1by8 array) I want to read this data in as 10011001 displayed on 1 row and then the next row of the array to be 11011101, it displays 11111111 if I go above 3 digits, I know this is just a problem with binary versus decimal numbers, how can I format the input file so it is read in as 8-bit binary?
    Thank you in advance,
    Dan Ziehm

    Read the text file as string, then pass it through "spreadsheet string to array" with "," as delimiter, %b as format and an U8 array as type. I made a quick demo, see attached code image.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    binaries.gif ‏45 KB

  • How to display an Array in a Tree

    Hi everyone !
    i have an Array of simple objects filled from my DB, and i
    want to display it in a tree <mx:Tree>
    do i have to convert the Array into a XMLList first of all?
    and how???
    if not, please anyone can help realising this ???
    thank you ! :D

    Your array will need to be objects so you can tell the tree
    what children fields are. From the FB help sys:

  • How to Display string array in jsp page using netui-data:repeater tag ??

    hi,
    I am trying to display a string array in a table using the netui-data:repeater tag.
    I have to use a page flow controller Array(1 Dimensional) to be displayed in the jsp.
    Can any one tell me how to print the array in a table of 3rows & 5 columns.
    Here is the code on which I am crrently working on.
    <netui-data:repeater dataSource="{pageFlow.strWorkObject_Array}">
    <netui-data:repeaterHeader>
    <table cellpadding="4" border="1" class="tablebody">
    </netui-data:repeaterHeader>
    <netui-data:repeaterItem>
    <tr>
    <td><netui:label value="{container.item}" >
    </netui:label></td>
    <td><netui:label value="{container.item}">
    </netui:label></td>
    <td><netui:label value="{container.item}">
    </netui:label></td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter>
    </table>
    </netui-data:repeaterFooter>
    </netui-data:repeater>

    weblogic.developer.interest.workshop
    Mansoor Naseem wrote:
    I would like to know where the pageflow newsgroup is.
    These are all the groups in weblogic.developer.interest:
    weblogic.developer.interest.60beta.* (5 groups) weblogic.developer.interest.management
    weblogic.developer.interest.61beta.* (2 groups) weblogic.developer.interest.misc
    weblogic.developer.interest.clustering.* (1 group) weblogic.developer.interest.performance
    weblogic.developer.interest.commerce weblogic.developer.interest.personalization
    weblogic.developer.interest.ejb.* (3 groups) weblogic.developer.interest.portal
    weblogic.developer.interest.environment weblogic.developer.interest.rmi-iiop
    weblogic.developer.interest.jdbc weblogic.developer.interest.security
    weblogic.developer.interest.jms weblogic.developer.interest.servlet
    weblogic.developer.interest.jndi weblogic.developer.interest.tools
    weblogic.developer.interest.jsp weblogic.developer.interest.weblogicenterprise
    MN

  • How to display an array in a VB form

    I am new to Measurement Studio. This could be a silly question.
    I am so used to the front panel in Labview where you can have control/indicator arrays. You can expand an array to see several values at the same time. Plus you have an index display to scroll.
    Is there any similar feature in Measurement Studio for Visual Basic or Visual C? If not, why not.
    cheers

    No, there isn't currently a tabular or array control provided with Measurement Studio. There are a few reasons for this. First off, remember, LabVIEW is a graphical language, there isn't anything that isn't a control or indicator on a front panel. The array control in LabVIEW is mainly there as the datatype for arrays, not specifically as a UI object, although it is frequently used that way.
    In Measurement Studio, the focus of the User Interface components is adding the controls to Visual Studio that are needed for test and measurement applications. Visual Studio comes with a tabular type interface called the DataGrid control for displaying numeric and string data in a table format built-in. This is what you would want to use to display arrays. We
    would definately consider adding a table type interface if our users needed a lot more functionality than was provided by the Visual Studio DataGrid control.
    I know it can be frustrating going back and forth between the tools and seeing different things available. Remember, they are designed for different users though. Measurement Studio is designed to equip Visual Studio programmers to do Test & Measurement programming easily, it isn't designed to provide LabVIEW type functionality to Visual Studio users. So some LabVIEW functionality won't exist in Measurement Studio purposefully, and also some functionality in Measurement Studio that isn't in LabVIEW since it doesn't suit graphical programming.
    Try the DataGrid control, and let us know if it doesn't meet your needs.
    Best Regards,
    Chris Matthews
    National Instruments

  • Problem in displaying 2D array in JSF

    Hi All,
    Thanks to all for your previous valuable suggestions. Currently i got stucked with a problem. I need to display a two dimensional array in my JSF page and we r using JSF 1.1.
    I have the following 2D String array in my backing bean
    private String[][] sreDesc = new String[6][3];
    I need to display them in UI. Any help will be highly appreciated.
    Thanks
    V Krishna

    Your Q is not very clear, do you ask about only accessing 2D array ?
    There is a topic about using arrays in your EL, it shows you how to access the elements of 2d array easily using the dot notation.

Maybe you are looking for

  • IMac G3 Gray screen w/logo & Spinning Progress Wheel only!

    When turning on my iMac G3 DV SE 400, Slot-Load, Graphite (1999-10), OS 10.3 (Panther), it only goes as far as a gray screen with the Apple logo and the spinning wheel (gear) (Progress wheel) below the logo, and that's it. I've started up in Target M

  • Item Category and MRP type for material is not allowed

    Hello all, I got a Error Message: <b>Transaction Z113 is not defined (Message no. V1347)</b> <b>Diagnosis</b> This combination of item category Z113 and MRP type for material is not allowed. <b>System response</b> The system does not allow further pr

  • Pdf not loading correctly from Safari

    I am having great difficulty, and others it seems, in downloading pdfs. I have a downloadable brochure for school classes as a pdf file, which works in other browsers, but not Safari. Pdf downloads worked fine in Jaguar but not Tiger. The pdf opens i

  • Exclude Vendors with Zero Balance from Payment Wizard

    Hello, When running the Payment Wizard for outgoing payments, there is no way to exclude vendors whose account balance is zero.  I have tried using a default minimum payment of $.01 to no avail.  I have reported to SAP Support, and it is not function

  • How do I import pdf(lecture slides) into onenote?

    How do I import pdf(lecture slides) into onenote? cant figure out how to do it, saw a windows youtube video and you go into the pdf and click print, than print to onenote but there is no option on mca any tips/ways to get around this? cheers also the