Createjs adding mc to stage

Hi I used to do quite a bit of as3 word but not for quite some time (guess why???).  I am now having a play with flash pro6 and the toolkit for create js. I have to say I worked through the platypus example and it kinda left out all the things I wanted to know like the real easy stuff! So for example I want to add a mc to the stage with js --- how? The as bit works ... but I tried various combinations of
stop(); var fredd = new fred(); stage.addChild(fredd); fredd.x=100; fredd.y=100; /* js this.stop(); var fredd = new fred(); this.stage.addChild(fredd); */ 
but I just kept getting an comment about empty symbols and a helpful reminder about the timeline starting at 1. I feel sure this is very easy,  but I can't figure it out! Perhaps there is a real beginners resource somewhere that I am missing? Thanks

Here is a simple example of a fla that adds an mc to the stage with CreateJs:
http://www.ronaldliauw.nl/assets20130219/examples/AddMc/
And here is a complex CreateJs example:
http://www.ronaldliauw.nl/assets20130219/examples/bouwplaat/
In both examples the swf and the html generated with 'Toolkit for CreateJs' do  the same.
In both examples the swf is faster.

Similar Messages

  • Adding a new stage to UAR Workflow

    Hello Colleagues,
    Wonder whether you can provide some guidance on something I am struggling with. I simply want to add an additional stage to GRAC_USER_ACCESS_REVIEW workflow to pass the request back to the Security Team once it is approved by the role owner. This is just to make sure roles marked for removal by role owners during the UAR are appropriate. Can I do this with the standard workflow I am using in GRC, or do I need to create a new rule, agents etc.?
    I looked at creating a new stage under GRAC_DEFAULT_PATH.  All I see is GRAC_UAR_REVIEWER agent under available agents. Appreciate your help or if you can point me to any available documentation on adding an additional stage to UAR Workflow. I did search in SAP Marketplace, but could not find anything useful.
    Kind regard,
    Sonny

    Hi Alessandro,
    Thanks for your respons. I am just trying what you suggested.
    I was able to add GRAC_MSMP_SECURITY_LEAD_AGENT to Rules. When I try to add the Agent, I am getting a system message "Agent should be in customer name-space (x*/y*/z*)". Am I missing a step somewhere or does this need to be a custom agent?
    Kind regards,
    Sonny

  • Controlling properties on items added to the stage in a loop

    Hi there,
    I have a loop that adds xml elements to the stage (10). Once added, I need to control the items (checkbox = do something).
    Here is where I add them to the stage.
              private function createLayout():void {
                   container = new VBox();
                   for(var i:int=0; i<10; i++) {
                        vBox = new VBox();
                        hBox = new HBox();
                        titleText = new LinkButton();
                        itemInfo = new Text();
                        abstract = new Text();
                        archive = new CheckBox();
                        rateItem = new ComboBox();
                        category = new ComboBox();
                        var categoryLabels:Array = new Array("Food & Ag","News","Health","People","General","What's Coming","Biofuel","Environment");
                        var rateLabels:Array = new Array("Excellent","Good","Bad","Neutral","Controversial");
                        titleText.label = listCollection.getItemAt(i).title;
                        titleText.width = 400;
                        itemInfo.text = listCollection.getItemAt(i).source + " | " + listCollection.getItemAt(i).date;
                        abstract.text = listCollection.getItemAt(i).abstract;
                        abstract.width = 400;
                        archive.label = "Archive";
                        category.prompt = "Category";
                        category.dataProvider = categoryLabels;
                        category.rowCount = categoryLabels.length;
                        rateItem.prompt = "Rate";
                        rateItem.dataProvider = rateLabels;
                        vBox.addChild(titleText);
                        vBox.addChild(itemInfo);
                        vBox.addChild(abstract);
                        vBox.addChild(hBox);
                        hBox.addChild(archive);     
                        hBox.percentWidth = 80;
                        hBox.percentHeight = 80;
                        archive.addEventListener(Event.CHANGE, toggleArchive);                    
                        container.addChild(vBox);
                   addChild(container);
    I listen for a checkbox (change event) and when clicked, call a function that adds two comboboxes to the stage.
    archive.addEventListener(Event.CHANGE, toggleArchive);     
    I then call the function that will handle the event.
              public function toggleArchive(e:Event):void {
                   if(archive.selected == true){
                        hBox.addChild(category);
                        hBox.addChild(rateItem);                    
                   else {
                        hBox.removeChild(category);
                        hBox.removeChild(rateItem);
    When I have one item it works fine.
    for(var i:int=0; i<1; i++) {
    When I add 10 nothing happens. I feel like i should be doing something to identify what item I'm referring to. Any thoughts/reccomendations would br great!

    My apologies, but I am somewhat confused. Thanks for taking the time to help me (first off)!
    I changed the createLayout function to add name, visible, and includeInLayout propertiesfor each comboBox. I then changes the scope of "i" so that I can reference it from the function called upon the Event.CHANGE event.
              private var i:Number;
              private function createLayout():void {
                   container = new VBox();
                   for(var i=0; i<listCollection.length; i++) {
                        vBox = new VBox();
                        hBox = new HBox();
                        titleText = new LinkButton();
                        itemInfo = new Text();
                        abstract = new Text();
                        archive = new CheckBox();
                        rateItem = new ComboBox();
                        category = new ComboBox();
                        var categoryLabels:Array = new Array("Food & Ag","News","Health","People","General","What's Coming","Biofuel","Environment");
                        var rateLabels:Array = new Array("Excellent","Good","Bad","Neutral","Controversial");
                        titleText.label = listCollection.getItemAt(i).title;
                        titleText.width = 400;
                        itemInfo.text = listCollection.getItemAt(i).source + " | " + listCollection.getItemAt(i).date;
                        abstract.text = listCollection.getItemAt(i).abstract;
                        abstract.width = 400;
                        archive.label = "Archive";
                        category.prompt = "Category";
                        category.name = "category";
                        category.dataProvider = categoryLabels;
                        category.rowCount = categoryLabels.length;
                        category.visible = false;
                        category.includeInLayout = false;
                        rateItem.prompt = "Rate";
                        rateItem.name = "rateItem";
                        rateItem.dataProvider = rateLabels;
                        rateItem.visible = false;
                        rateItem.includeInLayout = false;
                        vBox.addChild(titleText);
                        vBox.addChild(itemInfo);
                        vBox.addChild(abstract);
                        vBox.addChild(hBox);
                        hBox.addChild(archive);    
                        hBox.addChild(category);
                        hBox.addChild(rateItem);
                        hBox.percentWidth = 80;
                        hBox.percentHeight = 80;
                        archive.addEventListener(Event.CHANGE, toggleArchive);                   
                        container.addChild(vBox);
                   addChild(container);
    now I have to modify these items by name from the toggleArchive method.
              public function toggleArchive(e:Event):void {
                   if(archive.selected == true){
                        var cb:ComboBox = hBox.getChildAt(i).getChildByName(category);
                        cb.visible = true;
                        cb.includeInLayout = true;
                   else {
    Two things, 1) i get an error saying...
    Severity and Description    Path    Resource    Location    Creation Time    Id
    1061: Call to a possibly undefined method getChildByName through a reference with static type flash.display:DisplayObject.    mediaTrap/src/components    listItems.mxml    line 132    1242667335601    643
    2) shouldnt it be something like this
              public function toggleArchive(e:Event):void {
                   if(hBox.getChildAt(i).archive.selected == true){
                        var cb:ComboBox = hBox.getChildAt(i).getChildByName(category);
                        cb.visible = true;
                        cb.includeInLayout = true;
                   else {

  • Objects added to the stage are not animated by AnimatorFactory

    Hi all,
    the following code ist a very simple animation. I added an object to the stage by dragging it from the library. Then I applied code generated by "Copy motion as AS 3" and the animation works fine.
    However, if i add another object by instating it in AS, add it to the stage by stage.addChild(...), and try to animate it by adding it as a target to the AnimatorFactory nothing happens.(Probably I made a simple newbi mistake.)
    Any ideas how to fix this? Thanks a lot in advance.
    Here is the code:
    import fl.motion.AnimatorFactory;
    import fl.motion.MotionBase;
    import flash.filters.*;
    import flash.geom.Point;
    var __motion_Symbol1_3:MotionBase;
    if(__motion_Symbol1_3 == null) {
        import fl.motion.Motion;
        __motion_Symbol1_3 = new Motion();
        __motion_Symbol1_3.duration = 34;
        // Call overrideTargetTransform to prevent the scale, skew,
        // or rotation values from being made relative to the target
        // object's original transform.
        // __motion_Symbol1_3.overrideTargetTransform();
        // The following calls to addPropertyArray assign data values
        // for each tweened property. There is one value in the Array
        // for every frame in the tween, or fewer if the last value
        // remains the same for the rest of the frames.
        __motion_Symbol1_3.addPropertyArray("x", [0,10.6348,21.2697,31.9045,42.5394,53.1742,63.809,74.4439,85.0787,95.7136,106.348,116.983 ,127.618,138.253,148.888,159.523,170.158,180.792,191.427,202.062,212.697,223.332,233.967,2 44.601,255.236,265.871,276.506,287.141,297.776,308.411,319.045,329.68,340.315,350.95]);
        __motion_Symbol1_3.addPropertyArray("y", [0,-0.151515,-0.30303,-0.454545,-0.60606,-0.757575,-0.90909,-1.06061,-1.21212,-1.36364,-1 .51515,-1.66667,-1.81818,-1.9697,-2.12121,-2.27273,-2.42424,-2.57576,-2.72727,-2.87879,-3. 0303,-3.18182,-3.33333,-3.48485,-3.63636,-3.78788,-3.93939,-4.09091,-4.24242,-4.39394,-4.5 4545,-4.69697,-4.84848,-5]);
        __motion_Symbol1_3.addPropertyArray("scaleX", [1.000000]);
        __motion_Symbol1_3.addPropertyArray("scaleY", [1.000000]);
        __motion_Symbol1_3.addPropertyArray("skewX", [0]);
        __motion_Symbol1_3.addPropertyArray("skewY", [0]);
        __motion_Symbol1_3.addPropertyArray("rotationConcat", [0]);
        __motion_Symbol1_3.addPropertyArray("blendMode", ["normal"]);
        // Create an AnimatorFactory instance, which will manage
        // targets for its corresponding Motion.
        var __animFactory_Symbol1_3:AnimatorFactory = new AnimatorFactory(__motion_Symbol1_3);
        __animFactory_Symbol1_3.transformationPoint = new Point(0.500000, 0.500000);
        // Call the addTarget function on the AnimatorFactory
        // instance to target a DisplayObject with this Motion.
        // The second parameter is the number of times the animation
        // will play - the default value of 0 means it will loop.
        __animFactory_Symbol1_3.addTarget(myClip, 0);
    var myClip1:Symbol1 = new Symbol1();
    stage.addChild(myClip1);
    __animFactory_Symbol1_3.addTarget(myClip1, 0); // NOTHING HAPPENS?

    if you create an animation that you want to apply to mulitple objects in cs4, you can create a motion preset:
    http://www.gotoandlearn.com/play?id=88
    in your coding problem, instead of adding myClip1 to the stage, add it to the main timeline.

  • How do deliveries get added to a stage in shipment

    I am trying to configure automatic determination of stages for deliveries in the shipment legs
    But every time all deliveries at all stages remain in one stage and then I have to move them manually or sometimes even that is not possible
    I must be doing something wrong
    Any ideas / tips from Gurus out there

    hi,
    Check out what you are missing in the steps you had followed from the standard procedure and also check the pre-requisites of automatic determination.
    Prerequisites
    This algorithm is triggered automatically in the following circumstances:
    When a route is entered in the shipment header
    After you carry out leg determination with category ‘0’ to ‘4’ (leg determination category ‘0’ initiates the assignment determination process only).
    Procedure
    Assignment determination is carried out as follows:
    The system analyzes the point of departure and destination for each delivery, one after the other (see also step 2 in Automatic Leg Determination.
    If the point of departure of this delivery is found among the departure points of the existing legs and the destination is found among existing destinations, the system then looks for the legs that connect these two locations.
    If the legs are incomplete (that is, if there are gaps between them), the delivery is assigned to all legs that start at the beginning point and also to all those that end at the destination.
    If only the departure point exists in the system, the system assigns all adjoining legs to the delivery.
    If only the destination exists in the system, all adjoining legs are assigned to the delivery (in other words, similar to step 3, only backwards).
    If neither the departure point nor the destination exists in the system and if the delivery is a preliminary leg shipment or subsequent leg shipment, it is assigned to all legs. All other shipments with no departure point or destination in the system are only assigned to main legs. If this does not work either (because the leg indicator is not maintained, for instance), the deliveries are assigned to all legs that were created manually.
    Now the system assigns the deliveries to border crossing points and load transfer points. The system then also checks which legs start or end at border point G, for example. All deliveries that are found in these legs are assigned to this border crossing point, since all deliveries that are shipped to this border crossing point must most likely go through customs.
    Only deliveries that are to be loaded or unloaded at this point or those whose shipping type or service agent changes (meaning that they must be transferred) are assigned to a load transfer point.
    If there are no legs that begin or end at this point, the system assigns all deliveries to this point.
    regards,
    Siddharth.

  • Can't figure out why tweener won't work after an loader is added to stage

    Hey all, I am working on an imageHolder class that will let me load an image into and then when the image has finished loading I want the default graphic that is a placeholder to fade out. Everything is working except one thing when the image has finished loading an is added to the stage I can't seem to get tweener to fade out the placeholder graphic. The weird part is that tweener in the onLoadComplete handler works for resizing the placeholder (and alpha as I did do a test with this also). Hope someone can help me shed some light on what my issue is.
    package com.jeremyseverson.display
         import caurina.transitions.*;
         import flash.display.Bitmap;
         import flash.display.Loader;
         import flash.display.Shape;
         import flash.display.Sprite;
         import flash.events.Event;
         import flash.net.URLRequest;
         public class ImageHolder extends Sprite
              private var placeHolder:Shape;
              private var loaderRef:Loader;
              private var urlRequest:URLRequest;
              private var _width:Number;
              private var _height:Number;
              private var _url:String;
              public function ImageHolder(url:String,w:Number,h:Number,color:uint)
                   _url = url;
                   _width = w;
                   _height = h;
                   placeHolder = new Shape();
                   placeHolder.graphics.beginFill(0x000000);
                   placeHolder.graphics.drawRect(-w/2,-h/2,w,h);
                   placeHolder.graphics.endFill();
                   placeHolder.graphics.beginFill(color);
                   placeHolder.graphics.drawRect((-w/2)+10,(-h/2)+10,w-20,h-20);
                   placeHolder.graphics.endFill();
                   addChild(placeHolder);
                   load(_url);
              private function load(url:String):void
                   loaderRef = new Loader();
                   urlRequest = new URLRequest(url);
                   loaderRef.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
                   loaderRef.load(urlRequest);
              private function onLoadComplete(evt:Event):void
                   var loaderRef:Loader = evt.target.loader as Loader;
                   loaderRef.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
                   var bmp:Bitmap = loaderRef.content as Bitmap;
                   bmp.x = -bmp.width/2;
                   bmp.y = -bmp.height/2;
                   bmp.smoothing = true;
                   var scaleVal:Number = loaderRef.width / loaderRef.height;
                   var dWidth:Number = _width;
                   var dHeight:Number = _height;
                   if (scaleVal > 1) dHeight /= scaleVal;
                   if (scaleVal < 1) dWidth *= scaleVal;
                   loaderRef.width = dWidth;
                   loaderRef.height = dHeight;
                   Tweener.addTween(placeHolder,{width:dWidth,height:dHeight,time:1,onComplete:onTweenComplete});
              private function onTweenComplete():void
                   loaderRef.addEventListener(Event.ADDED_TO_STAGE, onLoaderAdded);
                   addChild(loaderRef);
              private function onLoaderAdded(evt:Event):void
                   this.setChildIndex(loaderRef,0);
                   loaderRef.removeEventListener(Event.ADDED_TO_STAGE, onLoaderAdded);
                   Tweener.addTween(placeHolder,{alpha:0});

    I should also note that the fade out does happen but it is just a quick cut. Does not matter what I set the time value for in the tween.

  • Can I use the debugger to identify items on stage?

    Hi all,
    I have an app that uses several Loader objects to load extenral swf files.  Things go well except for one point.  I have a quiz element that's loaded through a loader named 'quiz'.  When the quiz is done, I remove the quiz element with removeChild(quiz).  The quiz disappears from the screen every time except for one question.  I can't identify what's going on differently for that question.  I've debugged this and can see that my quiz object is set to null, but I can plainly see the quiz still onscreen.
    To further confuse me, I use the same loader object multiple times through the app, and just add it and remove it from the display list with addChild and removeChild.  When my one problem question comes up and fails to go away, the app continues to the next question, and I can see that there are now 2 quiz objects stacked on top of each other.  I have no idea how this can happen when I'm using the same loader object for all the questions.
    Anyway, I'm hoping I can use the variables in the debugger to identify what I'm seeing onstage, but am not sure where to start looking.  Are all dispaly objects that are children of the app within the stage in the debugger variables?  The root?  I'm just not sure where to look.  If someone can tell me where to find the display objects on the stage or whatever in the debugger variables, that would be great and I can hopefully troubleshoot it from there.

    here's some code that might help . . . they're really pretty simple.
    Here are the 2 main methods that handles loading and unloading the quiz.
            public function put_question():void{ // BUILD LOADER TO LOAD QUIZ SWF
                quiz = new Loader(); // QUIZ IS A CLASS VARIABLE
                addChild(quiz);
                quiz.load(new URLRequest("quiz.swf"));
            public function quiz_done():void{
                removeChild(quiz);
                ethics_content.nextScene(); // ETHICS_CONTENT IS A CLASS VAR LOADER THAT WAS ADDED TO THE STAGE
    put_question is called from the timeline at the end of an animation.  The method executes and puts the quiz.  The quiz_done method is run when the user selects the right anwser, reads some feedback, then clicks to continue.
    I have 5 scenes before the problem point that use these methods and the work great.  The quiz appears, works fine, then disappears when the quiz_done function is called.  In the last scene, though, the quiz just doesn't disappear when the quiz_done function runs!
    I'm hoping I can find a way to use the debugger to set a break point at the end of the quiz_done method and then go through the display list and see what it is I'm still seeing, as the quiz should be removed from the display list at that point.

  • Possible to set the alpha of a component physically placed on the stage?

    I am trying to access a button that has been added to the stage to change it's alpha value.  I'm changing it from inside an object that is also on the stage.  So I thought this.parent.feed_btn.alpha=0 would work but flash is saying:
    1119: Access of possibly undefined property feed_btn through a reference with static type flash.display:DisplayObjectContainer.
    I would actually prefer to remove it, but removeChild threw up the same error.
    Can someone help please?

    I would create a function in the parent timeline for removing the event listener, since all of the parts likely live there, and just call that function.
    When you are commending this in the child...
    parent_mc.dogTimer.removeEventListener(TimerEvent.TIMER,updateApplication);
    Isn't the updateApplication function in the parent timeline?

  • Get reference to the stage in a AS Class

    Hello,
    I've created an AIR app with the minimeze() and close()
    options. Now these functions are handled in the MainApp.mxml of the
    application. But I want to move them to a class, so I don't have
    any AS in my MXML file.
    My app works like this now:
    MainApp.mxml creates a new instance the Main.as class (which
    extends MainVisual.mxml) by calling <mainVisual:Main /> in
    the MainApp.mxml
    MainVisual.mxml extends Canvas.
    There I handle all visual elements of my app, but I can't get
    a reference to the stage.nativeWindow here. Does anyone knows how
    to do this?
    Thanks!

    Every display object, including the Canvas, has a stage
    property. However, this property will be null until the Canvas
    object is added to the stage. You can use the ADDED_TO_STAGE event
    to detect when that happens.

  • Objects added to Sprite/MC not appearing

    Hello all, I've been working on building a game and encountered a strange problem this morning when instead of adding objects directly to the stage I needed to add them to a Sprite (I also tried this with a MovieClip) which was on the stage instead and they did not appear. If anyone can see why this is happening I will be eternally grateful, as it's got me stumped! And yes, before anyone says it, the MC/Sprite that I'm adding the objects to has definitely been added to the stage, I've made that mistake before and don't plan on making it again
    Essentially I have been building the game's levels using various different objects (rectangles, circles etc) built in the Box2D physics engine and with attached sprites to represent them to the user. When creating each of these object I supply a DisplayObjectContainer in which the sprite representing the object should be placed. Up until now I have been simply been supplying my core game class as the DisplayObjectContainer, with no problems whatsoever - everything is displaying fine. A new level design, however, will require me to apply a mask to the entire level (but not the GUI) so I decided to place all the level objects within a MovieClip or Sprite instead. I have created the new sprite as such:
    levelObjects = new Sprite();
    levelObjects.x = levelObjects.y = 0; //Just to make sure
    levelObjects.width = GameProperties.stageWidth;
    levelObjects.height = GameProperties.stageHeight;
    levelObjects.visible = true; //Just to make sure
    addChild(levelObjects)
    and have been supplying this sprite to the level objects as a DisplayObjectContainer instead of the core game class. Everything is getting added to the stage as I can click on things and the sounds associated with the game objects are playing correctly, but nothing is actually visible! As I mentioned above I tried this using a MovieClip instead but got the same result. Does anyone have any idea why this is happening and how I can fix it? Please post anything that might help, I've tried everything I can think of so now I'm going to rack your brains instead haha
    Thanks in advance,
    Dinkyfish

    Aha! Right, that's at least partially solved the problem, I'm now waiting until I have added the first object to the sprite before setting the width/height values. Thank you very much
    Unfortunately, things still aren't quite working the way they should as the entire sprite is now simply filled with a dark blue colour. Now quite a few of the objects I'm adding are dark blue in colour, but none should be big enough to obscure the entire sprite which is what I suspect is happening. Is there going to be some sort of conversion I'll have to do to the x/y/width/height values of the display objects I'm adding to the sprite? I thought it would simply be the same values I would need to supply if the sprite was the same size as the stage...

  • Canvas not displaying controls added with addChild

    I have a custom class holding some information, a property in
    the class is an XML string and another method parses the XML add
    creates controls (labels and buttons) based on the xml. I also have
    a variable named renderer which is a mx.containers.Canvas. After
    the XML is loaded and the controls are added using
    Canvas.addChild() I add the Canvas to my stage. The problem I'm
    running into is that even though the Canvas is added to the stage,
    I cannot see any of the controls inside of the canvas. Doing a
    trace(Canvas.numChildren()); I can see that I have added 101
    children to my canvas container (which is what my xml file shows)
    however they will not display. I know the canvas has been added to
    the stage because I can see the scroll bars when i set the policies
    to "on" and it even sets the scroll bars correctly if the
    components are too big for the canvas and would have to be scrolled
    down to see them all, it just doesn't show any of the components.
    Anyone run into a similar issue?

    Did you set an explicit width and height (or percentWidth and
    percentHeight, or styles top, left, top, bottom) on the controls
    you create? By default controls have 0x0 size. Creating controls in
    MXML causes additional code to be generated which gives the
    controls default sizes, but it won't happen in your own
    ActionScript code.

  • Accessing the stage variable problems in AS 3.0

    Hi. Quick question...I'm trying to access the stage variable
    which I believe is supposed to be global and I should be able to
    access it from any class. Is this true? The compiler is complaining
    that it doesn't recognize this variable? Note that these objects
    have not been added to the stage yet but still, these are compile
    time errors, so why is that I'm getting these errors?
    Thanks,
    Sam

    Sam,
    > Actually, this doesn't have to do with that question.
    > Basically, the compiler is complaining that it doesn't
    > recognize the stage variable.
    It complains about the DisplayObject.stage property? Are you
    referencing it in conjunction with a DisplayObject instance?
    > This is weird because in my AS 3.0 book, I see that
    > the stage variable is being accessed without
    instantiating
    > it or retrieving it.
    What book is that? I might have it, then I can see what
    you're seeing.
    > I am extending Sprite in all my classes.
    Yeah, Sprite extends DisplayObject, by of InteractiveObject,
    then
    DisplayObjectContainer, so it certainly is entitled to the
    stage property.
    Let me know what book you're looking at, and if I don't have
    it (and if
    you're still interested), I'll try to recreate a simplified
    proof of concept
    on this end.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Pop/Push MC to stage help

    I'm new to Actionscript 2.0 and I need some feedback on my (first!) attempt to create an array that will contain 8 instances of 2 different movieclips. As each (checkmark MCs) is added to the stage, another attention getter clip will be removed (circle MCs). So on my first frame of this command one bluecircle should be popped from the stage, and one bluecheck pushed. Then the same with the green clip on the next frame, again back to the blue's on the following frame, and finally both one blue set and one green set.
    Button
    invis_Btn.onRelease = function() {
        this.enabled = false;
        bar1.play();
        rt_Btn.enabled=true, new Tween(rt_Btn, "_alpha", 20, 100, 6, false);
    invis_Btn.addEventListener("click", markerPush)
    Poor attempt at an array
    var markerArr:Array = new Array("bluecircle", "bluecheck"+i, "greencircle", "greencheck"+i, "bluecircle", "bluecheck"+i, "greencircle", "greencheck"+i);
    for (i=0; i<8; i++) {
        var bluecheck:MovieClip = attachMovie("bluecheck"+i, this.getNextHighestDepth(), {_x:260, _y:400});
        var bluecircle:MovieClip = attachMovie("bluecircle"+i, this.getNextHighestDepth(), {_x:260, _y:400});
        var greencheck:MovieClip = attachMovie("greencheck"+i, bluecheck.getNextHighestDepth(), {_x:260, _y:400});
        var greencircle:MovieClip = attachMovie("greencircle"+i, bluecircle.getNextHighestDepth(), {_x:260, _y:400});
        function markerPush(event):Object {
            return markerArr.pop(bluecircle);
            trace("popped");
            return markerArr.push(bluecheck+i);
            trace("pushed");
    I had attached them and removed them via strict declarations of attachMovie(...) and removeMovieClip(...) linked to the next/previous buttons I had encoded but found that this was a bit buggy as it sometimes generated extra clips that weren't necessarily added and removed correctly depending on the step the user was at. Any suggestions? Am I approaching this with an improper solution? Would a switch command work better?
    Thanks in advance for any help!!

    Gotcha on the undefined i. My thinking was a for loop would give the range I was pushing into the array, which is 8 items. Is the event listener the AS3 code you're mentioning? I thought that listeners like this were defined in AS2...
    Deleting all the code and starting over isn't an option. This program is fully functional aside from this array. I'm not going to trash an entire project for a single bit of code that I've no experience with, and am having problems getting functional because it doesn't address the issue.
    I'm not following your assertion of markerPush() being repeatedly defined as I'm trying to have the invis_Btn trigger the listener (apparently the AS3 code I need to fix?) which in turn triggers the array to add the items to the stage.

  • GRC AC 10- Multiple detour for single stage path

    Hi Experts,
    I wanted to know about a possibility or view. Do you know anyway where we can have multiple detour activated(like first detour 1 then detour 2 check) for single stage.
    Actually once we click on routing rule, we get only select single detour selection option.
    Please suggest idea.
    (I would like to update that we do not want system to have multiple level of approver but only single role owner stage).
    Final solution is creating custom detour having ability to handle multiple scenario but we are looking for no custom initiator)
    Regards,
    Nishant

    Hi Nis,
    unfortunately in standard solution only one detour path can be added to single stage.
    When we had such a challenge, like you described, we simply used custom initiator and this is truly the best option to go.
    In our case we wanted to have different path (detour) for roles with special attribute an in the same time different path in case sod issue occurs. In other words we wanted to have 2 detours condition on one stage like you want to have. The option that suites our needs in the best way was to have custom initiator rule.
    Filip

  • Nested MC's position regarding stage

    Arrgh! Here it is.
    I have a master MC that's added to the stage via
    addChild(p2_mc).
    Inside that p2_mc, i have others MC'S (added to the stage
    manually, not via addChild).
    One of them is instanced fond_mc
    I want to position that fond_mc in the middle of the stage
    using that line of code WHEN the stage is resized. Obviously, the
    following line is into the resize function:
    fond_mc.x = stage.stageWidth/2;
    I works but returning faulty results because it uses left
    corner of the mc instead of registration point, which is top and
    center.
    I tried all math formula i could think of to no results.
    Keeps positionning the fond_mc wrongly.
    I know this is related to registration OR stage measurement.
    Is there a way to reset stage.stageWidth values INSIDE the
    resize function?
    Thanks!

    ahhh. so then when the container is brought to the stage it
    *is* being aligned at 0, 0 correct?
    ...> nope, it is aligned when created with this
    var p2_mc:MovieClip = new P2;
    MovieClip(root).addChild(p2_mc);
    p2_mc.x = stage.stageWidth/2;
    p2_mc.y = 0;
    The problem is WHEN i resizes, the children clips INSIDE the
    container has no references that i can understands.
    As i said, when i add this inside the resize function at root
    level, it works:
    p2_mc.x = stage.stageWidth/2;
    because in my test files, p2_mc is added BEFORE the resize
    function kicks off. And the childs move accordingly around the
    stage.
    But in my project file, p2_mc is dynamically created only
    when the user press a button. Therefore, the resize function isnt
    seeing p2_mc first hands and gives me error.
    I want to avoid adding ALL of my navigation clips to the
    stage on frame 2 (after the preloader) and BEFORE resize function
    is run. That would work i guess, but ill have to manually rendering
    them visible or not.

Maybe you are looking for