Graphics thype casting

Hello Everyone,
I am trying to combine 2 of my programs by creating an instance of each. one of them extends applet directly; the other extends applet as follows Applet <-- AnimationApplet <-- DBAnimation applet. I need to combine both under applet. please help. AnimationApplet uses start, stop and run methods for any animated applet usage, and DBAnimatioApplet uses 2D graphics. I need to know if i can conver Graphics2D g2d to Graphics g and how.
thanks,
Shree

since graphics2d is a subtype of graphics, u can do g = g2d

Similar Messages

  • Accessing graphics object?

    Hi,
    I was wondering, is the only place the graphics object relevent inside the paintComponent method?
    I'm asking because I have a method that draws a custom progress bar. I have another method that draws that progress bar filling up over a arbitrary period of time. I want to use Thread.sleep() to provide a delay between redraws.
    Now I have the first method inside the paintComponent() method of a JPanel. Thats fine, works great! Now I didn't want to put the redraw method inside the paintComponent because the Thread delay will manifest itself in the painting of the component. So I thought I could solve this by making the second method a public one and using the getGraphics() method of the JPanel call the method once the object is instantiated. However this gives me a NullPointerException as soon as the method calls on the graphics object. Any ideas where I'm going wrong? Thanks!
    Method inside extended JPanel object
    public void testRun(Graphics g)
            // Cast to Graphics2D
            Graphics2D g2 = (Graphics2D)g;
            while(percentComplete < 100)
                try {
                    Thread.sleep(30);
                } catch (java.lang.InterruptedException ie) {
                    System.err.println("We got a problem");
                drawProgressBar(g2,percentComplete);
                percentComplete += 1;+
    +        }+
    +        percentComplete+ = 1;
            drawProgressBar(g2,percentComplete); // contains a repaint() method call to object
        }This inside the method of another object
    private void setupContentPanel()
            cpb = new CustomProgressBar();
            mainWindow.add(pb, BorderLayout.CENTER);
            cpb.testRun( pb.getGraphics() );
        }

    No, don't use update(...), that's not at all what the method is for. Also, avoid getGraphics() like the plague.
    What you need to do is increment an instance field using a Swing Timer, and invoke repaint(). The paintComponent override should use the current value of the instance field for appropriate painting. Example:import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    public class PseudoProgressBar {
       int progress = 0;
       JPanel panel= new JPanel() {
             @Override
             protected void paintComponent(Graphics g) {
                super.paintComponent(g);
                g.setColor(Color.BLUE);
                int w = getWidth();
                int h = getHeight();
                g.fillRect(0, h/2-10, (w * progress)/100, 20);
       public static void main(String[] args) {
          SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
                new PseudoProgressBar().makeUI();
       public void makeUI() {
          JFrame frame = new JFrame();
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setSize(400, 100);
          frame.setContentPane(panel);
          frame.setLocationRelativeTo(null);
          frame.setVisible(true);
          new Timer(100, new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                progress %= 100;
                progress++;
                panel.repaint();
          }).start();
    }db

  • Rotate Graphics object

    I need to implement rotation on graphics objects in a project that does NOT used graphics2d. Changing the code so that it does not use Graphics but Graphics2D would take a really long time. Is there a way to cast from one type of object to the other or is there some fast way to convert the code?

    I am not sure what you are asking for. Are you saying that the Graphics object that you have been using so far in your project is not an instance of Graphics2D, i.e., if your Graphics object is g then
    g instanceof Graphics2D evaluates to false?
    I don't even know how to get an such an instance, so in that case I may not be able to help you. All Graphics objects that I have encountered are instances of Graphics2D although references to this object may have been declared as Graphics. If that is also the case for your Graphics object, then all you need to do is to declare a new Graphics2D reference and set it to point to your Graphics object cast into Graphics2D (which is one line of code, which I showed you earlier). Then you could rename all usages of the old reference to the new reference (if you are using an IDE, then chances are that it will have refactoring support that will make this easy).
    *Actually, you do not need to rename all usages, only those usages where you call a method that is not in Graphics.*
    I don't think you need to convert any of you shapes. I don't understand what you mean by converting shapes to 2D shapes.
    Edited by: James_Vagabond on Jan 3, 2008 9:12 AM

  • Abstract Graphics class ???ques???

    Referring to the abstract methods within this class such as drawPolyline and drawPolygon, etc . . . it says in the documentation for Class Graphics:
    "The Graphics class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images."
    There are no sub-class method overrides for drawPolyline and drawPolygon, for example, except for those in subclass Class DebugGraphics, which in turn call Graphics.drawPolyline and Graphics.drawPolygon - for example - at the end of the method implimentation anyway.
    And besides, DebugGraphics is a swing class, and I would not be importing it in a strictly AWT application anyway.
    So where is the actual code for these methods is what I am wondering?
    Thanks;
    ~Bill

    The Graphics class is subclassed in JVM specific classes since rendering
    graphics on different machines is going to be done differently (this
    was discussed recently). So to use these methods find a suitable object
    (like an image already loaded) and call getGraphics on it. This will
    return a Graphics object cast from the JVM specific graphics subclass...
    Steve

  • Need help with Java applet, might need NetBeans URL

    I posted the below question. It was never answered, only I was told to post to the NetBeans help forum. Yet I don't see any such forum on this site. Can someone tell me where the NetBeans help forum is located (URL).
    Here is my original question:
    I have some Java source code from a book that I want to compile. The name of the file is HashTest.java. In order to compile and run this Java program I created a project in the NetBeans IDE named javaapplication16, and I created a class named HashTest. Once the project was created, I cut and pasted the below source code into my java file that was default created for HashTest.java.
    Now I can compile and build the project with no errors, but when I try and run it, I get a dialog box that says the following below (Ignore the [...])
    [..................Dialog Box......................................]
    Hash Test class wasn't found in JavaApplication16 project
    Select the main class:
    <No main classes found>
    [..................Dialog Box......................................]
    Does anyone know what the problem is here? Why won't the project run?
    // Here is the source code: *****************************************************************************************************
    import java.applet.*;
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.event.*;
    import java.util.*;
    public class HashTest extends Applet implements ItemListener
    // public static void main(String[] args) {
    // Hashtable to add tile images
    private Hashtable imageTable;
    // a Choice of the various tile images
    private Choice selections;
    // assume tiles will have the same width and height; this represents
    // both a tile's width and height
    private int imageSize;
    // filename description of our images
    private final String[] filenames = { "cement.gif", "dirt.gif", "grass.gif",
    "pebbles.gif", "stone.gif", "water.gif" };
    // initializes the Applet
    public void init()
    int n = filenames.length;
    // create a new Hashtable with n members
    imageTable = new Hashtable(n);
    // create the Choice
    selections = new Choice();
    // create a Panel to add our choice at the bottom of the window
    Panel p = new Panel();
    p.add(selections, BorderLayout.SOUTH);
    p.setBackground(Color.RED);
    // add the Choice to the applet and register the ItemListener
    setLayout(new BorderLayout());
    add(p, BorderLayout.SOUTH);
    selections.addItemListener(this);
    // allocate memory for the images and load 'em in
    for(int i = 0; i < n; i++)
    Image img = getImage(getCodeBase(), filenames);
    while(img.getWidth(this) < 0);
    // add the image to the Hashtable and the Choice
    imageTable.put(filenames[i], img);
    selections.add(filenames[i]);
    // set the imageSize field
    if(i == 0)
    imageSize = img.getWidth(this);
    } // init
    // tiles the currently selected tile image within the Applet
    public void paint(Graphics g)
    // cast the sent Graphics context to get a usable Graphics2D object
    Graphics2D g2d = (Graphics2D)g;
    // save the Applet's width and height
    int width = getSize().width;
    int height = getSize().height;
    // create an AffineTransform to place tile images
    AffineTransform at = new AffineTransform();
    // get the currently selected tile image
    Image currImage = (Image)imageTable.get(selections.getSelectedItem());
    // tile the image throughout the Applet
    int y = 0;
    while(y < height)
    int x = 0;
    while(x < width)
    at.setToTranslation(x, y);
    // draw the image
    g2d.drawImage(currImage, at, this);
    x += imageSize;
    y += imageSize;
    } // paint
    // called when the tile image Choice is changed
    public void itemStateChanged(ItemEvent e)
    // our drop box has changed-- redraw the scene
    repaint();
    } // HashTest

    BigDaddyLoveHandles wrote:
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    That wasn't attention-grabbing enough apparantly. Let's try it again.
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}

  • I need some advanced help regarding AE and PPRO workflow

    Hi all.
    I have a problem and require a solution. I am creating a video that has cellphone/IM chat graphics, animated in After Effects. The problem is the layering.
    In PPRO, the layers are as follows on the timeline.
    Top layer: Chat Graphics
    Middle Layer: Adjustment layer with colour grade effects
    Bottom Layer: Footage
    Now the issue I am having is that I need the chat graphics to cast a Gaussian Blur underneath them (the graphics are at 80% opacity) - and I have successfully done this using the AE Adjustment Layer switch, however since the graphics are in AE, and the footage is in Premiere, they blur does not appear. In other words, the graphics in AE are set to blur the layer below itself IN AE, but the footage layer below is IN PPRO.
    So... one might think that the obvious solution is to layer it all in AE, using the Replace with AE Composition option in PPRO. However, this means that the adjustment layer for the grade will affect the chat graphics which need to be consistent.
    Help...

    Just to report back - The Track Matte Key effect worked like a charm.
    Just had to create two extra layers in PPro.
    One duplicate layer of blurred footage. One duplicate layer of graphics to become the matte, on top of the footage layer.
    The effect of Gaussian Blur and Track Matte Key was applied on the footage layer.
    Thanks again Richard

  • Dynamic image loading in a JPanel

    Hi,
    I've created a JFrame which includes a JPanel and would like to dynamically add images to the JPanel (for a space invaders game). I've been getting the JPanel graphics object casting to Graphics2D and then passing it to the Actor class constructor where the sprite is loaded as a BufferedImage and then called drawImage on the Graphics object but the sprite does not display. It's been suggested that I need to use a new JPanel for every sprite that gets loaded, but this would seem to be less efficient.
    public class NewJFrame extends javax.swing.JFrame {
        public static NewJFrame root;
        public NewJFrame() {
            initComponents();
            root = this;
           Graphics2D g = (Graphics2D) jPanel1.getGraphics(); 
           new Actor(g);
    public class Actor {
        public Actor(Graphics g){
            try {
            BufferedImage sprite = ImageIO.read(new File("/Users/administrator/Desktop/image.jpg"));
            g.drawImage(sprite, 0, 0, null);
            } catch (IOException e) { System.out.println(e);}
        }Thanks

    The problem with doing it this way if I understand correctly is that if I overload the paintComponent method of the panel I'm trying to draw on this will be static i.e. you can't pass parameters (such as a the url of the graphic to load or number of graphics to load) to the paintComponent method (it only accept Graphics g as a parameter). In other words the panel can only be drawn on once.

  • Draw line with Gradient

    Hi,
    I am trying to implement drawing on canvas with two colors, red and blue.
    For example, to draw with the mouse "with two colors".
    I do not need a filled rectangle.
    I am looking into gradient but without any success.
    Is there a better way to draw a line with two colors?
    I also tried to use BasicStroke, but the line had an inner/outer strokes.
    Please help with suggestions.

    devboris wrote:
    ..For example, to draw with the mouse "with two colors".
    import java.awt.*;
    import javax.swing.*;
    class GradientLine {
        public static void main(String[] args) {
            GradientPanel gp = new GradientPanel();
            gp.setPreferredSize( new Dimension(600,400) );
            JOptionPane.showMessageDialog(null, gp);
    class GradientPanel extends JPanel {
        public void paintComponent(Graphics g) {
            // cast the Graphics objkect to a Graphics2D object
            // (G2D includes setPaint() method)
            Graphics2D g2 = (Graphics2D)g;
            GradientPaint bgPaint = new GradientPaint(
                0,
                0,
                Color.black,
                getWidth(),
                getHeight(),
                Color.white );
            g2.setPaint(bgPaint);
            g2.fillRect( 0, 0, getWidth(), getHeight() );
            GradientPaint fgPaint = new GradientPaint(
                0,
                0,
                Color.yellow,
                getWidth(),
                getHeight(),
                Color.red );
            // set the paint to a gradient.
            g2.setPaint(fgPaint);
            for (int ii=0; ii<getWidth()/10; ii++) {
                g2.drawLine( ii*10, 0, ii*10, getHeight() );
            for (int ii=0; ii<getHeight()/10; ii++) {
                g2.drawLine( 0, ii*15, getWidth(), ii*15 );
    }

  • Casting Graphics to Graphics2D objects

    It is declared in the API that the class Graphics2D extends from Graphics class. In an example given in the tutorials on java.sun.com, i came accross a code that is as follows:
    public void paint(Graphics g) {
    Graphics2D g2 = (Graphics2D) g;
    Can anyone explain how? what i learnt is that casting to a Sub class from a Base clase is not legal.
    thanks in advance,
    vanchinathan

    it's like
    Object obj=new Object();
    String str=(String)obj;
    you can't do that in java ? try to compile this
    code;
    HimerusYes you can, you simply get a ClassCastException at runtime.
    The reason it is valid to cast from Graphics to Graphics2D, is because Sun have said that all Graphics objects returned by the API in Java 1.2 or above will be a subclass of Graphics2D.

  • The Crew –Racing with Your Coolest MSI Gaming Motherboard and Graphics Card

    Most gaming fans are crazy about racing games, and there is a new game title just launched to fulfill gamers’ dream. We want to share with you the experience from Taiwan user who assembles a rig with a brand new MSI Z97 Gaming 5 motherboard and 960 graphics card, along with a hardware and game (The Crew) benchmarks. You may find the original article from:
    https://forum-tc.msi.com/index.php?topic=113352.0
    The Crew - Launch Trailer
    PC configuration:
    CPU: Intel i5-4670K
    RAM: Avexir DDR3-1600 8G*2
    VGA: MSI GTX960 GAMING 2G
    SSD: Kingston HyberX 3K SSD 240G
    CPU Cooler: SilverStone AR01
    The MSI Z97 Gaming 5 motherboard box
    Overview of the motherboard: Black and Red color scheme, it’s also the favorite color combination from MSI’s user reservation.
    The PCI-E slots and bandwidth are enough for a two-way SLI setting.
    Killer Ethernet, outstanding performance on internet access, especially reduce the lag issue.
    The new arrival MSI GTX960 GAMING 2G graphics card
    New cooling design: ZeroFrozr
    The dragon symbol on LED panel
    With MSI Gaming series motherboard plus graphics card, you can enable a Gaming App to overclock CPU and GPU. There are 3 modes to choose.
    6-month free trail of the XSplit game caster software, free bundled with MSI gaming motherboard and graphics card
    Done with assembling, quiet nice color combination and clean cable arrangement.
    An overview of the very gaming look system.
    Some benchmark results before racing with The Crew.
    CPU and GPU info on CPU-Z and GPU-Z applications:
    3DMark Fire Strike score: 6441
    3DMark Fire Strike Extreme score: 3384
    3DMark Fire Strike Ultra score:1262
    The excel performance proof the brand new 960 graphics card comes with good a high Cost/Performance Value.
    Now, check out this test benchmark score of the renowned game “The Crew”.
    The game presents an ultra-quality display, 60 Frames Per Second (FPS)
    FPS: Average frames is at:
    Frames: 3859 - Time: 76828ms - Avg: 50.229 - Min: 43 - Max: 56
    The comments of the game for your reference:
    There are many types of missions that can be chosen from the America’s map.
    Street racing, high-speed collision, breakaway from police, sky jumps, zigzagging, etc… make the game quite dynamic.
    Now, when it comes to multi-player matches, the performance has exceeded expectations. Perhaps, it is the killer Ethernet that’s working the magic. Thus, this game is highly recommended if you have the right rig.
    The downside is that the display intricacy is not as refined as GTA V and in addition, the game FPS is limited at 60 FPS. However, the overall gaming flow and performance is better than good.
    The user's comment for using MSI Gaming 5 motherboard and 960 graphics card:
    (The following commends are translated from user’s article, does not represent the viewpoint of MSI) ^^
    Recently, MSI GTX 960 just launched so the initial price tag is still adjustable.
    According to the current product line, it seems like this GPU is going to replace 750Ti. So once all the stocks (750Ti) at the store empties, we are most likely to see a price drop on GTX960.
    Once the price hits the sweet spot, it’s time to try out GTX960 SLI’s performance.
    The CP value on MSI GTX960 and GAMING 5 MB is pretty high. But the XSplit software that comes with the product is a bit annoying since the authentication steps are divided into 2 parts to go through for using it.     
    Enough said, anyways, GAME ON!

    NVIDIA 960 card  + GAMING 5 motherboard = best bundle for budget gaming!
    it would be nice to see more testing of hardware-demanding games!

  • Why the graphics doesn't show on screen?

    I wrote the code using AWT to draw an Arc2D to window after received input numbers but it draws nothing to screen. I tried to debug and found nothing. Can someone help me on this?
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    public class PieChart extends JFrame implements ActionListener
    private JPanel inputP;
    private DrawPanel drawP;
    private JLabel instruct, prompt1, prompt2, prompt3, prompt4; //all prompt labels
    private JTextField num1, num2, num3, num4; //input text field
    int value1, value2, value3, value4, total;
    //Graphics2D g2d;
    public PieChart()
    super( "Drawing 2D PieChart" );
    Container c = getContentPane();
    c.setLayout(new FlowLayout());
         inputP = new JPanel();
    inputP.setLayout(new GridLayout(4,2));
                                                                                    //initial text prompts
    instruct = new JLabel("Enter the number at each prompt and press enter");
         prompt1 = new JLabel("First Number:");
    prompt2 = new JLabel("Second Number:");
         prompt3 = new JLabel("Third Number:");
    prompt4 = new JLabel("Fourth Number:");
                                                                                    //initial input fields
    num1 = new JTextField(5);
         num1.addActionListener(this);
         num2 = new JTextField(5);
         num2.addActionListener(this);
         num3 = new JTextField(5);
         num3.addActionListener(this);
         num4 = new JTextField(5);
         num4.addActionListener(this);
         inputP.add(prompt1);
         inputP.add(num1);
         inputP.add(prompt2);
         inputP.add(num2);
         inputP.add(prompt3);
         inputP.add(num3);
         inputP.add(prompt4);
         inputP.add(num4);
         c.add(inputP, BorderLayout.NORTH);
    drawP = new DrawPanel(350,180);
    drawP.add(instruct);
    c.add(drawP, BorderLayout.CENTER);
    setSize( 350, 560 );
    show();
    public void actionPerformed(ActionEvent e)
              String getInput;
              if(e.getSource() == num1)
                   getInput = num1.getText();
                   value1 = Integer.parseInt(getInput);
    num2.grabFocus();
              if(e.getSource() == num2)
                   getInput = num2.getText();
                   value2 = Integer.parseInt(getInput);
    num3.grabFocus();
              if(e.getSource() == num3)
                   getInput = num3.getText();
                   value3 = Integer.parseInt(getInput);
                   num4.grabFocus();
              if(e.getSource() == num4)
                   getInput = num4.getText();
                   value4 = Integer.parseInt(getInput);
                   drawP.setPie(value1, value2, value3,value4);
    The main function will generate the new PieChart object and Overridden so we can exit when window is closed.*********************/
    public static void main( String args[] )
    PieChart app = new PieChart();
    app.addWindowListener(
    new WindowAdapter() {
    public void windowClosing( WindowEvent e )
    System.exit( 0 );
    }//endmain
    class DrawPanel extends JPanel {
    //private int currentChoice = -1; // don't draw first time
    private int width = 100, height = 100;
    private int vl1, vl2, vl3, vl4, total ;
    Graphics2D g2d;
    public DrawPanel( int w, int h )
    width = ( w >= 0 ? w : 100 );
    height = ( h >= 0 ? h : 100 );
    public void paintComponent( Graphics g )
    super.paintComponent( g );
    // create 2D by casting g to Graphics2D
    g2d = ( Graphics2D ) g;
    if(total == 0 )
    g2d.setPaint(Color.black);
    g2d.setStroke(new BasicStroke(1.0f));
    g2d.draw(new Arc2D.Double(250,90,80,100,0,360,Arc2D.PIE));
    System.out.print("Done drawing a cirle");
    }else // draw 2D pie-shaped arc in white
    g2d.setPaint( Color.cyan );
    g2d.setStroke( new BasicStroke( 2.0f ) );
    g2d.fill(new Arc2D.Double(120,90,80,100,0,(vl1*360/total),Arc2D.PIE));
    g2d.setPaint( Color.blue );
    g2d.setStroke( new BasicStroke( 2.0f ) );
    g2d.fill(new Arc2D.Double(120,90,80,100,(vl1*360/total),(vl2*360/total),Arc2D.PIE));
    g2d.setPaint( Color.green );
    g2d.setStroke( new BasicStroke( 2.0f ) );
    g2d.fill(new Arc2D.Double(120,90,80,100,(vl2*360/total),(vl3*360/total),Arc2D.PIE));
    g2d.setPaint( Color.red );
    g2d.setStroke( new BasicStroke( 2.0f ) );
    g2d.fill(new Arc2D.Double(120,90,80,100,(vl3*360/total),(vl4*360/total),Arc2D.PIE));
    System.out.print("End of drawing ");
    public void setPie( int v1, int v2, int v3, int v4 )
    total = 0;
    vl1 = v1;
    vl2 = v2;
    vl3 = v3;
    vl4 = v4;
    total = v1 + v2 + v3 + v4;
    System.out.print(v1+ " "+ v2+" "+v3+" "+v4+ " Total value: " + total);
    repaint();
    }

    The first thing I see is the you have declared 'total' in DrawPanel. As it is never set there, you are testing a variable which is always zero.

  • Shockwave player updates: graphics card compatibility problems?

    I've recently had a new problem reported to me in the Driveway Visualiser, a piece of Shockwave 3D content that I've been maintaining since we built it in 2008.  I'm wondering if  recent updates to the Shockwave Plugin (e.g. 11.5.8.612) may be contributing to this...
          www.marshalls.co.uk/transform/driveway_visualiser/dv.asp
    So I'd be interested to know if anyone else has had any new problems affecting old content. I tried reverting the dcr file to last year's version but the same problem still occurs, so it doesn't seem to be a recently-added bug in my code.  I think it could be either a compatibility problem between the graphics card and the plugin, or between the Director 11.0 dcr and the Shockwave 11.5 web player.
    Because we need the DirectImage Xtra, it's Windows only.  For  each different computer that we've tested, the Driveway Visualiser (DV) will either always  work or always fail on that machine - regardless of whether IE or  Firefox is used.  All the test machines have DirectX 9.0c; all are  running Win XP SP3 apart from one laptop with SP2 and Intel 965 chipset  on which the DV fails.  Only one has Director (11.0) installed, and on  that the DV always works.  The problem is much more common on laptops,  so we reckon that Shockwave's ability to interface with the various  graphics cards might be the reason why it's not getting the image  property of a 3D cast member.
    So here's what's actually happening:
    When you get to step 4 of the DV, after you've drawn round the shape of your driveway, it tries to grab the image of a 3D cast member referred to by the  variable gWorldMember, and fails with the "four parameters expected" error message, on  this line of code...
          zoomAfterImage.copyPixels(gWorldMember.image, zoomAfterImage.rect, gWorldMember.image.rect)
    gWorldMember.image is being returned as <image:0> (not a usuable  image) and so its rect property does not exist, hence the crash.  This  line of code crashes whether or not there's a sprite of the relevant 3D  member on the stage at the time.  The member's defaultRect has been  temporarily changed so we can grab a 1024x1024 image off it.  Using  copyPixels, this image is resized down to the size of the zoomAfterImage  image variable (again 450x450).  This gives us an image at the original  size of 450x450, but with a softer image quality than if we'd grabbed  it from the 3D member at that size.
    Is anyone suffering similar problems or aware of what Adobe has been changing in the player?  At the moment I just don't see how I can fix this by changing my code...

    I had wondered if there was a clash between the Director 11.0 dcr and the Shockwave 11.5 player, so I downloaded the Director 11.5 trial and re-published it using that.
    It didn't make any difference, so I'm left with my original suspicion that Shockwave is failing to interface with certain graphics hardware setups via directX, when it tries to read the image property of a 3D cast member.

  • Blueish Cast in 10.8

    I had a interesting thing happen after I upgraded to 10.8, here is the sequence of events:
    I down loaded Mountain lion and upgraded Pages, Keynote & iPhoto. After all where installed I ran iPhoto and I got a blueish cast over the whole screen, I quit iPhoto and the cast disappeared, I then ran Pages and the same this happened, again the same with Keynote. I then ran Photoshop CS6 and the cast appeared at the load screen then disappeared when the application started, unlike Pages, iPhoto and Keynote where the cast stayed on.
    I booted into disc repair run a permissions repair which there where a few things to fix whch the disc repair did. Now I do not seem to be getting the bluish cast.
    Just a note to let others know how things have seemed to sort out for me. I hope this is an iscolated incedent.
    Cheers
    Del

    the problem is for macbook pro 2010 with ssd or 7200 rpm hd installed.
    mountain lion cannot load the discrete graphic driver well and it mistakes when it switch to this using some programs (like chrome, ps, Transmission and so on)
    by now u can just logout and login after every restart to fix this.
    i hope they'll fix it forever in the next update.

  • IMac 2010 Graphic issue?  Can't Figure Out

    Okay.... this week we noticed our 24" iMac might be having graphic issues.
    we have re-paired permission, reset P-RAM and trash preferences.... but still having the same issue.
    we are losing some graphic contrast in the background of each finder or itunes.
    in iTunes or Finder, we used to get a seperation between each line via light blue color and white.
    now it's all white.  i can still see the blue lines if I hover another window over it.  the drop shadow from the foreground window will still cast a line.
    it's hard to explain.... here is a picture of our finder window with another window on top of it.
    noticed the blue and white around the drop shadow area?  all of our windows don't have the blue/white anymore.... what could it be?

    that worked, thank goodness, thanks! not sure why I didn't try that

  • Strange flickering green cast to screen.

    The last I used my Powerbook it seemed to running fine, that was yesterday. This morning I was about to go out and went to unplug it from the AC adapter and noticed the fan running. I thought that was odd since I hadn't been running many apps nor was I asking much of it with heavy graphics. I shut it down and put it away. I booted it and the fan came on right away. As I logged in on my user I noticed green flashes starting to occur, at first they were slight and limited to random parts of the screen. But as those apps in Start Up began to open the flickering became more incessant and covered more of the screen. I powered down and by that point the images on the screen were entirely cast in green.

    You MAY have a GPU issue, you can take it to an Apple Genius for a free diagnosis, they will offer options from there.
    They have the tools and experience as they do all day/everyday, it will cost you nothing to find out, and then find out what it may cost to "make it right"

Maybe you are looking for

  • Print HTML FILE

    Hi all : I save a HTML FILE ,, I want to print this file from labview ,, how can I do that thanks

  • How to use Airplay in Keynote with iPad 1

    The new update for Keynote for iOS (1.5) says that they now added AirPlay support. They didn't say this will only be for iPad2 or iPhone 4S where you could mirror anyway. So: How can I enable Airplay on my iPad1 in Keynote, so that the presentation w

  • Invoking a web service from ODI

    Hi All, I am using the Odi Invoke Web Sevice functionality to inoke a web service(BPEL). I was able to successfully invoke this in couple of environments. The same code deployed in a particular environment is failing at this stage with an error messa

  • Facebook Export issue - session key validity?

    Love the new feature to upload to Facebook/Flickr - however, everything has been working fine until this morning, went to upload a jpg to Facebook and I get the following error message: "Bridge encountered and error while exporting: Session key inval

  • I magnify the screen, then clicked View/Full Screen. Now menu bar is hidden.

    I usually have to magnify web pages to see better. I also clicked View / Full Screen. Now I can only use the keyboard. What are the commands to reverse this ?