Resizing application causes createContentPane to dispatch second Event.REMOVED_FROM_STAGE

My application relies heavily on the addedToStage and removedFromStage events. Yesterday, I hit a rather obscure edge case with these events, described here by an Adobe engineer:
http://blogs.adobe.com/pmartin/2010/03/use_of_stage_ev.html
I used the workaround described in the article where I create a contentPane in createChildren(). However, I find that despite this, when I resize my application window, the same Container throws a removedFromStage event from Container::createContentPane(). The code for that method checks for the existence of a contentPane, so I'm not sure why this is happening. I know that my contentPane is being created because I see the contentPane property change after the createContentPane() call.I'm attaching the code for that call below.
     *  @private
    mx_internal function createContentPane():void
        if (contentPane)
            return;
        creatingContentPane = true;
        // Reparent the children.  Get the number before we create contentPane
        // because that changes logic of how many children we have
        var n:int = numChildren;
        var newPane:Sprite = new FlexSprite();
        newPane.name = "contentPane";
        // Place content pane above border and background image but below
        // all other chrome.
        var childIndex:int;
        if (border)
            childIndex = rawChildren.getChildIndex(DisplayObject(border)) + 1;
            if (border is IRectangularBorder && IRectangularBorder(border).hasBackgroundImage)
                childIndex++;
        else
            childIndex = 0;
        rawChildren.addChildAt(newPane, childIndex);
        for (var i:int = 0; i < n; i++)
            // use super because contentPane now exists and messes up getChildAt();
            var child:IUIComponent =
                IUIComponent(super.getChildAt(_firstChildIndex));
            newPane.addChild(DisplayObject(child));
            child.parentChanged(newPane);
            _numChildren--; // required
        contentPane = newPane;
        creatingContentPane = false
        // UIComponent sets $visible to false. If we don't make it true here,
        // nothing shows up. Making this true should be harmless, as the
        // container itself should be false, and so should all its children.
        contentPane.visible = true;

Nevermind. I was adding the contentPane to the child that was being removed -- it needed to be added to its parent.

Similar Messages

  • How to dispatch an event from the application to the preloader

    HI everyone
                     I've been searching everywhere on the net, and as far as it goes I gotten no answer for this. When the application hit the preinitialize phase, I'm calling the loadStyle method. As you can see I will hold the CreationComplete event until I the swf is ready. What I want to do, is to have a second loading bar in the preloader (no problem here) to show the progress of the swf downloaded, hence the StyleEvent.PROGRESS event. I would like to know how can I dispatch that event to the preloader?
    ///////////////////APPLICATION
                  import mx.events.StyleEvent;
                import mx.styles.StyleManager;
                private function loadStyle():void
                        var eventDispatcher:IEventDispatcher = StyleManager.loadStyleDeclarations("cl/elmelej/mangiare/estilo/estilo.swf");
                        eventDispatcher.addEventListener(StyleEvent.COMPLETE, completeHandler);
                        eventDispatcher.addEventListener(StyleEvent.PROGRESS,progreso);  
                private function completeHandler(event:StyleEvent):void
                        super.initialized = true;
                private function progreso(event:StyleEvent):void
                override public function set initialized(value:Boolean):void
                    // Hold off until the Runtime CSS SWF is done loading.
    ///////////////////////////////////PRELOADER
    virtual public function set preloader(value:Sprite):void
                _preloader = value;
                value.addEventListener(ProgressEvent.PROGRESS, progressHandler);   
                value.addEventListener(Event.COMPLETE, completeHandler);
                value.addEventListener(StyleEvent.PROGRESS, progressHandlerCSS);  
                value.addEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler);
                value.addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);
    As you can see, the preloader is listening to StyleEvent.PROGRESS  events, but I cant dispatch that event to the preloader so that it can react to it. I hope you can help me. Thanks for your time and help
    Sebastián

    Alex,
             Thank you very much for the fast answer, but I'm not an advanced programmer in Flex, so I would need a bit more help from you. I wouldlike you to tell me if it is possible to do what I want to do? and could you be more specific n the information you gave me please?
    I think you mean something like this:
    private function progreso(event:StyleEvent):void
                  (this.systemManager.getChildAt(systemManager.numChildren) as Preloader).getChildAt(XXXXXXXX).dispatchEvent(event)
    /////////////////////// (this.systemManager.getChildAt(systemManager.numChildren) as Preloader)) -------->gets the preloader 
    ///////////////////////(this.systemManager.getChildAt(systemManager.numChildren) as Preloader).getChildAt(XXXXXXXX)     -------------> would get the progressbar (only If I have XXXXXvalue)      
    let me tell you that the method that I posted on the last message was a part of this class:
         public class PreloaderDisplayBase extends Sprite implements IPreloaderDisplay
    PreloaderDisplayBase is my Preloader.
    I hope you can help me.
    Thanks Again
    Sebastián Toro O

  • How to dispatch an event to the host application?

    Can I create a keyboardEvent and dispatch it to the host application?
    I'm trying to create an onscreen keyboard, so on every mouseUp event, a corresponding keyboardEvent is created and dispatched to the host application.
    Is it even possible to dispatch a keyboard event programatically?

    I can dispatch Keyboard Events programatically, and event listener inside my extension works just fine.
         var evnt:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN, true, false, Keyboard.M);
         this.dispatchEvent(evnt);
    However, the KeyBoardEvent is not propogating up to the host application (Illustrator).
    What do I need to do to send it on to the host application?

  • Dispatching an event from a PDF to AIR?

    I would like to put a button in a PDF using Acrobat, that,
    when clicked, dispatches an event that can be picked up by my
    displaying AIR application. The PDF is being displayed in AIR using
    HTMLLoader in an HTML object.
    Is this possible?

    Try the following. On the first frame of the movieclip place
    the following code.
    // Event Routines //
    var dispatchEvent:Function;
    var addEventListener:Function;
    var removeEventListener:Function;
    mx.events.EventDispatcher.initialize(this);
    Then on the "x" frame of the movieclip, place the following
    code:
    var evt:Object = new Object();
    evt.type = "framereached"; // this can be whatever you wish
    to listen for
    evt.target = this;
    dispatchEvent(evt);
    This is how you would do this in a class and it should work
    just as well if coded directly onto a frame. However, to make this
    more versatile I would place it in a class with a public function,
    for example, name throwEvent(). This public method would then
    execute the above code and could be called from any frame. You
    could even add another item to the evt object that would contain
    the frame the executed the event.
    Tim

  • Find out whether our application caused the memory leak

    whether have the command to find out whether our application caused the memory leak !
    We are using Jdev10g + BC4J + Struts + JSP to build our enterprise application,
    but when the application running some days in our Application Server(RedHat AS3-86, with 4GB RAM), the memory consumed is serious ! we doubt and worry
    about maybe our application suffer the memory leak problem, so we want to know have the command to find out whether our application caused the memory leak
    issue and which program is the major murderer for memory.

    The second scenario is, as we perform some deployment activity on 10g, the memory usage chart shows a sharp consumption of memory about 1.5GB .the loss memory almost be display in "other" legend chart !
    Please give us some advice , thanks in advance

  • Dispatching an event from a command

    Hi,
    In one for my commands in the Cairngorm based application I'm working on I need to dispatch a event to amend the view. In my command I'm amending some value objects in a ArrayCollection, which is the data source for a List component in my view. Once I completed my changes to these value objects I'd like to dispatch a event to resort the ArrayCollection and update my view to the new order.
    What is the best approach for dispatching an event in the command?
    Thanks
    Stephen

    Great question - I'm currently sorting out how to do this myself.  I'm new to Cairngorm but have a decent amount of experience with Flex.  Here are my thoughts:
    Cairngorm promotes decoupling of the data model and front controller/commands from the view - which is appropriate for an MVC framework. Data binding supports this seperation (to an extent) and keeps the view up to date with the model in 'real time'.  Data binding does not however provide an intuitive mechanism for reacting to cairngorm event results.  So here a few solutions I've been tossing around:
    1.  Rely on Built in Flex events such as the datagrid's dataChange event to trigger a reaction.
    2.  Create view state variables in the model that, when changed through the front controller / commands, dispatch custom events from within their VO's / setters / ect.
    3.  Dispatch custom events directly from front controller / commands.
    4.  Create custom (or override existing) item renderers that self-transition / tween when changed as a result of data binding.
    I'm sure there are other ways to do what we want, but I'm out of ideas.  Which approach to take very well depends on how strongly you'd like to adhere to the MVC concept.  Commands that dispatch generic events as their messages may or may not be acceptable to you - but they provide a straitforward way to trigger view related reactions without relying on data binding events.  I'd be interested to know if Cairngorm 3 will address this challenge...
    Let me know what you decide on if and when you make a choice!

  • Help with dispatching JTable event to underlying components in a cell.

    Hello..
    I have a JTable in which i show a panel with clickable labels.. I found that jTable by default doesnt dispatch or allow mouseevents to be caught by underlying elements..
    i need help with dispatching an event from jTable to a label on a panel in a jTable cell.. below is the code i have come up with after finding help with some websites. but i couldnt not get it right.. my dispatched event seems to go back to the jtable itself ..
    any help or suggestion is appreciated..
    Thanks
    'Harish.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.table.*;
    * @author  harish
    public class tableDemo extends javax.swing.JFrame {
        JTable jTable1;
        testpane dummyPane;
        /** Creates new form tableDemo */
        public tableDemo() {
            initComponents();
            //table settings
            String[] columnNames = {"Task", "Action"," "};
            Object[][] data = { };
            DefaultTableModel model = new DefaultTableModel(data, columnNames) {
              // This method returns the Class object of the first
              // cell in specified column in the table model.
            public Class getColumnClass(int mColIndex) {
                int rowIndex = 0;
                Object o = getValueAt(rowIndex, mColIndex);
                if (o == null)
                    return Object.class;
                } else
                    return o.getClass();
            jTable1 = new javax.swing.JTable(model);
            jTable1.addMouseListener(new MouseAdapter(){
              public void mouseClicked(MouseEvent e){
                  System.out.println("Clicked");
                  handleTableMouseEvents(e);
                 //invokeExternalApp("http://www.pixagogo.com");
              public void mouseEntered(MouseEvent e){
                  System.out.println("Entered");
                  //handleTableMouseEvents(e);
              public void mouseExited(MouseEvent e){
                  System.out.println("Exited");
                  //handleTableMouseEvents(e);
            jTable1.setRowHeight(100);
            jTable1.getTableHeader().setReorderingAllowed(false);
            jTable1.setBackground(new java.awt.Color(255, 255, 255));
            jTable1.setGridColor(new Color(250,250,250));
            jTable1.setShowGrid(true);
            jTable1.setShowVerticalLines(true);
            jTable1.setShowHorizontalLines(false);
            jTable1.setFont(new Font("Arial",0,11));
            jTable1.setMaximumSize(new java.awt.Dimension(32767, 32767));
            jTable1.setMinimumSize(new java.awt.Dimension(630, 255));
            jTable1.setPreferredSize(null);
            jTable1.setBackground(new Color(255,255,255));
            int vColIndex=0;
            TableColumn col = jTable1.getColumnModel().getColumn(vColIndex);
            int width = 100;
            col.setPreferredWidth(width);
            //add item to 2nd cell       
            Vector vec = new Vector();
            vec.addElement(null);
            dummyPane = new testpane();
            vec.addElement(dummyPane);
            ((DefaultTableModel)jTable1.getModel()).addRow(vec);
            jTable1.repaint();
            this.getContentPane().add(jTable1);
            jTable1.getColumn("Action").setCellRenderer(
              new MultiRenderer());
        protected void handleTableMouseEvents(MouseEvent e){
            TableColumnModel columnModel = jTable1.getColumnModel();
            int column = columnModel.getColumnIndexAtX(e.getX());
            int row    = e.getY() / jTable1.getRowHeight();
            testpane contentPane = (testpane)(jTable1.getModel().getValueAt(row, column));
            // get the mouse click point relative to the content pane
            Point containerPoint = SwingUtilities.convertPoint(jTable1, e.getPoint(),contentPane);
            if (column==1 && row==0)
            // so the user clicked on the cell that we are bothered about.         
            MouseEvent ev1 = (MouseEvent)SwingUtilities.convertMouseEvent(jTable1, e, contentPane);
            //once clicked on the cell.. we dispatch event to the object in that cell
         jTable1.dispatchEvent(ev1);
        private void initComponents() {
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-528)/2, (screenSize.height-423)/2, 528, 423);
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {
            System.exit(0);
         * @param args the command line arguments
        public static void main(String args[]) {
            new tableDemo().show();
        // Variables declaration - do not modify
        // End of variables declaration
        class testpane extends JPanel{
            public testpane(){
            GridBagConstraints gridBagConstraints;
            JPanel testpane = new JPanel(new GridBagLayout());
            testpane.setBackground(Color.CYAN);
            JLabel lblTest = new JLabel("test");
            lblTest.addMouseListener(new MouseAdapter(){
              public void mouseClicked(MouseEvent e){
                  System.out.println("panelClicked");
              public void mouseEntered(MouseEvent e){
                  System.out.println("panelEntered");
              public void mouseExited(MouseEvent e){
                  System.out.println("panelExited");
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 0;
            gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
            testpane.add(lblTest,gridBagConstraints);
            this.add(testpane);
    class MultiRenderer extends DefaultTableCellRenderer {
      JCheckBox checkBox = new JCheckBox();
      public Component getTableCellRendererComponent(
                         JTable table, Object value,
                         boolean isSelected, boolean hasFocus,
                         int row, int column) {
        if (value instanceof Boolean) {                    // Boolean
          checkBox.setSelected(((Boolean)value).booleanValue());
          checkBox.setHorizontalAlignment(JLabel.CENTER);
          return checkBox;
        String str = (value == null) ? "" : value.toString();
        return super.getTableCellRendererComponent(
             table,str,isSelected,hasFocus,row,column);
        return (testpane)value;
    class MultiEditor implements TableCellEditor {
      public MultiEditor() {
      public boolean isCellEditable(EventObject anEvent) {return false;}
      public boolean stopCellEditing() {return true;}
      public Object getCellEditorValue() {return null;} 
      public void cancelCellEditing() {}
      public boolean shouldSelectCell(EventObject anEvent) {return false;}
      public Component getTableCellEditorComponent(JTable table, Object value,
                  boolean isSelected, int row, int column) {
        if (value instanceof testpane) {                       // ComboString
          System.out.println("yes instance");
        return null;
      public void addCellEditorListener(javax.swing.event.CellEditorListener l) {
      public void removeCellEditorListener(javax.swing.event.CellEditorListener l) {
    }

    any help on this.. anybody. ?

  • Dispatching an event.

    Hey all, I can't seem to dispatch an event. Am I just missing something?
    I have a  class called Activities that extends the MovieClip class and it imports the following classes:
    import flash.display.MovieClip;
    import flash.events.EventDispatcher;
    import flash.events.Event;
    import flash.events.MouseEvent;
    in the constructor I have a listener listening for a rollover of various Movie clips on the stage.  (this event is working)
    this.addEventListener(MouseEvent.ROLL_OVER, sendInfo);
    I want to dispatch a custom event (in this case just to my document class) from the sendInfo() function when the roll over happens. like so:
    private function sendInfo(event:MouseEvent):void
         dispatchEvent(new Event("MyEvent"));
         //other stuff in the function
    in my document class named Main I am importing the follwoing classes
    import com.activities.Activities;
    import flash.display.MovieClip;
    import flash.events.Event;
    in the constructor I have the following listener
    addEventListener("MyEvent", eventPassed);
    with the following function:
    function eventPassed(event:Event):void
         trace("works");
    It seems to me that this should work, but when I roll over any of the Movie clips on the stage, it registers I rolled over it (i verified with a trace statement in the sendInfo() function), but does not seem to dispatch the event as the trace statement int he document class is not being called.
    I used this as reference for setting up my custom disptach.
    http://www.learningactionscript3.com/2007/11/20/dispatching-custom-events/
    thanks.

    Hey
    your problem is right here:
    addEventListener("MyEvent", eventPassed);
    your adding the event just right only your event by default is not a bubbling event so when your trying to listen to it globaly it wouldn't work you would need to actually ask for the event directly :
    yourClip.addEventListener("MyEvent", eventPassed);
    now if you want it to bubble (you should avoid it as much as you can to cut down on processing when its not needed)
    you can send a second param to the event diapatchment:
    dispatchEvent(new Event("MyEvent",true));
    so flash knows it should bubble the event all the way up.
    by the way talking about events check out The EventController i don't want to dig to deep into it becouse its off topic but you might find it useful
    Best
    Ben Fhala@

  • How to fix file when it says, "Cannot open file " ". Adobe Indesign does not support the file format, a plug-in that supports the file may be missing, or file may be open in another application." It worked one second, I saved and closed the file, then tri

    How to fix file when it says, "Cannot open file " ". Adobe Indesign does not support the file format, a plug-in that supports the file may be missing, or file may be open in another application." It worked one second, I saved and closed the file, then tried to reopen and now it won't work. I am using Adobe InDesign CS5. It is the only version on my comp. I have tried opening on another comp & copying the file – same error comes up. PLEASE HELP

    First check the version of the document with Jongware's script "Identify.jsx" (ExtendScript/JavaScript).
    You can find it here:
    [Ann] Identify Your InDesign File
    If it is CS 5.5 or above, you need someone to open it in the version the script says and export an IDML representation from that. Another way would be to install a 30days version of CS6 or above (CC) and do it yourself.
    In regards of the script showing a result for InDesign files higher than CS6:
    CS7 = CC v9
    CS8 = CC v10 = CC-2014 or CC2014.1
    Uwe

  • Good morning everyone! I would like to ask how can i subscribe for adobe forms central 11.99$ per month. I am currently here in United Arab Emirates. I really need to use this application cause it will benefit me a lot in my work. Thanks!

    Good morning everyone! I would like to ask how can i subscribe for adobe forms central 11.99$ per month. I am currently here in United Arab Emirates. I really need to use this application cause it will benefit me a lot in my work. Thanks!

    Hi,
    OK. Following instructions, I've uninstalled the old Flash Player and installed the right one, and videos are now playing. Thanks for pointing me to the other posts on this site. YouTube and other videos are now playing
    Some of the videos still play jerkily (they don't stream evenly). A few stream evenly once they've been allowed to buffer fully. (I think I'm using these terrms correctly.) Is this solely caused by low bandwidth, or is there something—an adjustment of some kind—that I can do with Flash Player to have online videos stream evenly, even from the moment I start them?
    As I mentioned, to bypass this uneven streaming while watching online, I download the videos and watch them usually using Quicktime Player 7.6.4. Still, they don't always play evenly, but for the most part do.
    I've just tested bandwidth and I'm told:
    5.63 Bbps Download speed
    0.63 Mbps Upload speep
    Rafael

  • Whether our application caused the memory leak

    whether have the command to find out whether our application caused the memory leak !
    We are using Jdev10g + JHeadstart(Release 9.0.5.1, BC4J + Struts + JSP) to build our enterprise application,
    but when the application running some days in our Application Server(RedHat AMD64, with 8GB RAM), the memory consumed was growth seriously in production environment (one OC4J instance will caused almost 2G memory ulilization after running 2 days) that is caused us to restart the instance each day ! we doubt and worry
    about maybe our application suffer the memory leak problem, so we want to know have the command to find out whether our application caused the memory leak
    issue and which program is the major murderer for memory.

    Ting,
    Unfortunately there is no 'command' that will show you the location of a memory leak. First I would scrutinizing your code for any obvious 'leaks'. Then, you should obtain some statistics about the usage of your system. One important aspect is how long a HttpSession usually lives. If you have thousands of users that stay online the entire day and never 'time out', and if you have users on the system 24 hours a day, then the sheer number of HttpSessions might be a problem.
    JHeadstart 9.0.x tends to have rather 'heavy' session objects. This can easily be solved by adding some actions to clear up DataObjects and DataObjectSets of previous 'Groups' when entering a new Group. A good place would be between the 'DynamicActionRouter' and the 'ActionRouters'. Just before entering the 'EmployeeActionRouter', you could remove all DataObjects and DataObjectSets that might be left on the Session by actions of the other ActionRouters.
    Also it would be interesting to see if the garbage collector can do its thing when the system is less busy. For instance, if your application has a smaller load during the weekend, what is the memory usage on Sunday at midnight compared to, say, Friday at noon. Has the memory load dropped consistently with the decreased number of online users, or does too much memory stay allocated? If so, then there's more going on than just HttpSession objects.
    If all this does not lead to a solution, I suggest using a profiling tool such as OptimizeIt to investigate the memory usage of the application in detail.
    Kind regards,
    Peter Ebell
    JHeadstart Team

  • Why doesn't the TimeTrait dispatch currentTimeChange event?

    There are cases when I would like a VideoElement's TimeTrait to dispatch currentTimeChange events in addition to complete and durationChange events. I'm wondering what the logic is to not have this trait dispatching this event from the currentTimeChangeEnd protected method? Seems the only way to track an elements current time is to track it at the player level.

    You can setup your own timer and track the currentTime values inside a TimeTrait instance.
    I don't know why the TimeTrait doesn't dispatch the currentTimeChange event, but I suppose that this is intentional - you don't want to provide this kind of utility methods at this low level API level.
    ionflow, why isn't MediaPlayer API good enough for you? Why do you need to get these events at the TimeTrait level?

  • Dispatching an event during check-in process

    I am a newbie to adobe illustrator CS6 sdk.
    I am trying to add an event listener to the existing check-in menu item.
    When check-in is invoked i want to dispatch an event to cs extension.
    I got hold of the check-in menu item in AIMenuItemHandle, but i do not find any functions to add any event listeners to the check-in option.
    How do I add event listener to the check-in menu item?
    Thanks in Advance,
    Senthil.

    I didn't see a notifier myself, but I was hoping I was just not noticing it.
    There isn't really an SDK for walking through menus & such. the AICommandManager.h header has some functions for searching for CommandIDs, but a CommandID is basically a keyboard shortcut. So that will only work if there's one associated with the menuitem you're trying to invoke. If so, there look to be some methods in that header for searching for it based on partial name matching -- localized or not. That might get you the CommandID you want, assuming its available. It must not always be avaialble, because I don't see a 'Check in' option in my version of CS6 -- presumbly this requires VersionCue or whatever it is Adobe has for this?

  • [svn:osmf:] 15196: Fix bug FM-621: SerialElement dispatches READY event twice.

    Revision: 15196
    Revision: 15196
    Author:   [email protected]
    Date:     2010-04-01 21:16:48 -0700 (Thu, 01 Apr 2010)
    Log Message:
    Fix bug FM-621: SerialElement dispatches READY event twice.  Fix inconsistency between MediaPlayer.stop implementation and ASDoc (i.e. the method should always rewind).  Temporarily disable DurationElement test, needs some investigation as to why it behaves so different from the other MediaElement-in-MediaPlayer tests.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-621
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/elements/compositeClasses/SerialSeekTrait.as
        osmf/trunk/framework/OSMF/org/osmf/media/MediaPlayer.as
        osmf/trunk/framework/OSMFTest/org/osmf/OSMFTests.as
        osmf/trunk/framework/OSMFTest/org/osmf/media/TestMediaPlayer.as

  • IGE.graphic dispatches Event.REMOVED_FROM_STAGE events after each updatecomplete event

    When I type in TLFtextField dispatches RemovedFromStage events after each word! Why?
    var em:EditManager= new EditManager()
    em=txt.textFlow.interactionManager as EditManager
    var MC:mc=new mc()
    MC.addEventListener(Event.REMOVED_FROM_STAGE,rs)
    txt.textFlow.addEventListener(StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE,u)
    em.insertInlineGraphic(MC,"auto","auto")
    function u(e:StatusChangeEvent):void{
          if(e.status==InlineGraphicElementStatus.READY ||e.status==InlineGraphicElementStatus.SIZE_PENDING){
               txt.textFlow.flowComposer.updateAllControllers()
               if(e.status=="ready")txt.textFlow.removeEventListener(StatusChangeEvent.INLINE_GRAPHIC_ST ATUS_CHANGE,u)
    function rs(e:Event):void{
    trace(e.type)

    Thank you Richard
    This happens only if I set the IGE.float to none. Is there any other way
    to know if an IGE is removed from stage(user deletes it for e.g.)?
    Now my code is something like this:
    var em:EditManager= new EditManager()
    txt.textFlow.interactionManager=em
    em.textFlow.addEventListener(StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE,statusChanged)
    file.addEventListener(Event.SELECT,graphicSelected)
    function graphicSelected(e:Event){
      var flv:FLVPlayback= new FLVPlayback();
      flv.skin = "/SkinOverAllNoCaption.swf";
      flv.autoPlay = false;
      flv.source = new URLRequest(file.nativePath).url;//"C:/Users/Dell/Desktop/flv.f4v" for example
      flv.addEventListener(Event.REMOVED_FROM_STAGE,removeHandler);
      em.insertInlineGraphic(flv,"auto","auto""none", new SelectionState(txt.textFlow,0,0))     
      em.textFlow.flowComposer.updateAllControllers()
    function statusChanged(e:StatusChangeEvent):void
    trace(e.status)
    if(e.status==InlineGraphicElementStatus.READY ||e.status==InlineGraphicElementStatus.SIZE_PENDING){
      em.textFlow.flowComposer.updateAllControllers()
      if(e.status==InlineGraphicElementStatus.READY){
          txt.textFlow.removeEventListener(StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE,statusCha nged)
      gr.id=file.name//"flv.f4v" for example
    function removeHandler(e:Event):void
    if (e.currentTarget as FLVPlayback)
      var flv:FLVPlayback = e.currentTarget as FLVPlayback;
      ID=flv.source.substr(flv.source.lastIndexOf("/")+1)
      if (! em.textFlow.getElementByID(ID))
      var vp:VideoPlayer = flv.getVideoPlayer(0);
      vp.close();
      trace("REMOVED : "+ID); 
      currentGraphic=null
    else if(e.currentTarget as Loader){
      currentGraphic=null
    But the problem is the removeHandler function will check for existance of ALL IGEs with float set to
    none after typing each word, right?
    BTW Sorry for my bad English!

Maybe you are looking for

  • Using USB printer on Sun Ray 2

    Can someone direct me to a document or explain how I can configure the Sun Ray Software to allow me the ability to print to a USB printer attached to a Sun Ray 2 thin client. I believe this is possibele using the USB redirection utility but only when

  • How can I change the frame around a title created with the Rectangle Tool?

    In PrE 7, I have been creating titles (e.g.: Title > New Title > Default Still, etc.) for a long time and using the many ways to manipulate the text (type, color, size, animation, etc.). Today, I tried to use the Rectangle Tool (or the Ellipse Tool,

  • Bugs I've had so far with my iPhone 5 so far....

    1:Auto brightness does not work 2:Sometimes when clicking the home button when phone is locked, the screen is darker than the brightness I had it set for, regardless that Auto brightness is off, also it stays this way until I either lock the screen a

  • Transport in BI-Production taking too much time.

    Hi Experts, Whenever I am transporting from BQA to BPA its taking too much time i.e 4-5 hours for 1 transport. The system is newly built i.e the BI-PRD system. Sgen has been performed and all the post installation activities too. Can anyone help?

  • PDF Text

    Hi All, We are trying to write many lines in a pdf document and we are able to achieve the same using PDF text. But our requirement is to create duplication of the written content on right hand side of the pdf document also using some spacing. i.e th