In need of an expert: OpenGL and drawing simple textures

Hello,
Is anyone knowledgeable about loading sprites with an alpha channel?
This is the code I am using to load my sprites. The image files were png files with an alpha channel(parts where you can see through the image). But when loading it the parts that are supposed to be invisible turn out to be black.
I have searched far and wide across the internet and what a surprise I only see solutions for mobile phones other than the iphone! It would be great help to the iphone community if someone can be kind enough to point out what it is thats supposed to be done to get this to work.
{CODE}
myTexture = Texture2D alloc initWithData:data bytes pixelFormat:kTexture2DPixelFormatRGBAPVRTC4 pixelsWide:512 pixelsHigh:512 contentSize:CGSizeMake(512,512);
{CODE}
then running the following in drawView:
{CODE}
myTexture drawAtPoint:CGPointMake(0,0);
{CODE}
the result is the texture showing correctly except the invisible parts turn out black. Perhaps I have to set something in the drawView? Please If anyone out there can help.
Message was edited by: Darpachief

You may need to enable alpha blending systemwide, e.g. glEnable (GL_BLEND), as well as glBlendFunc(), glAlphaFunc(), etc.

Similar Messages

  • Urgent help needed!! Layout table and Draw layout cell dissapeared.

    I need some urgent help. I'm using CS3 but for a while my
    Layout Table and Draw Layout Cell icons appear greyed and can't use
    them at all. Is there any kind soul out there who knows how to fix
    this? I'm going nuts trying all the possible options but none seem
    to work.
    Help please!!!!!!

    > How would you about designing a page without using html?
    You don't. But I don't recall suggesting that you not use
    HTML. I just
    suggested that you use best-practice HTML, no? Or maybe you
    meant to ask
    how you would go about building your site without learning
    HTML? In that
    case, I think you are outta luck. Using DW without knowing
    HTML is a very
    punishing experience, I'm afraid.
    > PS: A virtual box of 12 bottles of Moet Chandon is
    already on your way!!
    I'd prefer Cristal, please.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Untersberg" <[email protected]> wrote in
    message
    news:g4tj9a$m5o$[email protected]..
    > Ahhhhhh!!!!! They came up!!!! They came up again!!
    > I was on standard mode. Now going back to your
    suggestion, which I really
    > appreciate. How would you about designing a page without
    using html? I'm
    > just
    > redesigning my website at the moment and need it to get
    going urgently,
    > hence
    > the reluctance to start learning HTML at the moment.
    I'll do after but I
    > need
    > to get this up and running fairly quickly.
    >
    > Cheers.
    >
    > PS: A virtual box of 12 bottles of Moet Chandon is
    already on your way!!
    >

  • IdeaPad G780 OpenGL and PixelShader versions needed

    Hi,
    I am currently looking to buy a replacement laptop, and the model I am interested in is the IdeaPad G780, M843KUK, Windows 7 (I absolutely do not want Windows 8).
    A distributor has a number of suitable machines at a decent price, but before committing to buy one of those I absolutely need to know the OpenGL and Pixel Shader versions currently supported.
    Those depend both from the GPUs (which define the absolute maximum possible, through their capabilities), and from the drivers, which define the actual maximum; Pixel Shader version is also limited by DirectX version, but OpenGL has no connection with DirectX.
    That information is unknown to the distributors, unavailable on the website, and equally unknown to the assisted help on this website.
    OpenGL version and/or Pixel Shader are critical requirements for most graphical applications, including games, and the new and future browser versions (due to HTML 5 and WebGL).
    So, could anyone here provide me that information on that precise model?
    There are technical tools which allow to find those values, for the machine the test is run on.

    It has been a few days and nobody was answering the question...
    That gave me the time to see that there are so many issues with Lenovo products, and existing customers are left without any support answers (most posts here seen to get no answer from Lenovo, or report issues which don't).
    So I will just add Lenovo to the list of low quality brands I want nothing to do with; obviously support went to hell since IBM sold their former PCs branch a few years ago, and it went its own way under the name Lenovo,

  • Opengl and labview

    Does anyone have a way to use opengl applications in labview? I have seen interfaces out there, but they are pretty expensive. Anyone done this yet?????

    Hi,
    I tried it, and it does work. It is a nice example of creating a opengl
    wrapper in c++. However, the only function it provides is to draw a text (in
    3D). The source is available, so it could be extended...
    Perhaps the best way to work with it is to adjust it to export the hWnd.
    With the hWnd, you can use all other opengl functions as normal api's. You
    need to set the opengl rendering context to the hWnd from labview, because
    it must be set from the same proccess that calls the api's (I think the ocx
    has it's own proccess).
    May be there are some more advanced wrappers (I stopped looking after the
    first).
    Regards,
    Wiebe.
    "Wiebe@CARYA" wrote in message
    news:4062a1ed@newsgroups....
    > Hi,
    >
    > Sorry for the slow reaction. I'm watching messages in outlook, but it
    > deletes messages automatically after a few month, and also stops watching
    > them.
    >
    > There seems to be an open source activex opengl wrapper at
    > http://www.codeproject.com . Just search for opengl and activex. You do
    need
    > to register, but it is free. This is the first page I looked at after
    > searching the web on opengl and activex. It looks promising...
    >
    > Regards,
    >
    > Wiebe.
    >
    >
    > "dirtyb15" wrote in message
    > news:[email protected]..
    > > All right, took a little time off from this project, but need to start
    > > again. You said to use and ativex container. What direct x object
    > > should i put in the container??
    >
    >

  • Read .txt file of numbers and draw

    Hello.
    I am trying to utlize BufferedReader and g.drawline to read numbers from a text file and output to the screen as a "line".
    I know I still need a while loop and some error checking, but, am having trouble finishing the more 'basic' portion of the code.
    The GUI class is already taken care of. I am just trying to open the file, read, turn to int, produce lines, then close file.
    I have commented out some of the code that was provided with the assignment.
    Any help would be appreciated.
    Thank you.
    import javax.swing.*;
    import java.awt.*;
    * DrawingPanel creates a panel used for drawing
    * a map
    * Numbers stored in text file, usa.txt.
    * one number per line.  Read each number
    * create a map on screen. GUI provided in a
    * 2nd class.
    public class DrawingPanel extends JPanel {
         /** Graphics object used for drawing on the panel */                           
         private Graphics g;                  
         /** Tells if it is time to draw */
         private boolean timeToDrawPath;
         /** The filename of the hurricane path */
                                  //private String pathFile; 
         private String usa.txt;
         * Creates a new, white DrawingPanel for drawing the maps
         public DrawingPanel() {
              setBackground(Color.white);
              this.timeToDrawPath = false;
                                  //this.pathFile = null;
              this.usa.txt = null;
         * This method is called automatically by Java.  There will NEVER
         * be a direct call to paint() anywhere in the code.  Anytime that we
         * need to update what is drawn on the screen, we call repaint().
         * @param grph The graphics window to paint
         public void paint(Graphics grph) {
              g = grph;
              super.paint(g);
              processUSA();
              if (timeToDrawPath){
                   drawPath();
         * Reads the USA coastline coordinates from a file and draws the path
         * to the panel
         public void processUSA( ) {
                        //just an example of how to draw a single
                        //line segment from (50,50) to (200,200)
                        //g.drawLine( 300, 50, 200, 200);
         //Insert the while loop here??
         //Include the parse.Int statement
         //Open the file
         String inFile = ("usa.txt");
         FileReader fileReader = new FileReader (inFile);
                   //BufferedReader bufReader = newBufferedReader (fileReader);
         BufferedReader bufReader=newBufferedReader (new fileReader ("usa.txt"));
                        //Insert beginning of while loop here????
         //read data from the file
         String str=bufReader.readLine();
         g.drawLine(x1,y1,x2,y2);
         }

    Yep, you are right in deciding the positioning of the while loop.
    But the folly you are committing is while creating object of BufferedReader ... It is to be created by passing to the constructor, the reference of the FileReader object you have created.
    so the line of code shud look like ...
    BufferedReader bufReader = new BufferedReader(FileReaderObject);
    And then you can go ahead with readLine() as per your requirement in the while loop.

  • I need a MacBook experts, master to help me!!! I just tried the craziest move on my mac! My dad's gonna kill me if he finds out!!!

    I need a MacBook experts, master to help me!!! I just tried the craziest series of moves on my mac.
    Begun when the mac hung for nearly an hour. I held the power key to force a shut off.
    This made me think of erasing some things on my hard drive. I used cmd r for disk utility and begun erasing volumes.
    Then, I thought instead, why not just reinstall OSX since nothing I wanted was on it.
    I tried to reinstall OSX but this time it loaded then suddenly said, an error occurred.
    I Went back to disk utility and cleared stuff I can't even remember.
    Another unbelievable thing happened. The disk utility actually hung for a good ten minutes! i went and forced a shut off again.
    Now, whenever I turn the mac on, a flashing folder appears.
    at this point, I usually turn to the net for answers.
    Greatest thing is, every cmd something I try doesn't even trigger a reaction. Only cmd opt showed my mouse cursor.
    i Do not have the original OSX install disk for my mac. Any geniuses got any clues???

    Your post somehow found its way to a low-traffic forum about technical issues with posting in Apple Support Communities. I have asked the Hosts to move you to a more appropriate hardware forum for your product.

  • Asynchronous, but need Ack without using BPM and IDocs.

    Hi Experts,
                     I would like to do a scenario i.e., "Asynchronous communication, but need Acknowledgement without using BPM and also without using IDocs whether it is sender side or receiver side". Please help me.
    Thanks in advance
    Srihari.

    Without using BPM will be little longer process. But the alternative way is to add one more receiver in the receiver determination and send some file to that location with the actual mapping getting executed for the actual receiver. and in the second interface you can get the file created at second receiver back to the source location. But this will be little long as compared to synchronous scenarios.
    Flow:
    Source
              Receiver 1--> Actual mapping as per requirement
              Receiver 2(For Ack)--> Create a mapping with blank file sent to Receiver
    Receiver 2-->File Adapter--> Source through 2nd mapping/interface and keep the File adapter pooling interval around 5 sec or less so that you can get the file back to source location.
    Regards
    Anand

  • What are your preferred word processing and drawing apps?

    I currently use LibreOffice for most purposes, because it has both word processing and drawing software built-in, because it can read many file formats, without as much trouble as most other office suites. Unfortunately, while it can import AppleWorks word-processing documents, it can't import drawings, spreadsheets, etc., and while it can import older Word word-processing documents, it tends to corrupt the tables, the fancier quotes, etc. Also unfortunately, it does not work well with speech-to-text/dictation, not that dictation works well. Also unfortunately, it sometimes screws up imported images.
    I try to minimize formatting to avoid that in the future.
    I used to use Appleworks for most purposes, but it isn't supported anymore.
    I tried TextEdit, but it doesn't allow me to save different versions of the same document, or a new document based on an old document, it screws with page margins, and it doesn't have drawing software. I used to use Word, and at one point used Pages, but there are all sorts of issues with their file formats and incompatibilities between different versions.
    I would like a functional but not excessively fancy word-processing and drawing tool, and either as part of that, or in addition to that, a suitable version comparison tool. I draw a lot of maps, so the drawing program has to respect scale, and I have coordination problems, so it has to make it easy to put the right object in the right place. I've had trouble with that in LibreOffice.
    So in general, what word processing and office suite software do you think works for your needs, or would work for my or other people's needs?

    http://itunes.apple.com/ca/app/pages/id361309726?mt=8
    http://itunes.apple.com/us/app/numbers/id361304891?mt=8
    http://itunes.apple.com/ca/app/documents-to-go-premium-office/id317107309?mt=8

  • OpenGL and GLX on Solaris Intel

    Can OpenGL and GLX be added to Solaris Intel without having to use Xfree86?
    I have built the Mesa libraries but still need the GLX extensions.
    Does any one know of an easy solution?

    Hi Senthilkumar,
    Thanks for reply!
    I found a couple of intel 10/100 network cards in our town, there are INTEL N232 10/100 PCI, INTEL PRO100+ 10/100 PCI, Intel 8460 10/100BT, I am not sure which one you were talking about, can you give me some detail information please?
    Thanks again.
    Mark

  • HTMLB or html - when we need full control of look and feel and events

    Hi Experts,
          In my requirement i  need to change the look and feel of the BSP UI as per customer standards and i need to have most of my processing on client side, Please advise me whether to go for HTMLB or normal HTML. mainly i fount most of the client side events are not available in HTMLB....
    Thanks in advance
    Karthik

    Hi Karthik,
    The look and feel of the BSP Tags can be applied via Portal. If you are seeing your BSP application through a protal system, then you can develop a theme inside the portal and apply it to your BSP application. The portal theme will be automatically supported by the HTMLB tags. For more infomation on this you can search in the portal forum section, you will find a lot of post for this topic.
    But if you need a complex customization of the UI controls inside the BSP application, as suggested in the previous post you should go for HTML + Javascript library.
    Hope it is helpful!
    Regards,
    Maheswaran

  • Need to Update SELECTION TEXT and text symbols for report J_1IEWT_CERT.

    Hello Experts,
    My requirement is need to "Update SELECTION TEXT and text symbols for report J_1IEWT_CERT".
    1. As I want to change text sysmbols for 006 to "Run in preview mode". Currently it showing "Type of output". Issue I am facing here is that whenever I deleting aur changing the same it throws an error : "Text symbol 006 is an original text and cannot b
    deleted or renamed".  How can I do the same.
    2. Secondly I have to add two selection text also i.e. ZFATHER and PREV . And delete two selection text i.e. P_PDF and
    P_SCRIPT. In this Tab there is only a Icon of deleting not an Addition button .So How can I add two more selection text.
    Above are Manual Activities which is written in note 1486147. We already taken an acess key and it shows in editable mode but
    not able to add/deletin/modify selection text and text symbols.
    Please provide the solution as it is critical requirement.
    Reagrds,
    Supriya Bhatt.

    Hi Vishal Saxena,
    Just go through the screens and do it .
    [<li> Link1|http://4.bp.blogspot.com/_O5f8iAlgdNQ/SjoVqL9rnvI/AAAAAAAAEs4/fPG7IG9yGK4/s1600-h/3-716953.JPG]
    [<li> Link2|http://1.bp.blogspot.com/_O5f8iAlgdNQ/SjoVp3d9uEI/AAAAAAAAEso/ZxfkeNAiOZQ/s1600-h/1-715669.JPG]
    [<li> Link3|http://2.bp.blogspot.com/_O5f8iAlgdNQ/SjoVqIbpNpI/AAAAAAAAEsw/2ntYgX-i1Dc/s1600-h/2-716353.JPG]
    Thanks
    Venkat.O

  • Why do we need to define RFC destination and user for material replication

    Dear Experts,
    why do we need to define RFC destination and user for material replication? Here we use crm middleware only for material replication. Could you please help me to understand it?
    regards,
    Ranjan

    Hello,
    As far as I know, you can use the same RFC destination already available in ECC to SRM to replicate materials.
    You can refer to note 720819.
    Regards,
    Ricardo

  • App for typing notes and drawing freely?

    Hello,
    I am searching for a good iPad app that lets me type notes with the screen keyboard and draw freely anywhere if needed. I have used Pages for typing and now I discovered Paper which is quite nice for drawing. Only if these two could be merged into one.
    PaperDesk and Moleskine are the ones I have liked the best so far. PaperDesk lets me zoom for drawing so it might be my favorite so far. I just started using the Jot Pro Stylus for drawing and find it pretty good.
    Anyone of you found something even better or liking it so much that you have stopped searching..?

    I would suggest using Evernote to type notes and then an app made by Evernote called 'Penultimate' for taking free-hand notes, if you create an account (very simple to do) and sign in on both apps, your handwritten and typed notes will sync into the main Evernote app. Handwritten notes are even searchable in the same way as a typed note through image recognition technology.

  • Photo editor: fade a photo and draw on top of it?

    I want to "fade" JPG pictures of people and then draw on top of them with a brush tool to emphasize posture (for instructional purposes) and save as a JPG. By "fade" I mean lighten the pic so that my drawn lines will stand out.
    It appears that GIMP will do this. Can you also do that with SeaShore? In their documentation it is not clear to me; I get bogged down with tech lingo about layers and transparent colors and so on. My goal is to find a tool to do the above without getting something way more sophisticated than I need. Thanks for any help.
    Fran

    I'm not familar with GIMP, but I can shed some light onto the layers and transparency you would need to use.
    Layers are quite simple. They are like a stack of papers, you can see the page on top, and the page below if it sticks out beyond the edges of the top sheet. The same is true in photo programs. You will see the top layer, and things behind it will be obscured by the objects or images on the top layer.
    Transparency is the "fade" you are looking for. Note that Opacity is the opposite of transparency (as in 100% opaque is 0% transparent). My reducing transparency on a layer, you allow the layers behind it to become partially visible, IE you allow them to sneak through.
    To accomplish your goal, should should take the images, and fade them by reducing their opacity. I would start with reducing it to 70%, but you'll have to play with it to get things just right.
    After doing this, create a new layer, and be sure the new layer is on top off the image layer. In this new layer, take a brush tool and draw whatever you like. You should see you drawing ontop of the photo. If not, I suspect you have actually placed your line layer behind your photo layer, and you should simply trade their locations.
    Hope this helps,

  • Populate datagrid and draw linechart based on xmlList

    I am generating dynamic xml structure like this
    <root>
      <OPVector>
        <Distance>0</Distance>
        <Height1>100</Height1>
        <Height2>200</Height2>
        <Height3>300</Height3>
      </OPVector>
      <OPVector>
        <Distance>100</Distance>
        <Height1>200</Height1>
        <Height2>300</Height2>
        <Height3>400</Height3>
      </OPVector>
      <OPVector>
        <Distance>200</Distance>
        <Height1>300</Height1>
        <Height2>400</Height2>
        <Height3>500</Height3>
      </OPVector>
    </root>
    What i have to do is to populate data grid based on this xml structure and draw a line chart where distance is category axis (x-axis) and Height1, Height2 etc are line series . No of Height fields depends on how many height values are entered by user (in text field Height1, Height2, Height3, Height4, Height5,Height6).
    Given is the code of my application ....
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="905" height="482" creationComplete="init();">
    <mx:Script>
    <![CDATA[
    import mx.events.IndexChangedEvent;
    private var dataProvider:XMLList = new XMLList();
    private var initDist:int ;
    private var offset:int  ;
    private var finalDist:int;
    private var height1:int;
    private var height2:int;
    private var height3:int;
    private var height4:int;
    private var height5:int;
    private var height6:int;
    private var heat:int;
    private var dataOP:XMLList;
    public function init():void{
    initDist = parseInt(txtInitDist.text);
    offset = parseInt(txtOffset.text);
    finalDist = parseInt(txtFinalDist.text);
    height2 = parseInt(txtHeight1.text);
    height2 = parseInt(txtHeight2.text);
    height3 = parseInt(txtHeight3.text);
    height4 = parseInt(txtHeight4.text);
    height5 = parseInt(txtHeight5.text);
    height6 = parseInt(txtHeight6.text);
    heat = parseInt(txtHeat.text);
    public function getOP():void{
    dataOP = createXMLObject();
    currentState='stateOP';
    trace(dataOP.toXMLString());
    } // public function getOP():void{
    public function createXMLObject():XMLList{
    var data:XMLList = XMLList(<root></root>);
    for (var i:int=initDist;i<=finalDist;i+=offset){
    var x:XMLList = new XMLList(<OPVector></OPVector>);
    var distance:String = "<Distance>"+i+"</Distance>";
    var strHeight1:String = "<Height1>"+(parseInt(txtHeight1.text)+i)+"</Height1>";
    var strHeight2:String = "<Height2>"+(parseInt(txtHeight2.text)+i)+"</Height2>";
    var strHeight3:String = "<Height3>"+(parseInt(txtHeight3.text)+i)+"</Height3>";
    var strHeight4:String = "<Height4>"+(parseInt(txtHeight4.text)+i)+"</Height4>";
    var strHeight5:String = "<Height5>"+(parseInt(txtHeight5.text)+i)+"</Height5>";
    var strHeight6:String = "<Height6>"+(parseInt(txtHeight6.text)+i)+"</Height6>";
    x.appendChild(distance);
    if (txtHeight1.text != ""){
    x.appendChild(strHeight1);
    if (txtHeight2.text != ""){
    x.appendChild(strHeight2);
    if (txtHeight3.text != ""){
    x.appendChild(strHeight3);
    if (txtHeight4.text != ""){
    x.appendChild(strHeight4);
    if (txtHeight5.text != ""){
    x.appendChild(strHeight5);
    if (txtHeight6.text != ""){
    x.appendChild(strHeight6);
    data.appendChild(x);
    } // for (var i:int=initDist;i<finalDist;i+=offset){
    return data;
    } // public function createXMLObject():void
    ]]>
    </mx:Script>
    <!-- States Definition -->
    <mx:states>
    <mx:State name="stateOP">
    <mx:RemoveChild target="{btnOP}"/>
    <mx:RemoveChild target="{btnThermal}"/>
    <mx:RemoveChild target="{txtHeight5}"/>
    <mx:RemoveChild target="{txtHeight6}"/>
    <mx:RemoveChild target="{txtFinalDist}"/>
    <mx:RemoveChild target="{label1}"/>
    <mx:RemoveChild target="{label2}"/>
    <mx:RemoveChild target="{label3}"/>
    <mx:RemoveChild target="{txtHeight3}"/>
    <mx:RemoveChild target="{txtHeight4}"/>
    <mx:RemoveChild target="{txtOffset}"/>
    <mx:RemoveChild target="{label4}"/>
    <mx:RemoveChild target="{label5}"/>
    <mx:RemoveChild target="{label6}"/>
    <mx:RemoveChild target="{txtHeight1}"/>
    <mx:RemoveChild target="{txtHeight2}"/>
    <mx:RemoveChild target="{txtInitDist}"/>
    <mx:RemoveChild target="{label7}"/>
    <mx:RemoveChild target="{label8}"/>
    <mx:RemoveChild target="{label9}"/>
    <mx:RemoveChild target="{txtHeat}"/>
    <mx:RemoveChild target="{label13}"/>
    <mx:AddChild position="lastChild">
    <mx:DataGrid x="57" y="112" width="274" height="336" id="dgPressure" dataProvider="{dataOP}">
    <mx:columns>
    <mx:DataGridColumn headerText="Column 1" dataField="col1"/>
    <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
    <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <mx:LineChart x="382" y="112" id="lcOverPressure" width="513" height="182">
    <mx:series>
    <mx:LineSeries displayName="Series 1" yField=""/>
    </mx:series>
    </mx:LineChart>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <mx:Legend dataProvider="{lcOverPressure}" x="810" y="51"/>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <mx:Button x="382" y="426" label="Close" id="btnClose" click="currentState=''"/>
    </mx:AddChild>
    </mx:State>
    <mx:State name="stateTR">
    <mx:RemoveChild target="{txtHeat}"/>
    <mx:RemoveChild target="{txtHeight1}"/>
    <mx:RemoveChild target="{txtHeight3}"/>
    <mx:RemoveChild target="{txtHeight5}"/>
    <mx:RemoveChild target="{txtHeight2}"/>
    <mx:RemoveChild target="{txtHeight4}"/>
    <mx:RemoveChild target="{txtHeight6}"/>
    <mx:RemoveChild target="{txtInitDist}"/>
    <mx:RemoveChild target="{txtOffset}"/>
    <mx:RemoveChild target="{txtFinalDist}"/>
    <mx:RemoveChild target="{label13}"/>
    <mx:RemoveChild target="{label7}"/>
    <mx:RemoveChild target="{label4}"/>
    <mx:RemoveChild target="{label3}"/>
    <mx:RemoveChild target="{label8}"/>
    <mx:RemoveChild target="{label5}"/>
    <mx:RemoveChild target="{label1}"/>
    <mx:RemoveChild target="{label9}"/>
    <mx:RemoveChild target="{label6}"/>
    <mx:RemoveChild target="{label2}"/>
    <mx:RemoveChild target="{btnOP}"/>
    <mx:RemoveChild target="{btnThermal}"/>
    <mx:AddChild position="lastChild">
    <mx:DataGrid x="39" y="108" width="301" height="364">
    <mx:columns>
    <mx:DataGridColumn headerText="Column 1" dataField="col1"/>
    <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
    <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <mx:LineChart x="420" y="108" id="linechart1" width="475" height="181">
    <mx:series>
    <mx:LineSeries displayName="Series 1" yField=""/>
    </mx:series>
    </mx:LineChart>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <mx:Legend dataProvider="{linechart1}" x="810" y="13"/>
    </mx:AddChild>
    </mx:State>
    </mx:states>
    <!-- States Definition -->
    <!-- Controls Definition -->
    <mx:TextInput x="331" y="95" width="62" id="txtHeat" text="8"/>
    <mx:TextInput x="231" y="229" width="62" id="txtHeight1" text="100"/>
    <mx:TextInput x="231" y="259" width="62" id="txtHeight3" text="300"/>
    <mx:TextInput x="231" y="289" width="62" id="txtHeight5"/>
    <mx:TextInput x="357" y="229" width="62" id="txtHeight2" text="200"/>
    <mx:TextInput x="357" y="259" width="62" id="txtHeight4"/>
    <mx:TextInput x="357" y="289" width="62" id="txtHeight6"/>
    <mx:TextInput x="580" y="229" width="62" id="txtInitDist" text="0"/>
    <mx:TextInput x="580" y="259" width="62" id="txtOffset" text="100"/>
    <mx:TextInput x="580" y="289" width="62" id="txtFinalDist" text="2000"/>
    <mx:Label x="298" y="97" text="Heat" id="label13"/>
    <mx:Label x="168" y="231" text="Height1" id="label7"/>
    <mx:Label x="168" y="261" text="Height3" id="label4"/>
    <mx:Label x="168" y="291" text="Height5" id="label3"/>
    <mx:Label x="302.5" y="231" text="Height2" id="label8"/>
    <mx:Label x="301" y="261" text="Height4" id="label5"/>
    <mx:Label x="301" y="291" text="Height6" id="label1"/>
    <mx:Label x="484" y="231" text="Initial Distance" id="label9"/>
    <mx:Label x="533" y="261" text="Offset" id="label6"/>
    <mx:Label x="490" y="291" text="Final Distance" id="label2"/>
    <mx:Button x="298.5" y="384" label="Pressure Effects" id="btnOP" click="getOP()"/>
    <mx:Button x="464.5" y="384" label="Thermal Effects" width="142" id="btnThermal"/>
    <mx:Label x="298" y="10" text="Weather Effects" fontWeight="bold" fontSize="18"/>
    <!-- Controls Definition -->
    </mx:Application>

    I suggest that you first not try to cram all of your code into the MXML. Though many examples use this approach for quick copy-and-pasting, it is bad style and not as maintainable. You should use the code-behind approach where your MXML is strictly for layout of the view and its root element is a custom class that extendeds the usual base (in this case Application).
    Since the number of series in your line cart may vary, what you will need to do is dynamically create them whenever the data provider is updated.

Maybe you are looking for

  • Failed to find xswebconfig tool via bundle after 10.8.2 update

    After updating my OS X 10.8.1 Server to 10.8.2 and the latest version of the server app, any time I launch Server and try to view the services for Web or Wiki, I get the following error: "Error Reading Settings". I see this in the console logs: "Fail

  • CPS on Solution Manager EHP1?

    Folks, Any idea whether we can install CPS in Solution Manager EHP1 (7.01) system with Java EHP1 (SP4)? The CPS software is available under NW 7.0. Regards Chandu

  • Arabic Chars not getting stored correctly in Oracle 9i db

    Hi, I am currently working on an Oracle 9i db that is used for storing data in a CMS. Oracle is running on a Linux box. I wish to be able to store Arabic along with English and a few other European languages. Below is output from nls_parameters SQL>

  • Safari not allowing me to upload/attach documents

    All of a sudden Safari isn't allowing me to 'upload' or 'attach' files (photos etc) to hotmail or gmail messages and other site where I need to upload documents. Has anyone else experienced this. Is there a quick fix?

  • Working with XSLD mappiing using Altova XML SPY 2007

    will any one to give me some inputs regarding the working with SPY XML , i have never worked with it please help me thanking you sridhar