[Help]Timeout when going to a new frame!

Hello Community!!! so i searched for something but i can't found anything!!!
so i have a button... and that button when you are pressing it you ar go to an another frame... but when you will press it again it will go back to the first frame!
so cause i have an error with "FadeSymbolIn" code that when you are going to frame and pressing too early the button to go back... the Flash Player 11 show me an error.... and the Alpha on this frame is going to 2 from 1.
so i want when you are pressing the button and going to a new frame to can't press other button so early... but for example to be freezed for 1 second!!! i want something like that!!!
Please help me if you can! i will be very glad for your help! i am new o flash and don't know too much!!! And sorry for my bad English!!!!!

i don't have any problem on swf...
only on Projector i have this error...
i think is a flash player bug!!! not any wrong code on my script! but take a look!!!
TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at FinalVersion_fla::MainTimeline/fl_FadeSymbolIn_18()[FinalVersion_fla.MainTimeline::frame19:160]
the frame doesn't matter... it will be to all the frames if i will press the buttons too quickly...
and the code that gives the error is:
OSRAM_popup.addEventListener(Event.ENTER_FRAME, fl_FadeSymbolIn_18);
OSRAM_popup.alpha = 0;
function fl_FadeSymbolIn_18(event:Event)
          OSRAM_popup.alpha += 0.1;
          if(OSRAM_popup.alpha >= 1)
                    OSRAM_popup.removeEventListener(Event.ENTER_FRAME, fl_FadeSymbolIn_18);
is flash player bug cause on swf file i don't have this error when i press the button too quickly

Similar Messages

  • Line in a JLabel that disappear when adding to a new frame

    Hi,
    I have the main frame (SampleFrame), where I put a JPanel with CardLayout, I want when I click on a button, a new JPanel (SamplePanel) is shown.
    The problem is this new JPanel shows a picture (a line in a JLabel), the poblem is the picture does not appear...
    The code is the following:
    package sample;
    //Main Class
    public class Main {
        public static void main(String[] args) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new SampleFrame().setVisible(true);
    //SampleFrame
    package sample;
    import  javax.swing.JPanel;
    import javax.swing.*;
    import java.awt.*;
    public class SampleFrame extends javax.swing.JFrame {
        private SamplePanel samplePanel;
        private boolean flag;
         /** Creates new form SampleFrame */
        public SampleFrame() {
            initComponents();
            flag=false;
            samplePanel = new SamplePanel();
            jPanel1.add(samplePanel,"sample");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            jPanel1 = new javax.swing.JPanel();
            jButton1 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jPanel1.setLayout(new java.awt.CardLayout());
            jButton1.setText("OK");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(layout.createSequentialGroup()
                            .addContainerGap()
                            .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 189, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(layout.createSequentialGroup()
                            .add(81, 81, 81)
                            .add(jButton1)))
                    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 182, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 19, Short.MAX_VALUE)
                    .add(jButton1)
                    .addContainerGap())
            pack();
        }// </editor-fold>                       
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    // TODO add your handling code here:
            CardLayout cl = (CardLayout)(jPanel1.getLayout());
            cl.show(jPanel1, "sample");
            flag=true;
          /*  this.setVisible(false);
            this.setVisible(true);*/
         public void paint(Graphics g)
            super.paint(g);
            if(flag)samplePanel.ReDraw();
        public void printAll(Graphics g)
            super.printAll( g);
            if(flag)samplePanel.ReDraw();
        // Variables declaration - do not modify                    
        private javax.swing.JButton jButton1;
        private javax.swing.JPanel jPanel1;
        // End of variables declaration                  
    //SamplePanel
    package sample;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class SamplePanel extends javax.swing.JPanel {
        /** Creates new form SamplePanel */
        public SamplePanel() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            jLabel1 = new javax.swing.JLabel();
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
            this.setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        }// </editor-fold>                       
         public void paint(Graphics g)
            super.paint(g);
            ReDraw();
        public void printAll(Graphics g)
            super.printAll( g);
            ReDraw();
        public void ReDraw()
            Graphics g = jLabel1.getGraphics();
            g.drawLine(0,0,100,100);
        // Variables declaration - do not modify                    
        private javax.swing.JLabel jLabel1;
        // End of variables declaration                  
    }I have discovered that with the comment lines in SampleFrame (method jButton1ActionPerformed):
    /*  this.setVisible(false);
    this.setVisible(true);*/works properly, but I dont like this way...
    Can anyone helps me? Thanks ;)

    Hi again crwood!!
    Okay, you're taking the content pane, a Container, from a top�level container (you mentioned a frame, "oldFrame"). And this container contains some JLabels which have lines drawn in them. You want to add this container to a card in a Cardlayout. Okay, so far so good.
    That�s exactly what I want ;).
    So (using your code):
    I have the panel:
    class SP extends JPanel {
        private int x1;
        private int y1;
        private int x2;
        private int y2;
        private Color color;
         private JLabel label;
        public SP(int x1, int y1, int x2, int y2, Color c) {
            this.x1 = x1;
            this.y1 = y1;
            this.x2 = x2;
            this.y2 = y2;
            color = c;
            setLayout(new BorderLayout());
            label =new JLabel();
            add(label);
        protected void paintComponent(Graphics g) {
                    super.paintComponent(g);
              label.getGraphics().setColor(color);
              label.getGraphics().drawLine(x1, y1, x2, y2);
        public Dimension getPreferredSize() {
            return new Dimension(300, 200);
    }And the main frame:
    public class SF extends JFrame {
        private JPanel jPanel1;
        public SF() {
            // Initialize components.
            jPanel1 = new JPanel(new CardLayout());
            jPanel1.add(new SP(10,10,100,100,Color.red), "sample 1");
            jPanel1.add(new SP(50,150,200,50,Color.blue), "sample 2");
            JButton jButton1 = new JButton("OK");
            jButton1.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    CardLayout cl = (CardLayout)(jPanel1.getLayout());
                    cl.next(jPanel1);
            JPanel south = new JPanel();
            south.add(jButton1);
            // Configuration and assemble JFrame.
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            add(jPanel1);   // Default center section.
            add(south, "Last");
            pack();
            setLocation(200,200);
            setVisible(true);
        public static void main(String[] args) {
            new SF();
    }The problem is I cant see the black line...
    (I am able to see it by moving the window until hide part of it)

  • Gallery wont exit when I enter a new frame

    I have an external Gallery that is called within my fla file. My problem is that every time I try to go to my home page or any other page for that matter the gallery doesn't go away. I can access my other pages "frames" and everything works fine, but my gallery blocks some of the page. How can I exit out of my gallery when I go to another page??

    well i have my gallery set to be removed at event, CLICK.. but when I hit one of my buttons to change frames, it doesn't register as a click and leaves the main gallery image on, PERMANENTLY.
    this is my .as file
    package {
    import flash.display.Loader;
    import flash.display.Sprite;
    import flash.display.Bitmap;
    import fl.transitions.Tween;
    import fl.transitions.TweenEvent;
    import fl.transitions.easing.*;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.net.URLRequest;
    public class createThumb extends Sprite {
    private var arraytween:Array = new Array();
    private var thumb_loader:Loader;
    private var photo_loader:Loader;
    private var thumb_url:String;
    private var photo_url:String;
    private var thumb_bit:Bitmap;
    private var photo_bit:Bitmap;
    private var mother:Sprite;
    private var thumb_btn:Sprite;
    public function createThumb(childof:Sprite,thumburl:String,photourl:String) {
    mother=childof;
    thumb_url=thumburl;
    photo_url=photourl;
    loadthumb();
    private function loadthumb():void {
    thumb_loader = new Loader();
    thumb_loader.load(new URLRequest(thumb_url));
    thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,displaythumb);
    private function displaythumb(e:Event):void {
    thumb_btn = new Sprite();
    thumb_bit= new Bitmap();
    thumb_btn.y=(stage.stageHeight-thumb_btn.height)/1.25;
    thumb_btn.graphics.beginFill(0x000000,0);
    thumb_btn.graphics.drawRect(0,0,125,125);
    thumb_btn.graphics.endFill();
    thumb_bit=e.target.content as Bitmap;
    thumb_bit.y=(stage.stageHeight-thumb_bit.height)/1.045;
    thumb_btn.width=thumb_btn.height=thumb_bit.width=thumb_bit.height=125;
    thumb_bit.smoothing=true;
    addChild(thumb_bit);
    addChild(thumb_btn);
    thumb_btn.addEventListener(MouseEvent.CLICK,loadphoto);
    private function loadphoto(e:Event):void {
    arraytween.push(new Tween(mother,"y",Regular.easeOut,mother.y,0,.5,true));
    photo_loader = new Loader();
    photo_loader.load(new URLRequest(photo_url));
    photo_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,displayphoto);
    private function displayphoto(e:Event):void {
    stage.addEventListener(MouseEvent.CLICK,closephoto);
    photo_bit= new Bitmap();
    photo_bit=e.target.content as Bitmap;
    photo_bit.smoothing=true;
    photo_bit.x=(192);
    photo_bit.y=(110);
    stage.addChild(photo_bit);
    private function closephoto(e:Event):void {
    arraytween.push(new Tween(mother,"y",Strong.easeOut,mother.y,0,.5,true));
    arraytween[arraytween.length-1].addEventListener(TweenEvent.MOTION_FINISH,cleartween);
    photo_loader.unload();
    if (photo_bit!=null)
    stage.removeChild(photo_bit);
    stage.removeEventListener(MouseEvent.CLICK,closephoto);
    private function cleartween(e:TweenEvent):void
    arraytween=[];

  • Can I keep my audio bin files when going to a new project?

    I bounced all my midi tracks and they are in the audio bin. Now I want to starting mixing them so I started a new project and hoped that the bin would still contain the audio bounces, but it is not. Is it possible to keep in them in the bin while starting a new project?

    Just "save as" w/a different name & scrap all the midi tracks (same audio bin is there) & start your new song (An old old indian trick)

  • Redeemed cards notice when going to activate new card

    my son received a $25 itunes cards for xmas and when he went to redeem it they said it was already redeemed, what can we do about this amd is there a way to find out when it was redeemed and to what account?

    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    Note: iTunes Gift Cards are only Valid in Country of issue

  • After 6 buttons are pressed jump to a new frame

    I have made a spot the differece game as you may have seen in
    another post. I have all the invisble buttons on one frame. When
    the button is pressed it reveals a correct answer, that button also
    then becomes inactive so you can not turn the answer off.
    I have 6 buttons in total btn1 - btn6
    How do I write the code so that after all the buttons have
    been pressed it jumps to a finsihing frame.
    I am also working flash 7 mx2004
    someone suggested the below but I'm sure how it works
    Create a root variable, _root.buttons_pressed = 0;
    Then, in each button onDown actionscript,
    _root.buttons_pressed++;
    Finally, you'll want to reset the counter when you enter the
    new frame,
    again setting _root.buttons_pressed = 0;
    Thanks in advance.
    Foo
    Text

    Hi foowoo,
    I may be wrong but aren't variables accessible throughout a
    timeline?
    If so then my suggestion would be to set up a variable in the
    first frame and, like suggested, have it increment with each button
    pressed (that is then disabled so it doesn't count up again) in the
    frame where the game is. If my theory is right then there's no need
    to reference _root. as it is all in the same timeline, just call
    the variable something like gameCounter and use that.
    Then I'd have a If gameCounter == 6 function which then does
    the resetting of the variable to 0 and sends the user to the
    finishing frame.
    Cheers
    kol

  • When I download the new itunes (on my pc); going through the dowload process it stop me and a window pops up and it says: (there is a problem with this windows installer package. A program required for this install to complete could not be run.) Help

    when I download the new itunes (on my pc); going through the dowload process it stop me and a window pops up and it says: (there is a problem with this windows installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor.)
    I have tried several times to redownload and keep getting the same message. what am I doing wrong...

    Let's try the following user tip with that one:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • When is new frame rate for HD projects?

    Cyberbretheren...
    Those working in film especially CGI stuff know that there's a new frame rate of 23.976. Any word on when Logic will add this option?
    Pro Tools already has, nudge nudge wink wink....
    A
    G5 dual 2.5   Mac OS X (10.3.9)   Stylus AND my original Minimoog. Lots of MOTU. No more Digi.

    Yeah, "24 drop frame". I asked the Logic reps at last years' NAMM show if this was going to be added to the next version of Logic, but I got the ol' blank stare -- they had never heard of it! Hopefully by now they have. I agree, this new frame rate needs to be added. Glad you brought this up!

  • I uploaded that new IOS 8.0 and now I cannot open my mail, Safari, or the new "TIPS" app. Does Apple have some sort of help, other than going to a store that is over 40 miles away?

    I uploaded that new IOS 8.0 and now I cannot open my mail, Safari, or the new "TIPS" app. Does Apple have some sort of help, other than going to a store that is over 40 miles away?

    Purplehiddledog wrote:
    I do backup with iCloud.  I can't wait until the new iMac is available so that I can once again have my files in more than 1 location without needing to rely solely on the cloud. 
    I also rely on iTunes and my MacBook and Time Machine as well as backing up to iCloud. I know many users know have gone totally PC free, but I chose to use iCloud merely as my third backup.
    I assume that the restore would result in my ability to open Pages and Numbers and fix the problem with deleting apps, but this would also mean that if my Numbers documents still exist solely within the app and are just not on iCloud for some reason that they would be gone forever.  Is that right?
    In a word, yes. In a little more detail.... When you restore from an iCloud backup, you must erase the device and start all over again. There is no other way to access the backup in iCloud without erasing the device. Consequently, you are starting all over again. Therefore, it would also be my assumption that Pages and Numbers will work again and that the deleting apps issues would be fixed as well.
    If the documents are not in the backup, and you do not have a backup elsewhere, the documents could be gone forever.

  • How to clear the stage when entering a new frame

    Dear all,
    I am making my first website in flash based on frames. When you go to an other frame the Stage fades out. When you enter the frame you see nothing at all. So how can I clear the stage when entering the frame or even better it fades into the frame with clearing the objects & code of the previous frame.
    Hope somebody can help me with this!
    /*buttons naar frames*/ homehome.mouseChildren = false; homehome.buttonMode = true; homehome.addEventListener(MouseEvent.CLICK, actie5); homehome.addEventListener(MouseEvent.ROLL_OVER, actie5); homehome.addEventListener(MouseEvent.ROLL_OUT, actie5); var fadetimer:Timer; var st:MovieClip = new MovieClip(); function actie5(event:MouseEvent):void {   //klikken if(event.type == "click"){ st.graphics.beginFill(0xFFFFFF); //Choose your color to fade.         st.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);         st.graphics.endFill();         st.alpha = 0;         stage.addChild(st);         fadetimer = new Timer(100);         fadetimer.addEventListener(TimerEvent.TIMER, fadeStage);         fadetimer.start(); }   //roll over   if(event.type == "rollOver"){     infohome.text = "je staat op de knop";   }   //roll off   if(event.type == "rollOut"){     infohome.text = "";   } } function fadeStage(te:TimerEvent):void {     if (st.alpha < 1) {         st.alpha += 0.05;     } else {         fadetimer.stop();         fadetimer.removeEventListener(TimerEvent.TIMER, fadeStage);         gotoAndStop(7);     } }
    Thanks a lot for your time

    sorry can't get the code working properly onwith the html code function. Sorry for that

  • I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    Hold down the Option key while you boot your Mac. Then, it should show you a selection of devices. Click your flash drive and it will boot from that.

  • I have started using Roboform Lite 2.0.0, after Roboform it takes to much time to open Firefox and when i open a new tab, until the tab is fully loaded, Firefox is not responding. Please help.

    After installing Roboform 2.0.0;
    Starting Firefox started to take too much time.
    When i open a new tab, until the tab is fully loaded and Roboform realizes which website it is, Firefox does not respond.
    When i tell Roboform to fill the username and password fields in a tab, until Roboform submits Firefox does not respond.
    I mean, as if Roboform is not working background and Firefox cannot work multithread because of it. When i navigate from one tab to another, Roboform is also checking the tab and meanwhile Firefox is waiting for Roboform to finish its work.
    Please help me about this problem.
    Regards
    İlhan Tanrıverdi ([email protected])

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Please help i am going off my mind when i connect my iphone 4 to my mac it tells me it can not be used because it requires 10.6.3 or later my mac is operating on 10.6.8 and my itunes is 10 .5 yet the iphone does not even show up in devices please help

    please help i am going off my mind since i updated my iphone 4 when i go to sync it tells me it can not be used as it requires 10.6.3 or higher
    my mac is running on 10.6.8 and i upgraded my itunes to 10.5 everything seems to be in place but the phone is not even being recognised in
    devices although it does come up in iphoto if anybody can help i would be very grateful.

    You have answered your own question:
    "requires 10.6.3 or higher"
    " i upgraded my itunes to 10.5 "
    You need itunes 10.6.3 or later.

  • Apex 3.0 Q: "Optional Label with Help" default when creating new form?

    When I create a new application, usually one of the first things I do is set the default item label to "Optional", so I don't have the annoying popup help link.
    Now, when you create a new Form region, based on a table, for all the items the label is set to "Optional label with help". Am I right in hoping this is something that was overlooked when developing Apex, and that it will be fixed in version 3.0, so that it sets the items to the default label as set in the Shared Components?
    And is there a way to change the labels for a lot of items at the same time, other than changing the theme templates?

    AFAIK, label help in default manner is based on column coments of a table.
    Later there is now way to easy reedit these values but manually...

  • In Options -- General -- I want the option to "Show my windows and tabs from last time" AND "Show my homepage", but that choice isn't given. When I open a new tab, I'd like to see my iGoogle page, not a blank screen. Hope you can help. D

    In Options --> General --> I want the option to "Show my windows and tabs from last time" '''''AND''''' "Show my homepage", but that choice isn't given. When I open a new tab, I'd like to see my iGoogle page, not a blank screen. Hope you can help. D

    You can middle-click or Ctrl left-click the Home button on the Navigation toolbar to open the Home page in a new tab.
    You can look at one of these extensions:
    * NewTabURL : https://addons.mozilla.org/firefox/addon/newtaburl/
    * New Tab Homepage : https://addons.mozilla.org/firefox/addon/new-tab-homepage/

Maybe you are looking for

  • Total ink illustrator

    I'd love to open a discussion about ways to work - specifically for print - in illustrator, photoshop and indesign. I currently use photoshop for photography, illustrator for advert design and indesign for layout.  The problem I've got is that illust

  • Unable to set HDD passwords for Qosmio G30

    I have tried in vain to find documentation on how to do this -- using the F2 method to access these bios options never works, I have tried using config assist / password utility and can find no options. I have upgraded the bios to 1.70 Does anyone kn

  • SNP heuristics and optimiser using transport lane validity dates

    I am using APO SNP 5.1. In particular I am trying to use the SNP heuristics and optimiser for supply planning. Can anyone confirm whether transport lane validity dates are respected by (a) SNP heuristics and (b) SNP optimiser, ie no transport requisi

  • Enable disable screen elements..

    hi, at runtime, say for e.g. i want to enable or disable screen elements, like text boxes. also i want to check/uncheck the checkbox..what r the statements ? where do i get the list of properties of the screen elements that i can set/reset ? thks

  • Semaphore timeout expir

    My muvo tx fm player suddenly stopped working and I? plugged it in in recovery mode and I keep getting? up to the formating part and then it stiops and says semaphore timeout expired. I've been searching these boards for a while for a solution but no