revive the functions of movieclips

Hello. I have a very simple concept map. To start, it only displays a button (b1) and when you click the next (g1) appears. Everything works well, but I have a button 'reload' to hide everything and display only the first box (b1) in its original position and I do not know how to code. Can you help me?

Show you the code:

"To hide the g1.

This.G1.alpha = 0

"To make g1 appear and change the color of the button b1.

This.B1.addEventListener ("click", fl_MouseClickHandler_2.bind (this));

function fl_MouseClickHandler_2()

{

This.B1.gotoAndStop (1);

This.B1.RemoveEventListener ("click", fl_MouseClickHandler_2.bind (this));

this.addEventListener ('check', fl_FadeSymbolIn.bind (this));

This.G1.alpha = 0;

function fl_FadeSymbolIn()

{

This.G1.alpha += 0.04;

If (this.g1.alpha > = 1).

{

this.removeEventListener ('check', fl_FadeSymbolIn.bind (this));

}

}

}

in general, you don't want to 'hide' interactive objects using their alpha property because they interact (with the mouse in your case), even when they are not visible.

You must use the Boolean property 'visible ':

This.G1.Visible = false;  to hide the g1

for g1 make visible again, set its visible property to true:

This.G1.Visible = true;

If you want to animate the alpha, you can do that too, but you'll probably still want to assign visible property (after discoloration is complete and before erasing plug-in software component begins).

Tags: Adobe Animate

Similar Questions

  • Access the function of MovieClip on an MC inside a ScrollPane

    I have a MC that is too big for my stage and want to place it inside a ScrollPane. The problem is to access the functions inside the MC. I tried scrollpane.content.mc.function but it does not work. How to access an mc inside the scrollpane?

    If you load an asset outside the swf file containing the ScrollPane, you must wait until loading is completed before you try to access any assets (including this function) in the loaded swf file.

  • Sending the name of MovieClip as a function argument

    I have a form in Flash that contains twenty fields to form a pair of MovieClip.TextField. Each domain has a single parent MovieClip name and common name of TextField. On submission of the form, I want to write the data in each field in a table.

    Rather than writing the same loop if-else if-else for each field, I want to write a function that accepts the unique MovieClip name as an argument. Attached is a simplified version of my code. What I am doing wrong?

    Sorry... answer my own questions second after asking them. I had to pass the name of MovieClip as a MovieClip to the argument. See code attached.

  • How to restrict the movement of movieclip on the stage?

    Hi, I want to spend my movieclip to the left and right, but he moves out of the scene. I want to restrict the movement of X the width of my step.

    This is my code for the movement of movieclip:

    import flash.events.KeyboardEvent;

    stage.addEventListener (KeyboardEvent.KEY_DOWN, moveavatar);

    function moveavatar (event: KeyboardEvent): void

    {

    If (event.keyCode is 39)

    {

    avatarmove.x += 10;

    }

    Else if (event.keyCode == 37)

    {

    avatarmove.x = 10;

    }

    }

    How do I limit the movement of X the width of my step so it won't leave the stage? Thank you.

    You have the registration point in the upper left corner. In my case, I had to focus. If you want to keep as you have, replace with this:

    import flash.events.KeyboardEvent;

    stage.addEventListener (KeyboardEvent.KEY_DOWN, moveavatar);

    function moveavatar(event: KeyboardEvent): void {}

    avatarmove.x = Math.max (0, Math.min (stage.stageWidth - avatarmove.width, avatarmove.x - int(event.keyCode==37) * 10 + int(event.keyCode==39) * 10))

    }

  • AS3/AIR - for the loop is ignored but the rest of the function to run

    This has left me speechless. It is either something really stupid on my part or part of the Flash. Here goes:

    I have a function that accepts all simply a table of movieclip references, executes a loop to add them to a sprite container, then the container gives a background color. It works perfectly the first time. Now, when the program returns to this feature yet it completely ignores the loop but always adds the background color. Here's the function:

    public void prepareContainer (sections): Sprite

    {

    trace ("prepareContainer called.");

    trace ("cuts" + sections);

    containerClips.splice(0,containerClips.length);

    trace ("containerClips.length is" + containerClips.length);

    for (var rs: int = 0; rs < sections.length; rs ++)

    {

    trace ("sections [" + rs + "] is" + [rs] sections);

    }

    var w: Number = 0;

    var l:Number = 0;

    for (var sx:int = 0; sx < sections.length; sx ++)

    {

    trace ("sx is" + sx);

    section of the sections [sx] = var;

    If (SX > 0)

    {

    section.y = sections [sx-1] there + .height sections [sx-1];

    w = section.width;

    l = l + section.height;

    }

    container.addChild (section);

    }

    container.graphics.beginFill (0xfafafa); Just for the background color in the container.

    container.graphics.drawRect (0,0,w,l);

    container.graphics.endFill ();

    containerClips = sections;

    for (var p:int = 0; p < containerClips.length; p ++)

    {

    trace ("containerClips [" + p + "] is" + containerClips [p]);

    }

    return the container;

    }

    You can also see that I have traces in the service to trace the content and the length of the incoming array.

    It's track of the first time through:

    called prepareContainer!

    sections.length is [object ViewPrevTranClosed_AEM], [medicareHead_AEM object], [object NAMEsubscriberSection_AEM], [object SearchInformationSection_AEM]

    containerClips.length is 0

    sections [0] is [object ViewPrevTranClosed_AEM]

    sections [1] is [object medicareHead_AEM]

    sections [2] is [object NAMEsubscriberSection_AEM]

    sections [3] is [object SearchInformationSection_AEM]

    SX is 0

    SX is 1

    SX is 2

    SX is 3

    containerClips [0] is [object ViewPrevTranClosed_AEM]

    containerClips [1] is [object medicareHead_AEM]

    containerClips [2] is [object NAMEsubscriberSection_AEM]

    containerClips [3] is [object SearchInformationSection_AEM]

    ============================================

    As you can see, the traces in the loops went very well and the result is as expected. The container is filled with the movieclips. However, on the next time through the result is that the background color and none of the movieclips are added to the container. The following trace shows also that the loops did not stand even if the table is full and there is no condition that stop the loops. This is the inside track:

    called prepareContainer!

    sections.length is [object ViewPrevTranClosed_AEM], [medicareHead_AEM object], [object NAMEsubscriberSection_AEM], [object SearchInformationSection_AEM]

    containerClips.length is 0

    Any ideas on what is the cause?

    You can have a circular reference. containerClips is the same table that the sections. Try this simple test:

    array1 = [1,2,3,4] var;

    var array2 = array1;

    array1.splice(0,array1.) Length);

    array1 = [];

    trace (array2. Length);

    I'm sure that you expect to see it trace 4, but it trace 0. Now try to use the line commented out instead. Now you get a record of 4.

    If somewhere in your code you establish sections also point to the same table as containerClips, that you really wanted to duplicate a table, you can use the concat:

    Var items = containerClips.concat ();

    It would be either his own picture double and a pointer to the same table.

  • How to revive the last work, then from the APP? Or system restart?

    How to revive the last work, then from the APP? Or system restart?

    EIB zu ADOBE: "geht nicht mehr!  (this function is not longer possible)

  • How to reuse the function to be triggered by multiple eventlisteners?

    The first line works and adds the movieclip "MyMC" of the library through links AS.

    I would like to reuse the function so I can replace MyMC MyMC2 MyMC3 etc with

    No idea how this is done?

    layer3Holder.myMc.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC2.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC3.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC4.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    function moveMC(e:MouseEvent) {}

    var newMC:MyMC = new MyMC();

    layer3Holder.addChild (newMC);

    newMC.x = 250;

    newMC.y = 250;

    newMC.addEventListener (MouseEvent.DOUBLE_CLICK, onDoubleClick);

    newMC.addEventListener (MouseEvent.MOUSE_DOWN, dragMC);

    newMC.addEventListener (MouseEvent.MOUSE_UP, dropMC);

    newMC.addEventListener (MouseEvent.MOUSE_OUT, dropMC);

    newMC.addEventListener (TransformGestureEvent.GESTURE_ZOOM, gestureZoomHandler);

    newMC.addEventListener (TransformGestureEvent.GESTURE_ROTATE, gestureRotateHandler);

    newMC.mouseChildren = false;

    newMC.doubleClickEnabled = true;

    }

    function onDoubleClick(e:MouseEvent) {}

    e.currentTarget.parent.removeChild (e.currentTarget);

    }

    function dragMC(e:MouseEvent) {}

    e.currentTarget.startDrag ();

    }

    function dropMC(e:MouseEvent) {}

    e.currentTarget.stopDrag ();

    }

    function gestureZoomHandler(e:TransformGestureEvent):void

    {

    e.currentTarget.scaleX * = e.scaleX;

    e.currentTarget.scaleY * = e.scaleX;

    }

    function gestureRotateHandler(e:TransformGestureEvent):void

    {

    e.currentTarget.rotation += e.rotation;

    }

    assuming that these references of Dispatcher mousedown are also names, you can use:

    layer3Holder.myMc.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC2.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC3.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC4.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    var newMC:MovieClip;

    function moveMC(e:MouseEvent) {}

    do something with of the previous newMC?

    code here.

    {if (e.currentTarget.Name.substr (4).)} (Length>0)}
    var:Class=Class(getDefinitionByName("MyMC"+e.currentTarget.name.substr(4))) C;
    newMC = new C();
    } else {}
    newMC = new MyMC();
    }

    layer3Holder.addChild (newMC);

    newMC.x = 250;

    newMC.y = 250;

    newMC.addEventListener (MouseEvent.DOUBLE_CLICK, onDoubleClick);

    newMC.addEventListener (MouseEvent.MOUSE_DOWN, dragMC);

    newMC.addEventListener (MouseEvent.MOUSE_UP, dropMC);

    newMC.addEventListener (MouseEvent.MOUSE_OUT, dropMC);

    newMC.addEventListener (TransformGestureEvent.GESTURE_ZOOM, gestureZoomHandler);

    newMC.addEventListener (TransformGestureEvent.GESTURE_ROTATE, gestureRotateHandler);

    newMC.mouseChildren = false;

    newMC.doubleClickEnabled = true;

    }

    }

    function onDoubleClick(e:MouseEvent) {}

    e.currentTarget.parent.removeChild (e.currentTarget);

    }

    function dragMC(e:MouseEvent) {}

    e.currentTarget.startDrag ();

    }

    function dropMC(e:MouseEvent) {}

    e.currentTarget.stopDrag ();

    }

    function gestureZoomHandler(e:TransformGestureEvent):void

    {

    e.currentTarget.scaleX * = e.scaleX;

    e.currentTarget.scaleY * = e.scaleX;

    }

    function gestureRotateHandler(e:TransformGestureEvent):void

    {

    e.currentTarget.rotation += e.rotation;

    }

  • Have a specific return on the main timline movieclip finished image

    Hello!

    IM doin a project on the main timeline is only mounts. on the first fram ive coded for a button that directs the user to the next section. frame 2 there is an empty movieclip that is suppused to load random movieclips. the problem is when the movieclip it ends a few loops and doesent load a random.

    I have an eventlistener when the movieclip ends and then heads back to the chassis tuned for. but its framework of djemel go one so the user must press the first button again, or he comes in loop the

    I tried googleing the problem and I spent hours hours at least n change the code on n. I can also say that starting iam in actionscript.

    Here is my code:

    maintimline part 1

    Stop()

    addEventListener ("finished", child);

    function Child(e:Event):void

    {

    gotoAndPlay (e.target.frameVar);

    }

    var movieArray:Array = new Array();


    movieArray = ['bananlrdator', 'hundlrkatt', 'fisklrhand'];
    If ((movieArray [Math.floor (Math.random () * 3)]) == 'bananlrdator') {}

    myMovieClip = new bananlrdator();

    } ElseIf ((movieArray [Math.floor (Math.random () * 3)]) == 'hundlrkatt') {}

    myMovieClip = new hundlrkatt();

    } ElseIf ((movieArray [Math.floor (Math.random () * 3)]) == 'fisklrhand') {}

    myMovieClip = new fisklrhand();

    } else {}
    myMovieClip = new fisklrhand();

    }

    var myMovieClip:MovieClip;
    spelastart.addEventListener (MouseEvent.CLICK, scen2);
    function scen2(event:MouseEvent):void {}
    gotoAndPlay (2);
    Stop()

    emptyMC_mc.addChild ("myMovieClip");

    }

    This is my code in the movieclip endframe:

    var frameVar:int = 2;

    dispatchEvent (new Event ("finished", true));

    MovieClip (parent) .gotoAndPlay (2);

    Thanks in advance!

    Here's a working version of the code.  I changed it slightly to add the event listener 'finished' for the clips.  Everything at the bottom is a link to a sample file that corresponds to the code.

    Stop();

    spelastart.addEventListener (MouseEvent.CLICK, scen2);

    function scen2(event:MouseEvent):void {}
    Child();  to start things
    }

    var myMovieClip: *;

    var movieArray:Array is ['bananlrdator', 'hundlrkatt', 'fisklrhand'];.

    Shuffle (movieArray); using a function of brewing

    var indexCounter:uint = 0;

    function Child(e:Event=null):void / / null value allows to call the function without event argument
    {
    If (myMovieClip! = null) removeChild (myMovieClip); remove the current if there is a

    var ClassRef: Class = Class (getDefinitionByName (movieArray [indexCounter]));
    myMovieClip = new ClassRef();
    If (! myMovieClip.hasEventListener ("finished")) {/ / add this condition}
    myMovieClip.addEventListener ("finished", child);
    }
    addChild (myMovieClip);
    indexCounter += 1;
    if(indexCounter == movieArray.Length) indexCounter = 0; Reset the counter when all played.
    }

    function shuffle(a:Array) {}
    var p:int;
    var t: *;
    var ivar:int;

    for (ivar =. Length-1; Ivar > = 0; Ivar-) {}
    p = Math.Floor ((Ivar+1) * Math.Random ());
    t = a [ivar];
    a [ivar] = a [p];
    a [p] = t;
    }
    }

    At the last frame of each movieclip inside, I have...

    Stop();

    dispatchEvent (new Event ("finished", true));

    Here is a link to a sample file that shows it works.

    http://www.nedwebs.com/Flash/AS3_cycle_random_clips.fla

  • Get the value of the variable inside the function from the event (EventListener)

    How to get the value of the variable inside the function from the event. Variable has been declared as a function of external events.

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, myClickReaction);
    
    function myClickReaction (e:MouseEvent):void{
    StringVar="other sample";
    }
    
    trace(StringVar); /* it gives me "sample" value and i would get "other sample" value */ 
    

    This strange because if it would be the trace of a normal function would give me good result.

    var StringVar="sample";
    
    
    function myClickReaction():void{
    StringVar="other sample";
    }
    
    myClickReaction();
    trace(StringVar); /* it gives me result as i wanted to have - "other sample" value */ 
    

    I also know method of passing of arguments depending on the event, but it doesn't for me as I would like to

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, function(e:MouseEvent){ myClickReaction(e, StringVar) },false, 0, true);
    
    function myClickReaction (e:MouseEvent, StrVar:String):void{
    
    StrVar="other sample";
    }
    
    trace(StringVar); /* it also gives me "sample" value and i would get "other sample" value */ 
    

    How to do it correctly?

    I do not know the structure of your screen lists so I can't tell you how to access the variable, but you're on the right track. If it's a parent, then you can always use the .parent property to cross to the top the list display to try to access.

    for example 1 level:

    MovieClip (this.parent). StringVar = "another sample";

    Add more properties .parent to continue to move to the top of the list.

    for example:

    MovieClip (this.parent.parent). StringVar = "another sample";

    Just like always, use traces (MovieClip (this.parent). StringVar); until you get the value that you want to know that you're accessing them correctly.

  • How can I change the function of a flash button?

    Hello

    You are not sure if this should go in the Flash forum or Captivate forum, but nobody knows how, where to find ActionScript 3 orders for Captivate?

    I downloaded a pre-made button Flash (source file) for Adobe Captivate, which was originally made to make a video go to the next slide when you press. He does it very well, but I wanted to know how use the ActionScript in Flash Professional CS5 to have the button JUMP to a specific slide in Captivate, rather than just go to the NEXT slide. I know that usually how the code works, but have never really used and do not know the specific command to get there. Currently, the relevant part of the code of the 'Flash' button reads:

    function clicked(e:MouseEvent):void {}

    var myRoot:MovieClip = MovieClip (root);

    var mainmov:MovieClip = MovieClip (myRoot.parent.root);

    mainmov.rdcmndNextSlide = 1;

    I think I should just change the last line to something else and it should work, but I need the command. Can someone tell me what needs to be changed in the code above to get there?

    The full code is below. Thank you.

    code.JPG

    Here is an answer for everyone out there trying to do the same thing.

    To change the function, simply change "rdcmndNextSlide = 1" to another command with its variable. Commands and variables can be found here:

    http://www.cpguru.com/2010/07/20/Adobe-Captivate-5-system-variables/

  • How to set the root for MovieClip?

    Hello

    The code below works fine when I place my button on the main time line... When I place my button inside a MovieClip, it will never work and never fix the circle library? can tell me please what what should I change, when my button is inside a MovieClip.

    Loading image is fine, but my loading circle is not visible...

    Thank you...

    btn_About.addEventListener(MouseEvent.CLICK, Loading_AboutImage);
    
    function Loading_AboutImage(event:MouseEvent):void
    {
         import gs.*;
         
         var holder:MovieClip = new MovieClip();
         var circles:Array = new Array();
         for (var i:uint=0; i < 5; i++)
         {
    
              var circle:PreloaderCircle = new PreloaderCircle();
              circle.x = i * 20;
              circle.tweened = false;
              circles.push(circle);
              holder.addChild(circle);
         }
         addChild(holder);
    
         var holderWidth:Number = holder.width;
         var holderHeight:Number = holder.height;
         holder.x = stage.stageWidth / 2 - holderWidth / 2;
         holder.y = stage.stageHeight / 2 - holderHeight / 2;
    
         var loader = new Loader();
    
         loader.load(new URLRequest("bgs/bg2.jpg"));
    
         loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    
         function progressHandler(e:ProgressEvent):void
         {
              var loadedPercentage:Number = (e.bytesLoaded / e.bytesTotal) * 100;
    
              if (loadedPercentage > 20 && ! circles[0].tweened)
              {
                   TweenLite.to(circles[0], 1, {tint:0xff8800, glowFilter:{color:0xff8800, alpha:1, blurX:10, blurY:10}});
              }
    
              if (loadedPercentage > 40 && ! circles[1].tweened)
              {
                   TweenLite.to(circles[1], 1, {tint:0xff8800, glowFilter:{color:0xff8800, alpha:1, blurX:10, blurY:10}});
              }
    
              if (loadedPercentage > 60 && ! circles[2].tweened)
              {
                   TweenLite.to(circles[2], 1, {tint:0xff8800, glowFilter:{color:0xff8800, alpha:1, blurX:10, blurY:10}});
              }
    
              if (loadedPercentage > 80 && ! circles[3].tweened)
              {
                   TweenLite.to(circles[3], 1, {tint:0xff8800, glowFilter:{color:0xff8800, alpha:1, blurX:10, blurY:10}});
              }
    
              if (loadedPercentage == 100 && ! circles[4].tweened)
              {
                   TweenLite.to(circles[4], 1, {tint:0xff8800, glowFilter:{color:0xff8800, alpha:1, blurX:10, blurY:10}, onComplete: circlesTweened});
              }
         }
         function circlesTweened():void
         {
              for (var i = 0; i < circles.length; i++)
              {
                   TweenLite.to(circles[i], 0.5, {delay: i * 0.1, x: -200, alpha: 0, onComplete: circleLeft, onCompleteParams: [circles[i]]});
              }
         }
    
         function circleLeft(circle:PreloaderCircle):void
         {
              holder.removeChild(circle);
              if (circle == circles[4])
              {
                   removeChild(holder);
    
                   var bm:Bitmap = (Bitmap)(loader.content);
                   Object(root).pic.addChild(bm);
                   TweenLite.from(Object(root).pic, 1, {alpha: 0});
              }
         }
    }
    

    You can access the root using MovieClip (root).

  • Run the function of the stadium of as a file

    Hello guys,.

    I make a game in action script.

    I have the regular scene (stage) with functions of ActionScript, game initialization etc.,

    and external AS files with (assigned to some clip) works

    Can I perform the function which is on the stage of this folder?

    I tried this:

    var host: MovieClip = MovieClip (this.parent.parent);
    main.increaseScore ();

    this.parent.removeChild (this);

    It workes inside a movieclip, but not in the external file (CLASS)...

    Thank you very much!

    use that newly created class as a class Document (you can set it by clicking on the empty stage and passage to the properties pane, there are small field with a pen top, put the name of your class without the .as endpoint and your file should work.

  • Creation of a logic of the function of the buttons created dynamically XML

    Hello!

    It's me...! Now, I created some buttons using XML dynamically. They are spread around the stage, and I modified it a tooltip script to give each key a ToolTip on Mouse_Over. But is the logic and make it work using AS3 is hard (for me). I want a function that take parameters: Tooltip text and ToolTip object.

    In my code, I get this error msg on cast the function on dynamically created buttons:

    1118: constraint implied a value with flash.display:Sprite of static type of a type may be unrelated to flash.display:MovieClip.

    In my view, there is more than one thing here that need a fix.

    Can someone take a look and give me a pointer?

    Thank you

    function contentTooltip(ttt:String,_ttclip:MovieClip):void {}
    ttclip.addEventListener (MouseEvent.MOUSE_OVER, mouseOverHandler);
    function mouseOverHandler(e:MouseEvent):void {}
    //
    ttip. Descr.Text = TTT;
    ttip.x = internship. MouseX;
    ttip.y = internship. MouseY-15;
    ttclip.addEventListener (MouseEvent.MOUSE_OUT, mouseOutHandler);
    ttclip.addEventListener (MouseEvent.MOUSE_MOVE, OnMouseMoveHandler);
    ttip. Visible = true;
    }
    function mouseOutHandler(e:MouseEvent):void {}
    ttip. Visible = false;
    ttclip.removeEventListener (MouseEvent.MOUSE_OUT, mouseOutHandler);
    ttclip.removeEventListener (MouseEvent.MOUSE_MOVE, OnMouseMoveHandler);
    }
    function mouseMoveHandler(e:MouseEvent):void {}
    ttip.x = internship. MouseX;
    ttip.y = internship. MouseY-15;
    }
    }
    contentTooltip ("Button", scale_btn);
    contentTooltip ("hide" button, hide_btn);

    The created two buttons dynamically MovieClips or Sprites?  Your contentTooltip function seeks a MovieClip.  When you get this error message from the compiler must point to a line to indicate the source (or something related to the source) of the problem.

    Additive... it is not advisable to place named functions within other functions.  It will be a good habit to break, if someone taught you to do.

  • Get the dynamically loaded movieclip content

    Hey,.

    After trying without success to get the totalframes to a .swf dynamically loaded in AS3, I regressed to AS2.

    Now, I can add the clip and get the totalframes of content, no problem.

    The problem is that I can't resize the content at all.
    I have no idea how to target the loaded content.

    Here is the code I use:

    var myXML:XML = new XML();
    var path:String;
    var mcl:MovieClipLoader = new MovieClipLoader();
    var mclm:MovieClipLoader = new MovieClipLoader();
    var mclL:Object = new Object();
    var frames:Number;
    var i:Number = 0;
    var mc:MovieClip = new MovieClip
    myXML.ignoreWhite=true;
    myXML.load("content.xml");
    
    holder_mc._alpha = 0;
    
    myXML.onLoad = function(xmlLoaded){
    menu();
    load();
    }
    
    
    
    mclL.onLoadComplete = function() {
              frames = (MovieClip(holder_mc)._totalframes);
              if (frames == 1) {
                   image();
              }
              else if (frames > 1) {
                   clip();
              }
         }
    
    load = function(){
         clearInterval(timer);
         path = myXML.firstChild.childNodes[i].childNodes[1].childNodes[0].nodeValue;
         mcl.loadClip(path, holder_mc);
         var tFiles:Number = myXML.firstChild.childNodes.length;
         if (i < tFiles){
              i++;
         }
         else if (i == (tFiles)){
              i=0;
              load();
         }
         mcl.addListener(mclL);     
    }
    
    image = function() {     
         seconds=1000;
         holder_mc._alpha = 100;
         timer = setInterval(load, seconds);
    }
    
    clip = function() {     
         holder_mc._alpha = 100;
         ftimer = setInterval(checkFrames, 100);
    }
    
    checkFrames = function() {
              frame = (MovieClip(holder_mc)._currentframe);
              if (frame==(frames-1)){
                   clearInterval(ftimer);
                   load();
              }
         }
         
    menu = function(){
         
         var tFiles:Number = myXML.firstChild.childNodes.length;
         for (me=0; me < tFiles; me++){
         path = myXML.firstChild.childNodes[i].childNodes[1].childNodes[0].nodeValue;
         i++;
         _root.attachMovie("circle", "circle"+me, me, {_x:(me*30), _y:330});
         mclm.loadClip(path, ("circle"+me));     
         }
         
    }
    

    I need to resize the content as well for the main holder_mc, as well as for menu items.

    Use onLoadInit():

    mclL.onLoadInit = function(target:MovieClip) {          frames = target._totalframes;          if (frames == 1) {               image();          }          else if (frames > 1) {               clip();          }// size target here     }
    
    
    
  • How to access the functions on my main SWF of my external SWF?

    Hello someone can help me how to access the functions on my main SWF file of a loaded SWF file?

    Forget using parent. Send an event to the place.

    btn3.addEventListener(MouseEvent.CLICK, btnClickHandler);
    function btnClickHandler(e:MouseEvent):void {
         dispatchEvent(new Event("categoryClick");
    }
    

    In your main swf file, listen for the complete event on the Loader.contentLoaderInfo.

    In the complete event handler, add an event listener for the categoryClick (or you have chosen to call it) on the loaded swf file.

    // event handler triggered when external swf is loaded
    function loaderCompleteHandler(event:Event) {
        (event.currentTarget.content as MovieClip).addEventListener("categoryClick", categoryClickHandler);
    }
    
    function categoryClickHandler(event:Event):void {
        trace("category button clicked in loaded swf");
    }
    

    And remember, whenever you use root or parent, God kills a kitten.

Maybe you are looking for

  • Resizing partitions on a Satellite U400

    Hi all I would be really grateful if anyone can help with the following text: I recently bought a Toshiba U400 with a 200 GB hard drive. The hard disk is partitioned with Vista 94.4 gig (C) and gig (D) of data 90.3, I see that only about 3 gig is use

  • Using desktop remotely, I try to print on a printer different computers by the server and remote desktop. Does not

    With Server 2003, when you remotely connected with office, you could share your printers with everyone who has logged on to the server with the Office remotely and printed at the printing house they shared.  If the server had 10-12 different printers

  • Parameters to win 8 and SSD drive

    Just bought a h9 - 1440t with windows 8 pro and an SSD. Can you tell me: 1 - is the motherboard SATA 2 or SATA 3? 2. are there additional parameters I should do to ensure the best performance of the SSD drive? I was led to believe that I had to disab

  • VCS 7.2.2. and the integration of Lync 2010

    Hi all / Andreas,. I was hoping that you could help us with a problem we have in our lab environment to get one of our areas of Lync 2010 and our video customers talk together. Basically, we have only one video field ([email protected] / * /-2 areas

  • Get the text from other text fields

    Helloon the title page of may document I put the date and the version number of my document. I want those to appear again on every page of my document, but not in the same place as and smaller than on the title page. So, I could simply create new are