Uses & syntax of classes

hi friends,
I am making a chatting messenger using socket programming in java,I have some problem in establishing chatting session between two clients,where server just provide socket address of the c2 to c1,and then two client connect to each other and then send message without passing that message through server.But i have some problem doing these.
Will you please tell,is what i had tell above is possible,if yes then plz tell me how to do it;Secondly i learned about (class SocketImpl, SocketAddress,InetSocketAddress),but i dont know how to use it in my application, &will these class be needed in my application.Plz give some good link where i can learned about that classes.
please help me & thank you for suggession

You don't need to worry about SocketImpl but you do need to look at ServerSocket and the Java networking tutorial.

Similar Messages

  • Model Binding and Calculated Field Syntax for "class" Attribute

    Hi,
    I tried to use the calculated field syntax from SAP UI5 to change the CSS class attribute of an element based on some model property, i.e., I wanted to change the class in the corresponding formatter function based on the currently bound value. However, my formatter function is not called. When I use the same syntax on a text attribute, it works.
    I also tried to use normal property binding, but it did not work on the class attribute either (it just put class="{property}" in the rendered HTML).
    Is there anything I missed or is it just not possible to use property binding and calculated field syntax for class attributes? Did anybody try something like this before?
    I think it is a standard use case to change the CSS class based on some model property. So, if anybody knows how to do that, could you give a short example?
    Best regards
    Svenja

    They have a class property. At least, I can do the following in an XML view:
    <Button
                  icon="sap-icon://add"
                  press="onButtonPress"
                  class="my-button-class" />
    I would expect the following to work as well, but for me it did not:
    <Button
                  icon="sap-icon://add"
                  press="onButtonPress"
                  class="{/customClass}" />
    This renders the following HTML (cropped to the important parts):
    <button type="button" class="sapMBtn {/customClass}">
    </button>
    It seems like the class attribute is something special although I don't see a reason why. Other HTML templating engines, for example, support things like that.

  • Use Interface of Class object

    Hi Experts,
    I want to use Interface of Class object. But I'dont know how I use it (declaration,call,create etc.)
    There are a lot of exam about using local interface. But I need from Global object.
    Class : CL_TPDA_DIFF_STRUC
    Interface: IF_TPDA_DIFF_SERVICE
    Best regards.

    Firstly ; Your advice book tells the "General OO".
    But I need "Only ABAP OO". The basic logic is the same. But syntax are different.
    If there is a book about ABAP OO and syntax You can advice to me.
    Secondly;
    My code is below.
    I created my interface success . But It give error at runtime. Error mesaage : 'Error during interprocess communication; Debugger will be closed . Message Number TPDA151'
    DATA l_ref_diff TYPE REF TO CL_TPDA_DIFF_STRUC.
    data : xyz  TYPE REF TO IF_TPDA_DIFF_SERVICE.
    data : p_var1 type TPDA_VAR_NAME,
              p_var2 type TPDA_VAR_NAME,
              lv_x type TPDA_DIFF_ATTR.
    data : l_it_value_diff TYPE TPDA_DIFF_VALUE_DIFF_IT,
              l_it_main_diff TYPE tpda_diff_main_diffs_it.
    p_var1 = 'CLIENTDATA1'.
    p_var2 = 'CLIENTDATA2'.
    lv_x-maxhits = 100.
    CREATE OBJECT l_ref_diff.
    xyz ?= l_ref_diff.
    xyz->init( ).
    xyz->DIFF( EXPORTING p_var1 = p_var1
                         p_var2 = p_var2
                         p_diff_attr = lv_x
               CHANGING p_it_value_diff_it = l_it_value_diff
                        p_it_main_diff_it  = l_it_main_diff ).
    Best Regards.

  • Previewing an image before uploading it using the FileReference class

    Previewing an image before uploading it using the FileReference class in flash player 3 not in SDK4

    Previewing an image before uploading it using the FileReference class in flash player 3 not in SDK4

  • Previewing an image before uploading it using the FileReference class in flex 3

    Previewing an image before uploading it using the FileReference class in flex 3 ?

    hai,
              when this code is used in my application ,i got the name of image and new frame is added each time .But image is not displayed.....
    The code  starts like this
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
                xmlns:mx="library://ns.adobe.com/flex/mx" initialize="init()"   backgroundColor="white" width="100%" height="100%">
        <fx:Script>
    <![CDATA[ 
                    import mx.controls.Alert;
                    import mx.messaging.Channel;
                    import mx.messaging.ChannelSet;
                    import mx.messaging.channels.AMFChannel;
                    import mx.rpc.events.ResultEvent;
                    import mx.controls.Image;
                    import spark.events.IndexChangeEvent;
                    import mx.managers.DragManager;
      <mx:DataGridColumn headerText="Dimension Value"  width="10" dataField="dimensionValue"/>
                                                   <mx:DataGridColumn headerText="Unit Nmae"  width="10" dataField="dimensionUnitName"/>
                                                   </mx:columns>
                                           </mx:DataGrid>
                                           <mx:Spacer width="2%"/>
                                       </mx:HDividedBox>
                                       </mx:VBox>
                   <mx:Spacer height="0"/>
                <mx:VBox width="100%">
                    <s:HGroup height="90" top="0" left="0" right="0" verticalAlign="justify" gap="10" paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5">
                        <s:Button id="btn_loader" top="5" bottom="24" width="100" label="load" click="loadImages()"/>
                        <s:Group width="100%">
                            <s:Group name="cl" top="0" left="0" bottom="0" width="20" mouseOver="//scroll_on(event)" mouseOut="//scroll_off(event)">
                                <s:BitmapImage source="@Embed('../assets/left.jpg')" top="0" left="0" bottom="0" right="0" fillMode="scale"/>   
                            </s:Group>
                            <s:List id="imgList" skinClass="skins.ListSkin" top="-3" left="27" right="28" bottom="10"
                                    dataProvider="{ImageCollection}" itemRenderer="Image_Render">
                                <s:layout>
                                    <s:HorizontalLayout gap="0"/>
                                </s:layout>
                            </s:List>
                            <s:Group name="cr" top="0" right="0" bottom="0" width="20" mouseOver="//scroll_on(event)" mouseOut="//scroll_off(event)">
                                <s:BitmapImage source="@Embed('../assets/right.jpg')" top="-1" left="0" bottom="0" right="0" fillMode="scale"/>
                            </s:Group>
                        </s:Group>
                    </s:HGroup>
                    <s:SkinnableContainer id="dropCanvas" top="100" left="5" right="5" bottom="5" backgroundAlpha="1.0" alpha="1.0"
                                          dragEnter="dropCanvas_dragEnterHandler(event)"
                                          dragDrop="dropCanvas_dragDropHandler(event)" contentBackgroundColor="#914E4E" backgroundColor="#F7F7F7">
                    </s:SkinnableContainer>
                </mx:VBox>
                <mx:Spacer height="5"/>
                                      </mx:VDividedBox>
        </mx:Panel>
    </mx:Canvas>

  • Tracking Memory usage on iOS using the Stats class

    I've been checking memory usage on an app I'm developing for iOS using the Stats class https://github.com/mrdoob/Hi-ReS-Stats ( http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c3-315cd077124319488fd-7fff.html#WS 948100b6829bd5a61637f0a412623fd0543-8000).
    I added the Stats class to my project and redeployed and, yikes, memory usage reported in Stats creeps up (pretty slowly) even when there's nothing happening in the app (just showing a loaded bitmap).
    To try and track down the issue I created a project with a test class that extends Sprite with just this single call in the constructor :-
    addChild( new Stats() );
    I deployed it to the device to check that it didn't gobble any memory.
    But I was Suprised to watch the memory usage creep up and up (to approx 5) before some garbage collection kicked in and takes memory back down. I left it running and then it crept up again to over 7.5 this time before being kicked back down to just below 3.
    So 2 related questions that I'd appreciate any feedback/observations/thoughts on :-
    1 - Is this normal (i.e. memory creeping up when there's nothing other than Stats in the project) ?
    2 - What is the best way to monitor memory usage within an app ? Is Stats good enough - is Stats itself causing the memory usage ?
    All the best guys !

    Also see thread (http://forums.adobe.com/message/4280020#4280020)
    My conclusions are :-
    - If you run an app and leave it idle, memory usage gradually creeps up (presumably as memory is being used to perform calcs/refresh the display etc)
    - Periodically the garbage collection kicks in and memory is brought back down
    - This cycle could be in excess of 5 mins
    Run with your real app and memory will increase and be released much more rapidly/regularly.
    - It's probably worth performing initial checks by running on your desktop to iron out any initial problems

  • How to use the Rectangle class to draw an image and center it in a JPanel

    I sent an earlier post on how to center an image in a JPanel using the Rectangle class. I was asked to send an executable code which will show the malfunction. The code below is an executable code and a small part of a very big project. To simplifiy things, it is just a JFrame and a JPanel with an open dialog. Once executed the JFrame and the FileDialog will open. You can then navigate to a .gif or a .jpg picture and open it. What I want is for the picture to be centered in the middle of the JPanel and not the upper left corner. It is also important to stress that, I am usinig the Rectangle class to draw the Image. The region of interest is where the rectangle is created. In the constructor of the CenterRect class, I initialize the Rectangle class. Then I use paintComponent in the CenterRect class to draw the Image. The other classes are just support classes. The MyImage class is an extended image class which also has a draw() method. Any assistance in getting the Rectangle to show at the center of the JPanel without affecting the size and shape of the image will be greatly appreciated.
    I have divided the code into three parts. They are all supposed to be on one file in order to execute.
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class CenterRect extends JPanel {
        public static Rectangle srcRect;
        Insets insets = null;
        Image image;
        MyImage imp;
        private double magnification;
        private int dstWidth, dstHeight;
        public CenterRect(MyImage imp){
            insets = getInsets();
            this.imp = imp;
            int width = imp.getWidth();
            int height = imp.getHeight();
            ImagePanel.init();
            srcRect = new Rectangle(0,0, width, height);
            srcRect.setLocation(0,0);
            setDrawingSize(width, height);
            magnification = 1.0;
        public void setDrawingSize(int width, int height) {
            dstWidth = width;
            dstHeight = height;
            setSize(dstWidth, dstHeight);
        public void paintComponent(Graphics g) {
            Image img = imp.getImage();
         try {
                if (img!=null)
                    g.drawImage(img,0,0, (int)(srcRect.width*magnification), (int)(srcRect.height*magnification),
              srcRect.x, srcRect.y, srcRect.x+srcRect.width, srcRect.y+srcRect.height, null);
            catch(OutOfMemoryError e) {e.printStackTrace();}
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Opener().openImage();
    class Opener{
        private String dir;
        private String name;
        private static String defaultDirectory;
        JFrame parent;
        public Opener() {
            initComponents();
         public void initComponents(){
            parent = new JFrame();
            parent.setContentPane(ImagePanel.panel);
            parent.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
            parent.setExtendedState(JFrame.MAXIMIZED_BOTH);
            parent.setVisible(true);
        public void openDialog(String title, String path){
            if (path==null || path.equals("")) {
                FileDialog fd = new FileDialog(parent, title);
                defaultDirectory = "dir.image";
                if (defaultDirectory!=null)
                    fd.setDirectory(defaultDirectory);
                fd.setVisible(true);
                name = fd.getFile();
                if (name!=null) {
                    dir = fd.getDirectory();
                    defaultDirectory = dir;
                fd.dispose();
                if (parent==null)
                    return;
            } else {
                int i = path.lastIndexOf('/');
                if (i==-1)
                    i = path.lastIndexOf('\\');
                if (i>0) {
                    dir = path.substring(0, i+1);
                    name = path.substring(i+1);
                } else {
                    dir = "";
                    name = path;
        public MyImage openImage(String directory, String name) {
            MyImage imp = openJpegOrGif(dir, name);
            return imp;
        public void openImage() {
            openDialog("Open...", "");
            String directory = dir;
            String name = this.name;
            if (name==null)
                return;
            MyImage imp = openImage(directory, name);
            if (imp!=null) imp.show();
        MyImage openJpegOrGif(String dir, String name) {
                MyImage imp = null;
                Image img = Toolkit.getDefaultToolkit().getImage(dir+name);
                if (img!=null) {
                    imp = new MyImage(name, img);
                    FileInfo fi = new FileInfo();
                    fi.fileFormat = fi.GIF_OR_JPG;
                    fi.fileName = name;
                    fi.directory = dir;
                    imp.setFileInfo(fi);
                return imp;
    }

    This is the second part. It is a continuation of the first part. They are all supposed to be on one file.
    class MyImage implements ImageObserver{
        private int imageUpdateY, imageUpdateW,width,height;
        private boolean imageLoaded;
        private static int currentID = -1;
        private int ID;
        private static Component comp;
        protected ImageProcessor ip;
        private String title;
        protected Image img;
        private static int xbase = -1;
        private static int ybase,xloc,yloc;
        private static int count = 0;
        private static final int XINC = 8;
        private static final int YINC = 12;
        private int originalScale = 1;
        private FileInfo fileInfo;
        ImagePanel win;
        /** Constructs an ImagePlus from an AWT Image. The first argument
         * will be used as the title of the window that displays the image. */
        public MyImage(String title, Image img) {
            this.title = title;
             ID = --currentID;
            if (img!=null)
                setImage(img);
        public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h) {
             imageUpdateY = y;
             imageUpdateW = w;
             imageLoaded = (flags & (ALLBITS|FRAMEBITS|ABORT)) != 0;
         return !imageLoaded;
        public int getWidth() {
             return width;
        public int getHeight() {
             return height;
        /** Replaces the ImageProcessor, if any, with the one specified.
         * Set 'title' to null to leave the image title unchanged. */
        public void setProcessor(String title, ImageProcessor ip) {
            if (title!=null) this.title = title;
            this.ip = ip;
            img = ip.createImage();
            boolean newSize = width!=ip.getWidth() || height!=ip.getHeight();
         width = ip.getWidth();
         height = ip.getHeight();
         if (win!=null && newSize) {
                win = new ImagePanel(this);
        public void draw(){
            CenterRect ic = null;
            win = new ImagePanel(this);
            if (win!=null){
                win.addIC(this);
                win.getCanvas().repaint();
                ic = win .getCanvas();
                win.panel.add(ic);
                int width = win.imp.getWidth();
                int height = win.imp.getHeight();
                Point ijLoc = new Point(10,32);
                if (xbase==-1) {
                    xbase = 5;
                    ybase = ijLoc.y;
                    xloc = xbase;
                    yloc = ybase;
                if ((xloc+width)>ijLoc.x && yloc<(ybase+20))
                    yloc = ybase+20;
                    int x = xloc;
                    int y = yloc;
                    xloc += XINC;
                    yloc += YINC;
                    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
                    count++;
                    if (count%6==0) {
                        xloc = xbase;
                        yloc = ybase;
                    int scale = 1;
                    while (xbase+XINC*4+width/scale>screen.width || ybase+YINC*4+height/scale>screen.height)
                        if (scale>1) {
                   originalScale = scale;
                   ic.setDrawingSize(width/scale, height/scale);
        /** Returns the current AWT image. */
        public Image getImage() {
            if (img==null && ip!=null)
                img = ip.createImage();
            return img;
        /** Replaces the AWT image, if any, with the one specified. */
        public void setImage(Image img) {
            waitForImage(img);
            this.img = img;
            JPanel panel = ImagePanel.panel;
            width = img.getWidth(panel);
            height = img.getHeight(panel);
            ip = null;
        /** Opens a window to display this image and clears the status bar. */
        public void show() {
            show("");
        /** Opens a window to display this image and displays
         * 'statusMessage' in the status bar. */
        public void show(String statusMessage) {
            if (img==null && ip!=null){
                img = ip.createImage();
            if ((img!=null) && (width>=0) && (height>=0)) {
                win = new ImagePanel(this);
                draw();
        private void waitForImage(Image img) {
        if (comp==null) {
            comp = ImagePanel.panel;
            if (comp==null)
                comp = new JPanel();
        imageLoaded = false;
        if (!comp.prepareImage(img, this)) {
            double progress;
            while (!imageLoaded) {
                if (imageUpdateW>1) {
                    progress = (double)imageUpdateY/imageUpdateW;
                    if (!(progress<1.0)) {
                        progress = 1.0 - (progress-1.0);
                        if (progress<0.0) progress = 0.9;
    public void setFileInfo(FileInfo fi) {
        fi.pixels = null;
        fileInfo = fi;
    }

  • Uploading files using FTP(Linlyn class)

    I'm currently learning java right now on my own, and I'm having some trouble.
    I'm trying to upload a txt file using the linlyn class. How do you create a file then upload it on an applet?

    I'm currently learning java right now on my own, and I'm having some trouble.
    I'm trying to upload a txt file using the linlyn class. How do you create a file then upload it
    from an applet?

  • How to trigger New page while using ALV with classes/oops?

    Hi All
    I am trying to print a report which has to show the data in two pages.
    I am using ALV with classes/oops.
    Though I am able to print the report but a new page is not coming. Whole of the data is coming in one single page.
    Please tell me as to how to trigger a NEW PAGE while using ALV with classes/oops.
    Please send some code samples also if available.
    Thanks in advance.
    Jerry

    using sort option you can do it. in case of grid/oo alv class ALV you can view that only in print mode/preview mode.
    in case of list you can view that directly.
    sort-fieldname = 'FIELDNAME'.
    sort-group = '*'  "triggers new page
    sort-up = 'X'.
    append sort to it_sort.

  • Using a FireFX Class

    I found this class today which is really cool:
    http://www.gskinner.com/blog/archives/2007/11/fire_effect_com.html
    However, I've never used a public class before.  I've been reading up on them all morning.  I'll provide the code for it here as well.  Anyway, the author also provides a sample application using the class; however, it's a bit different than what I've been reading.  He doesn't call the class in his code;however, it seems he has the class in his library, which is news to me.
    Anyway, the biggest thing I'm after is trying to design my own application calling this class and just hardcoding the fire aspects in my application.  However, I'm coming up empty at every angle.  Any help would be much appreciated!
    Here's the class he created:
    * FireFX by Grant Skinner. May 30, 2007
    * Visit www.gskinner.com/blog for documentation, updates and more free code.
    * You may distribute and modify this class freely, provided that you leave this header intact,
    * and add appropriate headers to indicate your changes. Credit is appreciated in applications
    * that use this code, but is not required.
    * Please contact [email protected] for more information.
    package com.gskinner.effects {
                import flash.display.BitmapData;
                import flash.geom.Matrix;
                import flash.geom.Point;
                import flash.geom.ColorTransform;
                import flash.filters.ColorMatrixFilter;
                import flash.filters.BlurFilter;
                import flash.filters.DisplacementMapFilter;
                import flash.display.Sprite;
                import flash.display.MovieClip;
                import flash.events.Event;
                import flash.display.Bitmap;
                import flash.display.DisplayObject;
                public class FireFX extends Sprite {
                            private var _fadeRate:Number=0.4;
                            private var _distortionScale:Number=0.4;
                            private var _distortion:Number=0.5;
                            private var _flameHeight:Number=0.3;
                            private var _flameSpread:Number=0.3;
                            private var _blueFlame:Boolean = false;
                            private var _smoke:Number = 0;
                // private properties:
                            // display elements:
                            private var displayBmp:BitmapData;
                            private var scratchBmp:BitmapData;
                            private var perlinBmp:BitmapData;
                            // geom:
                            private var mtx:Matrix;
                            private var pnt:Point;
                            private var drawColorTransform:ColorTransform;
                            // filters:
                            private var fireCMF:ColorMatrixFilter;
                            private var dispMapF:DisplacementMapFilter;
                            private var blurF:BlurFilter;
                            // other:
                            private var endCount:Number;
                            private var bmpsValid:Boolean=false;
                            private var perlinValid:Boolean=false;
                            private var filtersValid:Boolean=false;
                            private var _target:DisplayObject;
                            public function FireFX() {
                                        var frame:DisplayObject = getChildAt(0);
                                        frame.visible = false;
                                        frame.height = height;
                                        frame.width = width;
                                        scaleX = scaleY = 1;
                                        mtx = new Matrix();
                                        pnt = new Point();
                                        startFire();
                            // getter/setters:
                            override public function set width(value:Number):void {
                                        bmpsValid &&= (value == width);
                                        super.width = value|0;
                            override public function get width():Number {
                                        return super.width;
                            override public function set height(value:Number):void {
                                        bmpsValid &&= (value == height);
                                        super.height = value|0;
                            override public function get height():Number {
                                        return super.height;
                            [Inspectable(defaultValue=0.4,name='fadeRate (0-1)')]
             * Sets the rate that flames fade as they move up. 0 is slowest, 1 is fastest.
             * @default 0.4
                            public function set fadeRate(value:Number):void {
                                        filtersValid &&= (value == _fadeRate);
                                        _fadeRate = value;
                            public function get fadeRate():Number {
                                        return _fadeRate;
                            [Inspectable(defaultValue=0.4,name='distortionScale (0-1)')]
             * Sets the scale of flame distortion. 0.1 is tiny and chaotic, 1 is large and smooth.
             * @default 0.4
                            public function set distortionScale(value:Number):void {
                                        perlinValid &&= (value == _distortionScale);
                                        _distortionScale = value;
                            public function get distortionScale():Number {
                                        return _distortionScale;
                            [Inspectable(defaultValue=0.4,name='distortion (0-1)')]
             * Sets the amount of distortion. 0.1 is little, 1 is chaotic.
             * @default 0.4
                            public function set distortion(value:Number):void {
                                        filtersValid &&= (value == _fadeRate);
                                        _distortion = value;
                            public function get distortion():Number {
                                        return _distortion;
                            [Inspectable(defaultValue=0.3,name='flameHeight (0-1)')]
             * Sets the how high the flame will burn. 0 is zero gravity, 1 is a bonfire.
             * @default 0.3
                            public function set flameHeight(value:Number):void {
                                        perlinValid &&= (value == _flameHeight);
                                        _flameHeight = value;
                            public function get flameHeight():Number {
                                        return _flameHeight;
                            [Inspectable(defaultValue=0.3,name='flameSpread (0-1)')]
             * Sets the how much the fire will spread out around the target. 0 is no spread, 1 is a lot.
             * @default 0.3
                            public function set flameSpread(value:Number):void {
                                        filtersValid &&= (value == _flameSpread);
                                        _flameSpread = value;
                            public function get flameSpread():Number {
                                        return _flameSpread;
                            [Inspectable(defaultValue=false,name='blueFlame')]
             * Indicates whether it should use a blue or red flame.
             * @default false
                            public function set blueFlame(value:Boolean):void {
                                        filtersValid &&= (value == _blueFlame);
                                        _blueFlame = value;
                            public function get blueFlame():Boolean {
                                        return _blueFlame;
                            [Inspectable(defaultValue=0,name='smoke (0-1)')]
             * Sets the amount of smoke. 0 little, 1 lots.
             * @default 0
                            public function set smoke(value:Number):void {
                                        filtersValid &&= (value == _smoke);
                                        _smoke = value;
                            public function get smoke():Number {
                                        return _smoke;
                            [Inspectable(defaultValue='',name='target')]
             * Sets the amount of smoke. 0 little, 1 lots.
             * @default
                            public function set targetName(value:String):void {
                                        var targ:DisplayObject = parent.getChildByName(value);
                                        if (targ == null) {
                                                    try { targ = parent[value] as DisplayObject; }
                                                    catch (e:*) {}
                                        target = targ;
             * Defines the shape of the fire. The fire will burn upwards, so it should be near the bottom, and centered in the FireFX component.
             * @default
                            public function set target(value:DisplayObject):void {
                                        _target = value;
                                        clear();
                            public function get target():DisplayObject {
                                        return _target;
             * Clears the fire.
                            public function clear():void {
                                        if (displayBmp) {
                                                    displayBmp.fillRect(displayBmp.rect,0);
             * Stops the fire effect after letting it burn down over 20 frames.
                            public function stopFire():void {
                                        // let the fire burn down for 20 frames:
                                        if (endCount == 0) { endCount = 20; }
                            private function updateBitmaps():void {
                                        if (displayBmp) {
                                                    displayBmp.dispose();
                                                    displayBmp = null;
                                                    scratchBmp.dispose();
                                                    scratchBmp = null;
                                                    perlinBmp.dispose();
                                                    perlinBmp = null;
                                        displayBmp = new BitmapData(width, height, true, 0);
                                        scratchBmp = displayBmp.clone();
                                        perlinBmp = new BitmapData(width*3, height*3, false, 0);
                                        while (numChildren) { removeChildAt(0); }
                                        addChild(new Bitmap(displayBmp));
                                        updatePerlin();
                                        updateFilters();
                                        bmpsValid = true;
                            private function updatePerlin():void {
                                        perlinBmp.perlinNoise(30*_distortionScale,20*_distortionScale,1,-Math.random()*1000|0,fals e,true,1|2,false);
                                        perlinBmp.colorTransform(perlinBmp.rect,new ColorTransform(1,  1-_flameHeight*0.5  ,1,1,0,0,0,0));
                                        perlinValid = true;
                            function updateFilters():void {
                                        if (_blueFlame) {
                                                    fireCMF = new ColorMatrixFilter([0.8-0.55*_fadeRate,0,0,0,0,
                                                                                                                                                     0,0.93-0.48*_fadeRate,0,0,0,
                                                                                                                                                     0,0.1,0.96-0.35*_fadeRate,0,0,
                                                                                                                                                     0,0.1,0,1,-25+_smoke*24]);
                                                    drawColorTransform = new ColorTransform(0,0,0,1,210,240,255,0);
                                        } else {
                                                    fireCMF = new ColorMatrixFilter([0.96-0.35*_fadeRate,0.1,0,0,-1,
                                                                                                                                                     0,0.9-0.45*_fadeRate,0,0,0,
                                                                                                                                                     0,0,0.8-0.55*_fadeRate,0,0,
                                                                                                                                                     0,0.1,0,1,-25+_smoke*24]);
                                                    drawColorTransform = new ColorTransform(0,0,0,1,255,255,210,0);
                                        dispMapF = new DisplacementMapFilter(perlinBmp,pnt,1,2,14*_distortion,-30,"clamp");
                                        blurF = new BlurFilter(32*_flameSpread,32*_flameSpread,1);
                                        filtersValid = true;
                            private function startFire():void {
                                        endCount = 0;
                                        addEventListener(Event.ENTER_FRAME,doFire);
                            private function doFire(evt:Event):void {
                                        if (_target == null) { return; }
                                        if (!bmpsValid) { updateBitmaps(); }
                                        if (!perlinValid) { updatePerlin(); }
                                        if (!filtersValid) { updateFilters(); }
                                        if (endCount == 0) {
                                                    var drawMtx:Matrix = _target.transform.matrix;
                                                    drawMtx.tx = _target.x-x;
                                                    drawMtx.ty = _target.y-y;
                                                    scratchBmp.fillRect(scratchBmp.rect,0);
                                                    drawColorTransform.alphaOffset = -Math.random()*200|0;
                                                    scratchBmp.draw(_target,drawMtx,drawColorTransform,"add");
                                                    scratchBmp.applyFilter(scratchBmp,scratchBmp.rect,pnt,blurF);
                                                    displayBmp.draw(scratchBmp,mtx,null,"add");
                                        dispMapF.mapPoint = new Point( -Math.random()*(perlinBmp.width-displayBmp.width)|0, -Math.random()*(perlinBmp.height-displayBmp.height)|0 );
                                        displayBmp.applyFilter(displayBmp,displayBmp.rect,pnt,dispMapF);
                                        displayBmp.applyFilter(displayBmp,displayBmp.rect,pnt,fireCMF);
                                        if (endCount != 0 && --endCount == 0) {
                                                    removeEventListener(Event.ENTER_FRAME,doFire);
    Then, this is the sample application he gave:
    import fl.controls.Slider;
    import fl.controls.Label;
    import fl.events.SliderEvent;
    var params:Array = ["distortion","distortionScale","fadeRate","flameHeight","flameSpread","smoke"]
    var l:uint = params.length;
    for (var i:uint=0; i<l; i++) {
                var label:TextField = new TextField();
                label.textColor = 0;
                label.text = params[i];
                label.width = 140;
                label.x = 350;
                label.y = 55+50*i;
                addChild(label);
                label = new TextField();
                label.textColor = 0x999999;
                label.text = "0.35";
                label.name = params[i]+"fld";
                label.width = 30;
                label.x = 490;
                label.y  = 55+50*i;
                addChild(label);
                var slider:Slider = new Slider();
                slider.name = params[i];
                slider.minimum = -2;
                slider.maximum = 2;
                slider.addEventListener(SliderEvent.THUMB_DRAG,handleSlider);
                addChild(slider);
                slider.x = 350;
                slider.width = 170;
                slider.y = 75+50*i;
                slider.snapInterval = 0.05;
                slider.value = 0.35;
                fireFX[params[i]] = 0.35;
    function handleSlider(evt:SliderEvent):void {
                fireFX[evt.target.name] = evt.target.value;
                (getChildByName(evt.target.name+"fld") as TextField).text = String(evt.target.value);
    blueFlame.addEventListener(Event.CHANGE,handleCheckBox);
    hideText.addEventListener(Event.CHANGE,handleCheckBox);
    function handleCheckBox(evt:Event):void {
                fireFX.blueFlame = blueFlame.selected;
                obj.visible = !hideText.selected;
    Thanks again.

    Looks like he has fireFX instance on the timeline. Most probably this instances symbol base class is com.gskinner.effects.FireFX
    You just need to create a directory structure that reflects his package:
    com/gskinner/effects/
    where you place his FireFX.as
    Or, alternatively, you can remove package path from the class header and place FireFx where all you classes (or your application) are:
    package com.gskinner.effects {
    to
    package {
    Then you will just need to instantiate the class.

  • How to use two activex class objects in same vi

    HI
    I am using labview to read ECU data from INCA software .INCA providing COMTOOL API(incacom.dll). I am using ACTIVEX for  communication between INCA & Labview. My problem is If I have used single activex class object  I am able to read Inca version, getting the database path etc. If I have used two activex class in same vi (one to open Inca & other one is to read the folder structure) I am not getting output.I have attached snapshot for referance
    Attachments:
    activex1.JPG ‏114 KB
    activex2.JPG ‏107 KB

    It wasnt in the first two images you posted, or I couldnt see it anyway! That was the only reason.
    Did you try the database block on its own, just to confirm that it is working?
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • How to use the different class for each screen as well as function.

    Hi Experts,
    How to use the different class for each screen as well as function.
    With BestRegards,
    M.Thippa Reddy.

    Hi ThippaReddy,
    see this sample code
    Public Class ClsMenInBlack
    #Region "Declarations"
        'Class objects
        'UI and Di objects
        Dim objForm As SAPbouiCOM.Form
        'Variables
        Dim strQuery As String
    #End Region
    #Region "Methods"
        Private Function GeRate() As Double
                Return Double
        End Function
    #End Region
    Public Sub SBO_Appln_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean)
            If pVal.BeforeAction = True Then
                If pVal.MenuUID = "ENV_Menu_MIB" Then
                End If
            Else ' Before Action False
                End If
        End Sub
    #End Region
    End Class
    End Class
    Rgds
    Micheal
    Vasu Anna Regional Feeling a???? Just Kidding
    Edited by: micheal willis on Jul 27, 2009 5:49 PM
    Edited by: micheal willis on Jul 27, 2009 5:50 PM

  • How to use the implementation class in propetty pallete

    Hi,
    I am using forms 10g....I have to insert horizontal scroll bar in text item..
    I have only class files instead of jar files ...how cani place the class file instead of jar file...
    How to use the implementation class in property palette to display the PJC
    Thanks,
    Ansaf.

    The Implementation Class must reflect the full name of the class. For instance, if the full class name is : xx.yyy.zz.class_name, then put this in the Implementation Class property of the corresponding item.
    Also, the class must be stored in the equivalent directory structure, so that, in my example: <DEV_HOME>/forms/java/xx/yyy/zz
    Francois

  • Can you use two tax classes in the same payroll run?

    Hi,
    I have a wage type that is currently set to Tax Class 1 (fully taxed) for processing class 71,  I need to change it to tax class 7 (Withholding and SUI only) and have it computed as part of the regular payroll run and also by itself using offcycle.
    When I have it set as Tax Class 1, all is well, when I change it to tax class 7, I get the error...
    BSI Messages and Status 4101 CAN NOT PROCESS DUPLICATE RESIDENT STATE FED
    This is the first time we're using this tax class and I think i have it set up correctly in the tax model but am not for sure.
    Any suggestions?   I'd really appreciate some guidance as I've looked
    Thanks!
    Stephanie Abrahamson

    I think you should not change the PRCL 71 from 1 to 7 wide open. Start it with begin date of pay period you want and keep the history with PRCL 71 1.
    As well check the config of tax model.
    Arti

  • Than how can i get java class by using it's class file?

    Hi
    After compilation of a java program, it creates a class file.
    After getting class file suppose class file has been deleted.
    Than how can i get java class by using it's class file?
    Thanks in advance.

    get a decompiler and run your class file through it--I'll assume you want the source code back and that you are not trying to recover a missing class file by attempting to use the class file that is missing--if it's missing, then I've not a clue on how to get it back by using what is already missing.
    BTW: many of your compilers have source control--if it does, just restore your missing file.

Maybe you are looking for

  • Is there a way to set up LDAP on OSX 10.4 client?

    I am already running Apache and Postfix servers from my 10.4.4 client machine, and would also like to be able to use LDAP on here as well. Everything I have found in my searches has said it comes with OSX Server, and how to configure it on the server

  • To : Oracle Team.. xmldom.writetoclob is too slow

    HI; I had Oracle 8.1.6, Used the xmldom package a lot to manipulate and create xml documents ( all sizes ). then I used xmldom.writetoclob which it was giving a GREAT performance. I UPGRADED ti Oracle 8.1.7 and xmldom.writetoclob is TOO SLOW now, I h

  • Display Custom columns in Project dashboard

    Hello All, We have a few custom fields at the project definition level. All our custom fields at project definition level are created using "custom tables" and we are handling the custom fields in a sub-system as well. By going through SAP notes and

  • Garbage added to log while sending message to Weblogic JMS topic

    Hi All, Was able to sucessfully send messages to Weblogic JMS topic and also able recieve them. But while sending the messages to topic loy of debug statements are printed to the standard output This is seen only in production and not in developement

  • UWL Task List problem.

    Hi Exports, I am facing UWL iview task tab is  not visible , mean while  work items also not coming from backend sytem ... Regards, vreddy