Recursively iterating over all child controls

Hi All,
I'm trying to recursively iterate over all child controls in my Flex 4 application, and I've been doing something like this to get the immediate children of a particular container:
public static function getElements(parent:Object):Vector.<IVisualElement>{
     var result:Vector.<IVisualElement> = new Vector.<IVisualElement>();
     for(var i:int = 0; i < parent.numElements; i++){
          result.push(parent.getElementAt(i));
     return result;
I can then call that function recursively.  It works--kinda.  The way it doesn't work is that if I call this object on the application object itself, it will only give me back elements that are visible in the current state.  As I move from one state to another, different elements are returned by my getElements method.
So, is there are way I can find all child elements, whether or not they are visible in the current state?
  -Josh

Hi Josh,
So, I've come up with some quick code for you. However, I must add my disclaimers first:
The code is incomplete in that it excludes children of children that don't use states, but includes children of children that are associated with states of the parent. I'm also definitely not an expert in how our states system works.
I'm not sure what your use case for all of this is, but my best guess is that it would be better to find a different way to solve your problem than to go the route of introspecting states. It's a long and dirty road =).
Other than that, I've attached the code for you. The meat of this is:
     *  Finds all elements in all states that use the states of the specified parent.
    public static function getAllElements(parent:UIComponent):Vector.<IVisualElement>
        var container:IVisualElementContainer = parent as IVisualElementContainer;
        if (!container)
            return new Vector.<IVisualElement>();
        var result:Vector.<IVisualElement> = getCurrentElements(container);
        var states:Array = parent.states;
        for each (var state:State in parent.states)
            for each (var addItems:AddItems in state.overrides)
                var elt:IVisualElement = addItems.items as IVisualElement;
                if (elt && !containsElement(result, elt))
                    result.push(elt);
        return result;
This method takes the parent container (in my case, the application) and returns a vector of children elements that associate themselves with the states of this parent container. First, it grabs all the elements already created from the parent container. Next, it iterates over each state and then each AddItems of each state. The AddItems object contains the information and pointers to the specific element that will be "added" when the current state changes to that state. By calling addItems.items, we force the creation of the specific element which is returned to us. Now, we can use a simple containsElement() method to check for duplicates and build a list of elements that would be added to each of the states.
Again, the code is finding all of the children of the provided parent in all of its parent's states; however, it also finds children of children that may be using the parent's states as well. But if the children of children are not using the parent's states then it will not be found (easily fixable if you recurse). In addition, knowing which elements belong to which container just from introspecting the State object is pretty complicated and involves understanding how addItems.apply() works.
Anyway, I hope this helps you. I would be interested in hearing your use case since this code is pretty complicated. I'd like to see if I could help by finding a different approach for your problem.
-Kevin

Similar Messages

  • OSB - Iterating over large XML files with content streaming

    Hi @ll
    I have to iterate over all item in large XML files and insert into a oracle database.
    The file is about 200 MB and contains around 500'000, and I am using OSB 10gR3.
    The XML structure is something like this:
    <allItems>
    <item>.....</item>
    <item>.....</item>
    <item>.....</item>
    <item>.....</item>
    <item>.....</item>
    </allItems>
    Actually I thought about using a proxy service with enabled content streaming and a "for each" action for iterating
    over all items. But for this the whole XML structure has to be materialized into a variable otherwise it is not possible!
    More about streaming large files can be found here:
    [http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#large_messages]
    There is written "When you enable streaming for large message processing, you cannot use the ... for each...".
    And for accessing single items you should should use an assign action with a xpath like "$body/allItems/item[1]";
    this works fine and not the whole XML stream has to be materialized.
    So my idea was to use the "for each" action and processing seqeuntially all items with a xpath like:
    $body/allItems/item[$counter]
    But the "for each" action just allows iterating over a sequence of xml items by defining an selection xpath
    and the variable that contains all items. I would like to have a "repeat until" construct that iterates as long
    $body/allItems/item[$counter] returns not null. Or can I use the "for each" action differently?
    Does the OSB provides any other iterating mechanism? I know there is this spli-join construct that supports
    different looping techniques, but as far I know it does not support content streaming, is this correct?
    Did I miss somehting?
    Thanks a lot for helping!
    Cheers
    Dani
    Edited by: user10095731 on 29.07.2009 06:41

    Hi Dani,
    Yes, according to me this would be the best approach. You can use content-streaming to pass this large xml to ejb and once it passes successfully EJB should operate on this. If you want any result back (for further routing), you can get it back from EJB.
    EJB gives you power of java to process this file and from java perspective 150 MB is not a very LARGE data. Ensure that you are using buffering. Check out this link for an explanation on Java IO Streams and, in particular, buffered streams -
    http://java.sun.com/developer/technicalArticles/Streams/ProgIOStreams/
    Try dom4J with xpp (XML Pull Parser) parser in case you have parsing requirement. We had worked with 1.2GB file using this technique.
    Regards,
    Anuj

  • TabNavigator Child Control Problem on Programmatic SelectedIndex Change

    I've got a TabNavigator that contains another TabNavigator as
    a child control on its second page. On the child TabNavigator
    there's a ViewStack and a couple of Accordion controls. On my first
    parent tab I've got a Button that, when clicked, programmatically
    changes the selectedIndex of the parent TabNavigator to display the
    contents of the second tab (which contains the child TabNavigator).
    I'm finding that when the index of the TabNavigator is
    changed programmatically, all of the controls in the child
    TabNavigator are stacked on top of each other and overlapping as
    though the Flash player has no clue how to display these child
    controls. Once I click through each tab on the child TabNavigator,
    they appear intact. If I click the Button to change the tab again,
    all of the controls will be jumbled and stacked.
    This problem happens 100% of the time. I've changed every
    single control in my app to creationPolicy="all" to no avail.
    Anybody experienced this or know what to do?

    I've got a TabNavigator that contains another TabNavigator as
    a child control on its second page. On the child TabNavigator
    there's a ViewStack and a couple of Accordion controls. On my first
    parent tab I've got a Button that, when clicked, programmatically
    changes the selectedIndex of the parent TabNavigator to display the
    contents of the second tab (which contains the child TabNavigator).
    I'm finding that when the index of the TabNavigator is
    changed programmatically, all of the controls in the child
    TabNavigator are stacked on top of each other and overlapping as
    though the Flash player has no clue how to display these child
    controls. Once I click through each tab on the child TabNavigator,
    they appear intact. If I click the Button to change the tab again,
    all of the controls will be jumbled and stacked.
    This problem happens 100% of the time. I've changed every
    single control in my app to creationPolicy="all" to no avail.
    Anybody experienced this or know what to do?

  • Please specify how do we can activate a web scope feature over all sub webs when a solution package is activated.???

    please specify how do we can activate a web scope feature over all sub webs when a solution package is activated.
    when a solution package is deactivated the web scope features over all sub website gone deactivated and does not re-activated when solution package is activated.
    we have couples of sub webs to activate web features manually that should be activated when a solution package is activated.
    all sub webs are created by custom web templates onet.xml.

    Hi,
    I can think of three different solution (all custom solution)
    Use Powershell Cmdlet to activate feature to all sub sites
    Upgrade your solution to Site Collection scope, However all subsites under the root will have access to the features, which you may want to restrict based on your requirement
    create a site scoped solution feature to activate the web scoped features, this will give you more control and easier management of all your features
    here are some links -
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/10a95745-67c5-4a32-a783-b9ae8977f7e0/deploying-a-solution-with-a-feature-to-be-activated-on-a-number-of-subsites?forum=sharepointdevelopmentprevious
    http://sharepointgroup.wordpress.com/2012/05/04/activating-and-deactivating-features-with-powershell/
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • Getting a iterator over a huge xml-file

    Hi !
    I have to persist data from some huge xml-files.
    The structure of the xml is simple, like in:
    <items>
    <item>
    </item>
    <item>
    </item>
    </items>
    The best way for me, is to get an iterator over the item-elements represented as a DOM strcture for easy access.
    Because the files are so huge (80-150 MBytes) and I have no control over the creation of them, the underlying parser should be SAX oriented.
    So I need a solution which will parse until one item-element (maybe spezified through a XPATH query) is completed and build a DOM-tree from it.
    Then I can pass this DOM-element to my persistence layer. When this item is persisted, and the Iterator hasNext(), then I could do a simple .next() to get the next DOM representation of the item.
    Is there such a solution out ? Or do I have to 'invent' such kind of parsing ?
    Would by great to get some hints ... this problem is driving me crazy :)
    Thank you in advance,
    Gerald

    Vaguely familiar, http://lists.xml.org/archives/xml-dev/200201/msg00032.html
    I can't think of a DOM builder that would work off a fragment; you would probably have to create one yourself.
    There's also http://drizzle.stanford.edu/~peastman/pax.html which might solve your problem.
    Pete

  • Over head cost controlling

    Hi All
    I am using Over head cost controlling by order,  How does the values flow from product costing to COPA...mainly variances?

    Hi,
    If you are talking about cost object controlling by Order,product costing variances
    Here you go
    Variance Calculation
    As long the production order is not fully delivered or flagged Technical Complete the remaining order balance is treated as WIP. Otherwise the order balance shows up in variance calculation.
    If a lot-based product-controlling WIP, is valuated at actual costs. The WIP is calculated as the difference between the debit and credit of an order as long as the order does not have the status DLV (delivered).
    In lot-based product controlling the variances are not calculated until the order has the status DLV (finally delivered) or TECO (technically completed). This means that at the time the order has reached this status, the system no longer interprets the difference between the debit and the credit as work in process but as a variance. In lot-based product controlling orders never have work in process and variances at the same time.
    Variance calculation compares the actual costs incurred for the production/process order with the target costs according to the standard cost estimate for the finished material, and assigns the individual variances to variance categories. The target costs are calculated using the quantity delivered for the order.
    In this way you can find out which variances occurred between the value of the delivery and the actual costs and you can find the reason for the posting to the price difference account for materials with standard price control.
    Variances from production (target version 1)
    Variance calculation compares the actual costs incurred for the production order with the target costs for the production order and assigns the individual variances to variance categories. The target costs are calculated using the quantity delivered for the order.
    This enables variance calculation to find out which variances occurred between the time the production order was created and the end of the production process.
    Variances from planning (target version 2):
    Variance calculation compares the planned costs for the production order with the target costs according to the standard cost estimate for the finished material, and assigns the individual variances to variance categories. The target costs are calculated using the quantity delivered for the order.
    This enables variance calculation to find out which variance occurred between the time the standard cost estimate was created and the time the production order was created.
    Variance categories:
    The system assigns every variance to a variance category. The variance category indicates the cause of the variance (such as price change, lot-size variance). Variances are updated to the information system and passed on to Profitability Analysis according to variance category.
    You differentiate between variance categories on the input side and on the output side:
    u2022 Variances that occur because of goods issues, internal activity allocations, overhead and G/L account postings are displayed on the input side. Price variances, quantity variances, resource-usage variances and input variances are displayed on the input side.
    u2022 Variances that occur because too little or too much of the planned order quantity were delivered, or because the delivered quantity was valuated differently are displayed on the output side.
    Variances on the output side occur when you deliver using a price that differs from that found by dividing the target costs and the delivered quantity. If you deliver using the standard price, a variance can occur when the order lot size differs from the costing lot size. This is displayed as a lot-size variance.
    For config
    3.1.4.2 Variances & Settlement
    Variance Calculation determines differences between the actual costs incurred on a production order and the standard costs of the material produced. Variances are calculated not at once, but for different variance categories. The variances computed are then transferred to CO-PA.
    3.1.4.2.1 Define Default Variance Keys for Plants
    Use
    The Variance Key is part of the order header and controls variance calculation. The system selects the value set by this step as default value when a material master is created. From the material master the variance key then is transferred to the order when an order for the material is created.
    Procedure
    1. Access the activity using one of the following navigation options:
    Transaction Code OKVW
    IMG Menu Controlling  Product Cost Controlling  Cost Object Controlling  Product Cost by Order  Period End Closing  Variance Calculation -> Define Default Variance Keys for Plants
    2. Make the following entries:
    Plant Variance Key
    BP01 000001
    BP02 000001
    BP03 000001
    BP0X 000001
    3.1.4.2.2 Define Target Cost Versions
    Use
    The target cost version controls various parameters related to calculation of target costs in variance calculation. In variance calculation, target costs are needed as a comparison to the actual costs incurred.
    Procedure
    1. Access the activity using one of the following navigation options:
    Transaction Code OKV6
    IMG Menu Controlling Product Cost Controlling  Cost Object Controlling  Product Cost by Order  Period End Closing  Variance Calculation  Define Target Cost Versions
    2. Choose New entries and enter the following values or copy from default settings of CoArea 0001 to BP01:
    CoArea TgtCostVsn Text Variance Variant Control Cost Target Cost
    BP01 0 Target Costs for Total Variances 001 Actual Costs Current Std cost Est
    BP01 1 Target costs for production variances 001 Actual Costs Plan Costs / Preliminary Cost Estimate
    BP01 2 Target costs for planning variances 001 Plan Costs Current Std cost Est
    3.1.4.2.3 Create Settlement Profile
    Use
    The settlement profile controls various parameters related to settlement.
    Prerequisites
    Allocation Structure
    Procedure
    1. Access the activity using one of the following navigation options:
    Transaction Code SPRO
    IMG Menu Controlling  Product Cost Controlling  Cost Object Controlling  Product Cost by Order  Period-End Closing  Settlement  Create Settlement Profile
    2. Choose New Entries and enter header data. Then for each new entry choose Details and enter remaining data.
    3. Overview of data records:
    Profile Text
    YGPI00 BP Process Order w/o CO-PA
    YGPP00 BP Production Order w/o CO-PA
    YGPI00 YGPP00
    Actual costs/costs of sales
    To be settled in full X X
    Can be settled
    Not for settlement
    Default Values
    Allocation Structure A1 A1
    Source Structure
    PA Transfer Struct.
    Default object Type
    Indicators
    100% Validation X X
    %-Settlement X X
    Equivalence Nou2019s X X
    Amount Settlement
    Var. to co. bsd. PA
    Valid receivers
    G/L account N N
    Cost center O O
    Order O O
    WBS Element O O
    Fixed asset N N
    Material O O
    Network N N
    Profit. Segment N N
    Sales order O O
    Cost objects O O
    Order item O O
    Business proc. N N
    Real est. object N N
    Other parameters
    Document type SA SA
    Max.no.dist.rls 3 3
    Residence time 3 3
    You have to assign Variance Key in material master for semi-finished and Finished goods in costing 1 tab also.
    To Execute
    KKS1-Collective Variance calculation
    KKS2-Individual Variance calculation
    CO88-Collective settlement
    KO88-Individual settlement
    if you need anything more,let me know.
    Thanks,
    Rau

  • Keep indicators over all tabs

    Hello,
    I was wondering if there is a way to keep indicators on several tabs without duplicating them?  For example, I have a 5 tab control and there's certain things I want displayed on all 5 (but I need to keep them inside each tab... I don't want to pull them out of the tab control).... but I don't want to re-create these indicators for each tab... is there a way they could maybe hover over my tabs so they're not locked into any tab and can be seen over all the tabs?  I know this sometimes happens to me by accident when working with tabs, where the same indicator is hovering over all my tabs, but I don't know how to make it happen....
    thanks!

    Easy.
    Drag it off the tab control.
    Then select it and use your arrow keys to move it OVER but not into the tab.
    Sure there will be a funny shadow around in development mode but that goes away when you run it.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • All View controls disabled when in Transform dialogue... WHY?

    Transform Each.  A reasonably useful, if minimalistic dialog box disables ALL view controls.
    Including Zoom and Pan. 
    And of course the really useful stuff, like hide Bounding Boxes and Frames/Edges and Guides... they also don't work. 
    Why such a monochromatic and linear way of working in 2013?
    Has Adobe spent NON of its record profits on hiring more programmers?
    Are their any scripts that get around this heinous oversight, left over from what... 1995?

    Again: The users here cannot tell you why. Illustrator is a very old and archaic program that has not kept up with the times. But you already know that.
    Or is there another explanation?
    There are other speculations. Mine is simply that the user base continues to tolerate it. In the end, that's why. If you need further explanation, read on:
    Adobe created PostScript in the 80s. Adobe has dominated the graphics industry ever since. So people buy Illustrator because it carries the Adobe brand. None of this has changed.
    It becomes a self-fullfilling cycle. Newcomers buy Illustrator early-on assuming it is the "safe bet" because it carries the Adobe brand. As a result, most Illustrator users have very little experience with any other mainstream 2D Bezier drawing programs, if any at all. Longtime Illustrator-only users become increasingly vested in its archaic and cumbersome interface and fearful of having to apply that kind of learning effort to any other program. They--in self-protective turn--advise newcomers that it is the "professional" choice; the "safe bet."
    So the cycle repeats.
    Illustrator-only users assume Illustrator's feature set to be "state of the art" for its software category. Adobe's marketing, of course, sustains this myth.
    And a comedy of absurdity ensues. Literal decades pass before Illustrator users realize that "page 2" is not only possible but valuable in a drawing program. The year 2013 (and who knows how many more) comes and goes without Illustrator ever acquiring the most basic functionality of a proper set of basic live geometric shape tools. You are just discovering this. But it is nothing new. It's the way it's always been.
    Adobe continues to market the same archaic functional underpinnings with occasional window-dressing changes of the UI skin. Functionality long taken for granted in other Bezier drawing programs is only occasionally added and even then in a half-baked fashion being hamstrung by devoted adherance to an outdated interface foundation which Adobe dares not change lest risk alienating existing users.
    The interface becomes increasingly scattered, cluttered, redundant, inconsistent and old-fashioned despite its ever-changing stylistic facade. The resulting complicated confusion is perceived by newcomers as "powerful" and "full featured" thinking that must be why it's so unintuitve. They come here to ask "how" and to become vested in the highly esoteric learning curve.
    And the cycle repeats.
    Other vendors try to capture/maintain market share by emulating the most prevalent interface schema in hopes of easing the "transition" to their products. They concentrate more on replicating the same old Illustrator functionality than on innovation, even when their interface foundations are superior. Illustrator's interface scheme becomes the defacto standard and the whole software segment stagnates in an endless cycle of "me, too" offerings.
    Illustrator's domination thereby effectively holds the entire segment in decades-old lethargy. Users become adicted to the same old mediocrity.
    Meanwhile, other graphics softwares in growth segments march on. The users of 3D modeling, for example, enjoy a plethora of different interface schemes, each competing to deliver both superior functionality and a superior user experience. The user base assumes a stance of versatility and adaptability and is less dogmatically defensive of a paticular software. Obtaining and maintaining working proficiency in multiple programs is considered the norm. And the category advances, becoming more powerful even while becoming more affordable (growth).
    Energetic beginners devote their efforts to energetic developments: mobile apps and platforms, scripting, data-driven solutions, gaming. Open source innovates in terms of business model, if not in terms of software functionality, and delivers powerful apps at near zero price.
    And everyone yawns at the 2D drawing segment and "yesterday's news" appears increasingly archaic as its stagnation continues. And it sadly continues to fail to achieve its yet-to-be-realized potential.
    Eventually self-fullfilling cycles are broken. Eventually. The latest disturbance to this particular cycle comes from Adobe itself: It's self-defensive, self-perpetuating rent-only license scheme.
    It is yet to be seen if this also becomes a trend with other software vendors, or if it breaks Adobe's stranglehold on the market. If tolerated by the user base, it certainly becomes more revenue-generating for the vendor (at least for a time) and self-perpetuating as customers willingly become entrapped by vendor-specific dependency. That lets the vendor deliver less value at same (or even less) cost, while maintaining same (or even higher) price. It's every software vendor's dream.
    It's every monopolist's dream. It's every socialist's dream. And it works (for a time) if only enough customers are successully are suckered into it. But eventually, even Berlin Walls and long-distance phone call pricing schemes come down. The cost and pain of the self-protective, self-perpetuating cycle's end is directly proportional to how long its damage is allowed to continue. It's best to nip such cycles in the bud. But history proves that doesn't always happen.
    So there's your reason "why": It's what the customers buy, driven by what they buy into.
    JET

  • I made a dumb decision to 'Erase Free Space' on my drive. I now have no free space, I realize because it wrote 0's over all my free space. Is there a way to undo this??? Help please I can't save any documents now! Thanks in advance all, it is truly apprec

    I made a dumb decision to 'Erase Free Space' on my drive. I now have no free space, I realize because it wrote 0's over all my free space. Is there a way to undo this??? Help please I can't save any documents now! Thanks in advance all, it is truly appreciated. how can find the hidden temporary files using the terminal what do i type in?

    It's more likely a failed Erase Free Space, which creates a huge temporary file; that's why it looks like you have no more available drive space. You can recover from this. See these links
    https://discussions.apple.com/message/10938738#10938738
    http://www.macgeekery.com/tips/quickie/recovering_from_a_failed_secure_erase_fre e_space 
    Post back if you need any help with this.

  • HT5622 Have Family Mobile with 2 phones and only one Apple ID can all be controlled by the main phone?

    Have Family Mobile with 2 phones and only one Apple ID can all be controlled by the main phone?

    angiefromaustin wrote:
    Yes I know the password for Apple ID.
    Then there should be no issue for you.
    angiefromaustin wrote:
    I do not know the password to get onto the 3G phone to make changes or update apps etc.
    Then there is more than one Apple ID involved.... Or a Restrictions Passcode has been set.
    angiefromaustin wrote:
    2 phones and only one Apple ID
    Then what do you mean by this ?

  • Stop and Play All Child MovieClips in Flash with Actionscript 3.0

    I am stuck with the ActionScript here. I have a very complex animated flash movie for eLearning. These contain around 10 to 15 frames. In each frame I am having multiple movie clip symbols. The animation has been created using a blend of scripting and also normal flash animation.
    Now I want to create pause and play functionality for the entire movie. I was able to create the pause function but when i try to play the movie it behaves very strange.
    I was able to develop the pause functionality by refering to the below mentioned links:
    http://www.unfocus.com/2009/12/07/stop-all-child-movieclips-in-flash-with-actionscript-3-0 /
    http://www.curiousfind.com/blog/174
    Any help in this regard is highly appreciated as i am approaching a deadline.
    I am pasting the code below:
    import flash.display.MovieClip;
    import flash.display.DisplayObjectContainer;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import fl.transitions.*;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;
    import flash.events.Event;
    import flash.events.MouseEvent;
    stop();
    // function to stop all movieclips
    function stopAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            (content as MovieClip).stop();
        if (content.numChildren)
            var child:DisplayObjectContainer;
            for (var i:int, n:int = content.numChildren; i < n; ++i)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        stopAll(child);
                    else if (child is MovieClip)
                        (child as MovieClip).stop();
    // function to play all movieclips
    function playAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            var movieClip:MovieClip = content as MovieClip;
            if (movieClip.currentFrame < movieClip.totalFrames) // if the main timeline has reached the end, don't play it
       movieClip.gotoAndPlay(currentFrame);
        if (content.numChildren)
            var child:DisplayObjectContainer;
            var n:int = content.numChildren;
            for (var i:int = 0; i < n; i++)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        playAll(child);
                    else if (child is MovieClip)
                        var childMovieClip:MovieClip = child as MovieClip;
                        if (childMovieClip.currentFrame < childMovieClip.totalFrames)
          //childMovieClip.play();
          childMovieClip.play();
    function resetMovieClip(movieClip:MovieClip):MovieClip
        var sourceClass:Class = movieClip.constructor;
        var resetMovieClip:MovieClip = new sourceClass();
        return resetMovieClip;
    pauseBtn.addEventListener(MouseEvent.CLICK, onClickStop_1);
    function onClickStop_1(evt:MouseEvent):void
    MovieClip(root).stopAll(this);
    myTimer.stop();
    playBtn.addEventListener(MouseEvent.CLICK, onClickPlay_1);
    function onClickPlay_1(evt:MouseEvent):void
    MovieClip(root).playAll(this);
    myTimer.start();
    Other code which helps in animating the movie and other functionalities are as pasted below:
    stage.addEventListener(Event.RESIZE, mascot);
    function mascot():void {
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    var sw:Number = stage.stageWidth;
    var sh:Number = stage.stageHeight;
    // resizing movieclip
    mc1.width = sw/3;
    mc1.height = sh/3;
    // positioning mc
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    stage.removeEventListener(Event.RESIZE, mascot);
    mascot();
    this.mascotAni.y = 100;
    function mascotReset():void
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    stage.removeEventListener(Event.RESIZE, mascot);
    mc1.width = 113.45;
    mc1.height = 153.85;
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    var interval:int;
    var myTimer:Timer;
    // function to pause timeline
    function pauseClips(secs:int, myClip:MovieClip):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myTimer.reset();
      myClip.nextFrame();
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    // function to pause timeline on a particular label
    function pauseClipsLabel(secs:int, myClip:MovieClip, myLabel:String):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myClip.gotoAndStop(myLabel);
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    MovieClip(root).pauseClips(4.5, this);
    // function to fade clips
    function fadeClips(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, 0.5, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to fade clips with speed
    function fadeClipsSpeed(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number, speed:int):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, speed, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to show screen transitions
    function screenFx(target_mc:MovieClip, next_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.OUT, duration:1.2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});
    tranFx.addEventListener("allTransitionsOutDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsOutDone",doneTrans);
    // function to show screen transitions inverse
    function screenFxInv(target_mc:MovieClip, next_mc:MovieClip):void
    var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.SQUARE});
    tranFx.addEventListener("allTransitionsInDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsInDone",doneTrans);
    // function to zoom in
    function zoomFx(target_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Zoom, direction:Transition.IN, duration:3, easing:Strong.easeOut});
    //tranFx.addEventListener("allTransitionsInDone",doneTrans);
    /*function doneTrans(evt:Event):void
      next_mc.nextFrame();
    // Blinds Fx
    function wipeFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Wipe, direction:Transition.IN, duration:3, easing:Strong.easeOut, startPoint:9});
    // Blinds Fx Center
    function fadePixelFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Fade, direction:Transition.IN, duration:1, easing:Strong.easeOut});
    tranFx.startTransition({type:PixelDissolve, direction:Transition.IN, duration:1, easing:Strong.easeOut, xSections:100, ySections:100});

    This movie is an animated movie from the start to end. I mean to say that though it stops at certain keyframes in the timeline it stops for only a certain time and then moves on to the next animation sequence.
    Its not an application where the user can interact.
    On clicking the play button i want the movie to play normally as it was playing before. If the user has not clicked on the pause button it would anyhow play from start to finish.
    Is there anyway where i could send in the fla file?

  • When installing itunes on PC with Windows Vista, the itunes program "took over" all of my desktop icons.

    When installing itunes of my PC with Windows Vista, the itunes program "took over" all of my desktop icons.  How can I install it so it doesn't do that?  Thanks!

    You can force Vista to rebuild the desktop icons by changing your monitor's color depth momentarily. In the display properties, change to 16-bit color. Then change back to 32-bit.

  • I just bought a new iPad and I want to bring over all my apps from my first iPad but I don't have a computer, do I just use the cloud?

    I just bought a new iPad and I want to bring over all my apps from my first iPad but I don't have a computer, do I just set up an icloud account and upload all the things from my first iPad and then connect the new iPad to the icloud using the same account and sync it?

    No. You configure your new one to use the same Apple ID. Then re-download from iTunes:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I NEED OVER ALL HARDWARE SUPPORT FOR PAVILION DV6-3043TX

    I NEED OVER ALL HARDWARE SUPPORT FOR PAVILION DV6-3043TX, DISPLAY : FLASHING, HDD : SMART ERROR 301, KEY BOARD : UNSERVISEABLE, USB PORT : DISCONNECTED CONTINUOUSLY, THERMAL SHUT DOWN : RAPIDLY SHUTDOWN DUE TO INCREASE IN TEMP AS I M PERIODICLY CLEANING VENTS AND USING COOL PAD RECOMENDED BY HP DEALER, CD/DVD DRIVE NOT WORKING PROPERLY. SO I NEED SUPPORT FROM HP. MY EMAIL IS {Personal Information Removed}

    The smart error is usually a fatal hard drive error and it probably needs to be replaced.  Here is a quick scan of this forum for smart error 301:
    http://h30434.www3.hp.com/t5/forums/searchpage/tab/message?filter=location&location=forum-board%3ALa...
    I think the high heat situation and damaged your video chip at the very least and someone will have to open the laptop and reflow, reball or replace the video chip. If this machine is in warrantee, you need to call HP or contact them before it is out of warrantee.
    Reminder: Please select the "Accept as Solution" button on the post that best answers your question. Also, you may click on the white star in the "Kudos" button for any helpful post to give that person a quick thanks. These feedback tools help keep our community active, so you receive better answers faster.

  • I have an iPod, iPhone and iPad all set up to a Dell laptop. I recently got a Macbook Pro, how do I transfer all my control for my devices from the Dell to the MacBook?

    I have an iPod, iPhone and iPad all set up to a Dell laptop. I recently got a Macbook Pro, how do I transfer all my control for my devices from the Dell to the MacBook?  Can anyone help?

    http://www.apple.com/support/switch101/
    http://www.macworld.com/article/1153952/superguide_switchingtoamac.html

Maybe you are looking for

  • I used an external hard drive and now I cant open my iPhoto.

    It's saying I dont have permission to write to the library directory... whatever that means. So I have used up all of my space on my computer w pics I suppose so I bought a Seagate 1TB external hd to back up my computer so I could then delete pics wi

  • How can i remove a pages/numbers template

    How can i remove a pages/numbers template. They used to  be in the library in my home map, but i can't find the library on my HD. Is there anyone who knowes a solution Greets Kloria

  • Adobe Illustrator CS6 crashes

    Adobe Illustrator CS6 crashes with spinning ball on MAC OS X 10.6.8 on new or existing files. Help? Message was edited by: stanbujak

  • Issue with setting ratings and labels

    Greetings all. I am having an issue with setting ratings AND labels on image files at the same time. If the script sets the label first then the rating, the label doesn't show in Bridge. If the script sets the rating first then the label, the rating

  • Error with printer setup

    Error with printer setup but everyhing seems to be fine