Movieclips visibility

Hi, having trouble with something.  I have created two symbols which I intend to display on a button click.  In actionscript, I have assigned each symbol to a movieclip variable.  If i then set their visibility to false, they do not display.  However, if I then set it to true within a buttons event, they display but disappear as soon as I move the mouse away (And the event is a CLICK event.)
I then tried to set the movieclips to be inivisible onEnterFrame, but this keeps them invisible all the time.
Next, I made them inivisble on a button click, and on a different button click, I made them appear.  This worked perfectly.  Only problem is that I cant make them invisible on a button click, they need to be invisible from the beginning.
So, its a bit like this
var m1:MovieClip = myMenu_mc;
var m2:MovieClip = myMenu_mc2;
m1.visible = false;
m2.visible = false;
btn1.addEventListener(MouseEvent.CLICK, mouseClickEvent2);
function mouseClickEvent2(eve:MouseEvent):void
    m1.visible=true;
    m2.visible = false;
The above way works but when I move the mouse away from the button, the symbol goes invisible again, and doesnt stay.
Any advise on how to get this working?
Cheers

I have gone through everything, and from what I can make out, stops are everywhere.
I started a new.  Let me explain things.
I have my main stage. On a layer here, I have a menu symbol.
If i double click inside the menu symbol, I have several buttons in here.  I also have several animation frames doing tweens etc using a plain rectangle box.  These buttons only make up the main nav, one row, and now I need to add a sub menu on click.  Now, I can either go into the actual insividual buttons, and do something there, or I could do it inside the movie clip I am currently in.
At the moment, I have tried doing things in the current movie clip.  I add the submenu symbols to the stage and set them invisible.  On button click, I then set them visible.  However, once I move away from the button, the submenu disappears.
I have also tried setting them invisible on a button click, and then visible on different button clicks.  Wierd thing is, doing it this way, the menu displays from the beginning.  I then click on the button to make them invisible.  Now I click on the buttons which make them visible.  This time, they stay, and do not dissapear when I move my mouse away.  However, I cant use a button click to make the buttons invisible from the beginning.
I then tried setting them invisible on enter frame.  This kept them invisible all the time though.
Why the second way works, no idea.  And why the first way does what it does, when the code is exactly the same apart from setting them invisible on a button click.
Anyone know what I should do here to resolve this issue?
cheers

Similar Messages

  • Make movieclip visible for a specific time duration

    Is there any possibility to make a movieclip visible for a specific time (e.g. 5sec.)? I want to make "srch275" show for 5 seconds and then make it disapear. Can this be achived?
    sruch_btn.onRelease = function () {
    if (cosearchbx.text == "APPLE"){
    srch275._visible = true;

    use setTimeout():
    sruch_btn.onRelease = function () {
    if (cosearchbx.text == "APPLE"){
    clearTimeout(srch275TO);
    srch275TO=setTimeout(srch275F,5000);
    srch275._visible = true;
    function srch275F(){
    srch275._visible=false;

  • Make a movieclip visible when an object is dragged onto it

    i am ridiculously new to codeing in flash (or any program) and am trying to make a movieclip only visible when a object is dragged onto it, can someone show me the code for that?

    Something like the following might work (not tested)...
    movieclip.alpha = 0;
    object.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
    function dragObject(evt:MouseEvent):void {
          object.startDrag();
          stage.addEventListener(MouseEvent.MOUSE_MOVE, checkObject);
          stage.addEventListener(MouseEvent.MOUSE_UP, endDrag);
    function checkObject(evt:MouseEvent):void {
          if(object.hitTestObject(movieclip)){
              movieclip.alpha = 1;
          } else {
              movieclip.alpha = 0;
    function endDrag(evt:MouseEvent):void {
          stage.removeEventListener(MouseEvent.MOUSE_MOVE, checkObject);
          stage.removeEventListener(MouseEvent.MOUSE_UP, endDrag);

  • AS3 sucks !!! Why can't access a simple movieClip ???

    Hi People,
    Please - it's as simple as that:
    I have a stageand there is a movieClip instance called "obiekt" in it. Inside "obiekt" movieClip there are two other clips. One instance is called "z1" and another one is called "z2".
    Presume I have a event listener in "z2" what in case of mouse rollover calls a function what is supposed to set "z1" movieClip 'visible' property to true.
    But why the hell when I code:
    root.obiekt.z1.visible = true;
    I get this error:
    1119: Access of possibly undefined property obiekt through a reference with static type flash.display:DisplayObject.
    Jesus - what's the hell - scripting a simplest thing in AS3 requires definig some bloody classes, extending other, importing whatever packages... Only to accesss a movieclip on the stage!!! If I were to do the thing this way I would rather learn C++ not Flash. Flash was supposed to simplify multimedia not making it worse!
    Can anybody help me here? It's really urgent !!!
    Rgs,
    Ziggi

    Look into event bubbling.
    I posted an example in this thread yesterday:
    http://forums.adobe.com/thread/433959?tstart=0
    http://muzakdeezign.com/cs4/Surrey-florist-gallery3.fla
    Best is to forget about root and trying to access objects in a "parent".
    It's all about event dispatching.

  • How to load movie...

    Hi,
    I have the following code to make a movie clip appear when
    the user rolls over a symbol.
    The part I am missing is how to make that movie clip appear.
    I can't seem to figure that out.
    I will have about 20 symbols that each need a different movie
    clip to appear on the screen as it is rolled over... this is the
    code for one of those symbols.
    sourceGlass_mc.addEventListener(MouseEvent.ROLL_OVER,
    sourceGlassOver);
    function sourceGlassOver(event:MouseEvent):void
    sourceGlass_mc.buttonMode = true;
    Any ideas?
    Thanks!!

    why isn't the movieclip visible to start? ie, is its visible
    property false, does it not exist, has it not been added to the
    stage etc?

  • XStream - Deserializing with Properties

    Hi All,
    my problem is about the deserialization of XML-files with XStream. The standard XML-structure looks like that:
    <Inhouse>
    <Date>"12.12.2004"</Date>
    <MadeBy>"SELF"</MadeBy>
    </Inhouse>
    Deserializing such files is no problem, but my converter only works with that format:
    <Inhouse>
    <Date value="12.12.2004"/>
    <MadeBy value="SELF"/>
    </Inhouse>
    So I tried to register the PropertyConverter, but the equal is the same.
    What have i done wrong? I think XStream CAN work with Properties in an XML-Tag, but I don't know how to tell it...
    Please help me
    thx, Holger

    Hi jpsoul,
    Thanks for your response! What I'm trying to do is
    instantiate Child_Instance inside Main so that if I wanted to, I
    could type:
    b.test.visible = true;
    inside of the Main.as file and that would make the test
    movieClip visible upon compiling it. I'm just trying to access
    properties and methods of classes I instantiate whose properties
    reside on a different stage per say.
    Hope that makes sense. =)
    ~e

  • I want to create a interactive web animation with 4 different animations.

    The interface is a square box with text "Click a button on the left to see an animation demostration with the buttons on the side. How do you make the text disappear, when you click the button to show the animation and then let the text reappear on the screen after the animation is complete.
    Any help would be much appearciated at this time.

    Is that the appreciation you intended to show?  Do you realize that people that help here volunteer their time?  Do you realize that you are posting at a time of day when the likelihood of anyone being around to offer help is next to nil?
    While I would have just left you hanging for your last remarks, here's a tidbit... If you want to make things disappear/appear, place them in a movieclip and set the movieclip 'visible' property to false/true as desired.

  • How to make a loop that changes two different movieclips from visible to invisible every second

    I am writing some code that puzzles me. It may be, because I have a cold or because I've never needed to do anything like this. I want to have two movieclips one is visible and one is not. then one second passes the one that was visible is invisible and the invisible one is visible. What would be the best approach to this, besides handcoding if statements. I know there has to be a faster way and less expensive way than handcoding if statements.
    I'd like to thank anyone who replies in advance .

    this is how i would do it
    package
              import flash.display.MovieClip;
              import flash.display.Sprite;
              import flash.events.TimerEvent;
              import flash.utils.Timer;
              public class Main extends Sprite
                        private var mc1:MovieClip;
                        private var mc2:MovieClip;
                        public function Main()
                                  // create your mc's here
                                  mc1 = new MovieClip();
                                  mc2 = new MovieClip();
                                  mc2.visible = false;
                                  var timer:Timer = new Timer(1000);
                                  timer.addEventListener(TimerEvent.TIMER, loop);
                                  timer.start();
                        private function loop(e:TimerEvent):void
                                  mc1.visible = !mc1.visible;
                                  mc2.visible = !mc2.visible;

  • How to catch the event when a MovieClip is visible/invisible?

    Is there event for that e.g. activate/deactivate? Thanks,

    there's are events for when a movieclip is added and removed from the display, but not for the visible property.

  • Button "Over" State Not Working Within Visible MovieClip

    Hi Folks,
    My button states aren't working right, and I'm pulling my hair out:
    http://www.miklas.org/test/test.htm
    The desired behavior is under the "Design..."  button--notice how when you mouseover the "Our Philosophy" link it turns blue? Why isn't  this happening for the "What We Can Do For You" and "Our Process" buttons in the other movieclips?
    The document is structured as follows:
    MovieClip 1: Design: Your Silent Salesperson
    ---Text
    ---Images
    ---Button: Our Philosophy
    MovieClip 2: Who Owns Your Brand
    ---Text
    ---Images
    ---Button: What We Can Do For You
    MovieClip 3: What's Your Brand's Persona
    ---Text
    ---Images:
    ---Button: Our Process
    DETAILED EXPLANATION:
    I have three separate movie clips with a bunch of objects. Using AS3,  I  tween their alpha value from 0 to 1 to make them visible depending on a  user mouseover. As part of each movieclip I have a button. It is text  with an underline; made to look like a hyperlink. When the user mouses  over the text, I want it to change color from orange to blue. This works  on the first movieclip, but doesn't on the second and third! What's  weird is that if I cut-and-paste the button from the second or third  movieclip to the first, the over state works fine. If I set Control  -> Enable Simple Buttons, the over state works fine. But when I  export it to .swf, it doesn't work!?
    tyvm!

    OK I finally got it! My layers were indeed out of whack--the entire problem was solved by the"setChildIndex" function.
    Basically, when the user mouses over the buttons, I fade in the new clip, and set the depth above the other movie clips. Here's the code:
    buttons_movieClip.whyDesign_button.addEventListener(
      MouseEvent.MOUSE_OVER,
      function(evt:MouseEvent):void
          if (active != whyDesign_movieClip)
            fade(whyDesign_movieClip);
            setChildIndex(whyDesign_movieClip,3);
            setChildIndex(whoOwns_movieClip,2);
            setChildIndex(persona_movieClip,1);
    There is a black background at depth 0. The following forum post helped a lot:
    http://www.smithmediafusion.com/blog/?p=435
    tyvm!

  • Movieclip becomes visible and attached to cursor

    I have a simple escape game almost finished but want to try something different.  I already have movieclips on the stage when clicked become (._visible=false;) and the inventory mc, visible=true.  Then i can drag the inventory mc's around to interact with other parts of the game.
    My request (hopefully answered simply) is help on having the inventory mc already attached to the cursor (onPress?) when the mc on the stage is clicked.  Basically the inventory mc is to be in a draggable state automatically then you move it to the inventory area or it snaps back to its predetermined location which is what it does now.  Hope this is clear enough.  Thanks for any help.

    Thanks for the reply.  The inventory mc already has a draggable function to it:
    emptyBowlInventory_mc.onPress=function()
    { emptyBowlInventory_mc.startDrag();
    emptyBowlInventory_mc.onRelease=function()
    { if(emptyBowlInventory_mc.hitTest(backGround_mc))
    { emptyBowlInventory_mc.stopDrag();
    emptyBowlInventory_mc._x=9.3;
    emptyBowlInventory_mc._y=4.7;
    But the drag initially begins from the x and y locations in the script above.  I want the inventory mc to be already be attached to the mouse when it first appears and releasing the inventory mc would send it back to x and y.  Then you can drag the inventory mc as normal.  Here is the script that allows the inventory mc to show:
    emptyBowl_mc.onPress = function() {
    ebVisible = false;
    emptyBowl_mc._visible=ebVisible;
    _root.inv_mc.emptyBowlInventory_mc._visible=true;
    Thanks for any suggestions.

  • Problem in Loading Multiple image in Single Sprite/MovieClip

    Hi All,
    I am having a killing problem in loading multiple images in single movie clip/sprite using a separate class.
    Here is the ImageLoader.as class
    package com.project.utils{
        import com.project.*;
        import com.project.utils.*;
        import flash.events.EventDispatcher;
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.ProgressEvent;
        import flash.display.Loader;
        import flash.events.IOErrorEvent;
        import flash.net.URLLoader;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
        import flash.display.Bitmap;
        public class ImageLoader extends EventDispatcher {
            public var imgloader:Loader;
            public var imgMc:MovieClip;
            public var imgObject:Object;
            public var loaded:Number;
            public function ImageLoader():void {
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
            public function loadImage(imgHolder:MovieClip, imgObj:Object):void {
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
                imgMc = imgHolder;
                imgObject = imgObj;
                imgloader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImgLoad);
                imgloader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onImgLoadProgress);
                imgloader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onImageLoadFailed);
                imgloader.load(new URLRequest(imgObj.FilePath));
            private function onImgLoad(Evt:Event):void {
                var image:Bitmap = Bitmap(Evt.target.content);
                try {
                    imgMc.removeChildAt(0);
                } catch (error:Error) {
                imgMc.addChild(image);
                try {
                    if (imgObject.URL != undefined) {
                        imgMc.buttonMode = true;
                        imgMc.removeEventListener(MouseEvent.CLICK, onImageClicked);
                        imgMc.addEventListener(MouseEvent.CLICK, onImageClicked);
                } catch (err:Error) {
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD"));
            private function onImageClicked(evt:MouseEvent):void {
                trace("Image Attrs:"+imgObject.URL +" Target "+imgObject.Target);
            private function onImgLoadProgress(Evt:ProgressEvent):void {
                if (Evt.bytesLoaded>0) {
                    loaded = Math.floor((Evt.bytesLoaded*100)/Evt.bytesTotal);
                    dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_PROC",loaded));
            private function onImageLoadFailed(Evt:IOErrorEvent):void {
                trace("Image Loading Failed");
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_FAIL"));
    Here I am loading some images using the above class in a for loop, like
                for (var i=0; i < 3; i++) {
                    //imgLoader=new ImageLoader;
                    imgLoader.addEventListener("CustomEvent.ON_IMGE_LOAD",onImageLoad);
                    var target:MovieClip=videolist_mc["list" + mcCount + "_mc"];
                    target.list_mc.visible=false;
                    var imgObj:Object=new Object;
                    imgObj.FilePath=list[i].Thumbnail;
                    imgObj.Url=list[i].Url;
                    imgObj.Target=list[i].Target;
                    target.list_mc.urlObj=new Object  ;
                    target.list_mc.urlObj=imgObj;
                    imgLoader.loadImage(target.list_mc.imgholder_mc,imgObj);
                    target.list_mc.lable_txt.htmlText="<b>" + list[i].Label + "</b>";
                    target.list_mc.imgholder_mc.buttonMode=true;
                    target.list_mc.imgholder_mc.addEventListener(MouseEvent.CLICK,onItemPressed);
                    mcCount++;
    In this case, the ImageLoader.as works only on the last movie clip from the for loop. For example, if i am trying to load three image in three movie clips namely img_mc1,img_mc2 and img_mc3 using the for loop and ImageLoader.as, I am getting the image loaded in the third movie clip only img_mc.
    See at the same time, If i uncomment onething in the for loop that is
    //imgLoader=new ImageLoader;         
    its working like a charm. But I know creating class objects in a for loop is not a good idea and also its causes some other problems in my application.
    So, help to get rid out of this problem.
    Thanks
    -Varun

    package com.project.utils{
        import com.project.*;
        import com.project.utils.*;
        import flash.events.EventDispatcher;
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.ProgressEvent;
        import flash.display.Loader;
        import flash.events.IOErrorEvent;
        import flash.net.URLLoader;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
        import flash.display.Bitmap;
        public class ImageLoader extends EventDispatcher {
            public var imgloader:Loader;
            public var imgMc:MovieClip;
            public var imgObject:Object;
            public var loaded:Number;
            public function ImageLoader():void {
    // better add you movieclip to the stage if you want to view anything added to it.
                imgMc = new MovieClip();
                imgObject = new Object();
                imgloader = new Loader();
            public function loadImage(filepath:String):void {
                imgloader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImgLoad);
                imgloader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onImgLoadPr ogress);
                imgloader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onImageLoadF ailed);
                imgloader.load(new URLRequest(filepath));
            private function onImgLoad(Evt:Event):void {
                var image:Bitmap = Bitmap(Evt.target.content);
                try {
                    imgMc.removeChildAt(0);
                } catch (error:Error) {
                imgMc.addChild(image);
                try {
                    if (imgObject.URL != undefined) {
                        imgMc.buttonMode = true;
                        imgMc.removeEventListener(MouseEvent.CLICK, onImageClicked);
                        imgMc.addEventListener(MouseEvent.CLICK, onImageClicked);
                } catch (err:Error) {
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD"));
            private function onImageClicked(evt:MouseEvent):void {
                trace("Image Attrs:"+imgObject.URL +" Target "+imgObject.Target);
            private function onImgLoadProgress(Evt:ProgressEvent):void {
                if (Evt.bytesLoaded>0) {
                    loaded = Math.floor((Evt.bytesLoaded*100)/Evt.bytesTotal);
                    dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_PROC",loaded));
            private function onImageLoadFailed(Evt:IOErrorEvent):void {
                trace("Image Loading Failed");
                dispatchEvent(new CustomEvent("CustomEvent.ON_IMGE_LOAD_FAIL"));
    Here I am loading some images using the above class in a for loop, like
                for (var i=0; i < 3; i++) {
                    var imgLoader:ImageLoader=new ImageLoader();
                    imgLoader.addEventListener("CustomEvent.ON_IMGE_LOAD",onImageLoad);
                    var target:MovieClip=videolist_mc["list" + mcCount + "_mc"];
                    target.list_mc.visible=false;
                    var imgObj:Object=new Object;
                    imgObj.FilePath=list[i].Thumbnail;
                    imgObj.Url=list[i].Url;
                    imgObj.Target=list[i].Target;
                    target.list_mc.urlObj=new Object  ;
                    target.list_mc.urlObj=imgObj;
                    imgLoader.loadImage(pass the image file's path/name);
                    target.list_mc.lable_txt.htmlText="<b>" + list[i].Label + "</b>";
                    target.list_mc.imgholder_mc.buttonMode=true;
                    target.list_mc.imgholder_mc.addEventListener(MouseEvent.CLICK,onItemPressed);
                    mcCount++;

  • How can I pass a var value between MovieClips?

    New week, new question.
    I haven't been able to find the answer to this: I'm working with a var defined in the main timeline var score:int; , wich I use in 10 different movie clips using var score = MovieClip(this.root).score;
    Everything works perfect on the first MovieClip, but when the next one plays score does not keep the value assigned in the previous MovieClip therefore the score is lost.
    The clips are questions and they are place on the main time line in different frames and main time line actions layer which only contains this:
    stop();
    var score:int;
    nextQuestion.addEventListener(MouseEvent.CLICK, newQuestion);
    function newQuestion(evt:MouseEvent):void {
        nextFrame();
    covers each frame with every different MovieClip.
    What I need to know is how to make that value pass to the next Movie Clip?

    Hi Ned,
    I had defined the score var in the time line but to add the score from each question (MovieClips) I have to call it to the each MovieClip and I assume that whe I call the score var in the second MovieClip will keep the score from the first, but is not the case:
    This is the time line actions layer:
    stop();
    var score:int;
    nextQuestion.addEventListener(MouseEvent.CLICK, newQuestion);
    function newQuestion(evt:MouseEvent):void {
        nextFrame();
    and this is the code from the first question (MovieClip)(all the questions will have the same code except for some specific things like the value that each answer adds to the score and stuff like that)
    stop();
    var score = MovieClip(this.root).score;
    var answersArray:Array = new Array();
    var strikeCount:int;
    var sucessCount:int;
    var messageBox:TextField = new TextField();
    messageBox.text = "" + score;
    addChild(messageBox);
    messageBox.textColor = 0xFF0000;
    messageBox.width = 200;
    messageBox.height =100;
    messageBox.x = 285.5;
    messageBox.y = -32.9;
    this.strikeOne.visible = false;
    this.strikeTwo.visible = false;
    this.strikeThree.visible = false;
    this.flipQ1One.visible = false;
    this.flipQ1Two.visible = false;
    this.flipQ1Three.visible = false;
    this.flipQ1Four.visible = false;
    function answListener(evt_obj:Event){
    if((strikeCount >=3) || (sucessCount ==4)) { nextFrame();
    }else if (answersArray.indexOf(answ_input.text) < 0){
        if(answ_input.text == "5"){
        score = score + 61;
        messageBox.text = ""+ score;
        this.flipQ1One.visible = true, flipQ1One.play();
        sucessCount = sucessCount +1;
        answersArray.push(answ_input.text);
        answ_input.text = "";
        else if (answ_input.text == "3"){
        score = score + 25;
        messageBox.text = ""+ score;
        this.flipQ1Two.visible = true, flipQ1Two.play();
        sucessCount = sucessCount +1;
        answersArray.push(answ_input.text);
        answ_input.text = "";
        else if (answ_input.text == "4"){
        score = score + 8;
        messageBox.text = ""+ score;
        this.flipQ1Three.visible = true, flipQ1Three.play();
        sucessCount = sucessCount +1;
        answersArray.push(answ_input.text);
        answ_input.text = "";
        else if (answ_input.text == "2"){
        score = score + 3;
        messageBox.text = ""+ score;
        this.flipQ1Four.visible = true, flipQ1Four.play();
        sucessCount = sucessCount +1;
        answersArray.push(answ_input.text);
        answ_input.text = "";
        else {answ_input.text = "";
              strikeCount = strikeCount + 1;}
    answ_input.addEventListener("enter", answListener);
    function strikesListener (evt_obj:Event) {
            if ((strikeCount == 1) && (answ_input.text != "5", "4" , "3" , "2")) {this.strikeOne.visible = true;
            else if ((strikeCount == 2) && (answ_input.text != "5", "4" , "3" , "2")) {this.strikeTwo.visible = true;
            else if ((strikeCount == 3) && (answ_input.text != "5", "4" , "3" , "2")) {this.strikeThree.visible = true;
            else {}
    answ_input.addEventListener("enter", strikesListener)

  • Is there any way to save an image from a nested movieclip as a .png using PNGEncoder

    Hello all,
    I am new to AIR and AS3 and I am developing a small AIR desktop application in Flash CS5 that saves a user generated image locally to their computer. 
    The image is generated from a series of user choices based on .png files that are loaded dynamically into a series of nested movieclips via XML.  The final image is constructed by a series of these "user choices".
    Sourcing alot of code examples from here and there, I have managed to build a "working" example of the application.  I am able to "draw" the parent movieclip to which all the other dynamic movieclips reside and can then encode it using PNGEncoder.  The problem is that the images loaded dynamically into the nested movieclips show as blank in the final .png generated by the user.
    Is there a way to "draw" and encode these nested movieclips or do I need to find another way?  I can provide my clumsy code if required but would like to know if this concept is viable before moving any further.....
    Thanks in advance....

    Thanks for the files.......
    Yeah I'm doing it in Flash but importing the images via an xml document.  The problem isn't in being able to view the eyes (based on the selection of the user) its when I go to save the resulting image as a .png.  When I open up the saved .png the eyes are blank even though they are visible in the swf
    Even when the user clicks on the option to copy the image to the clipboard, it works as intended.
    My only guess is there is an issue with the way my xml is loading (but this appears to work fine) or when the file is converted and saved.....
    As I said I'm still learning but surely there must be a simple answer to this....
    I have included the xml code I am using and also the save code to see if anyone spots an issue..... (I hope I copied it all)
    // XML
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    var xmlRequest:URLRequest = new URLRequest("imageData.xml");
    var xmlLoader:URLLoader = new URLLoader(xmlRequest);
    var imgData:XML;
    var imageLoader:Loader;
    var imgNum:Number = 0;
    var numberOfChildren:Number;
    function packaged():void
    rawImage = imgData.image[imgNum].imgURL;
    numberOfChildren = imgData.*.length();
    imageLoader = new Loader  ;
    imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadedImage);
    imageLoader.load(new URLRequest(rawImage));
    faceBG_mc.Eyes.addChild(imageLoader);
    function loadedImage(event:Event):void
    imageLoader.x = -186;
    imageLoader.y = -94;
    imageLoader.width = 373;
    imageLoader.height = 186;
    //  Clipboard
    btn_Copy.addEventListener(MouseEvent.CLICK, onCopyClick);
    function onCopyClick(event:MouseEvent):void
    var bd:BitmapData = renderBitmapData();
    Clipboard.generalClipboard.setData(ClipboardFormats.BITMAP_FORMAT, bd);
    function renderBitmapData():BitmapData
    var bd:BitmapData = new BitmapData(faceBG_mc.width,faceBG_mc.height);
    bd.draw(faceBG_mc);
    return bd;
    // Save faceBG_mc as .png 
    var fileRef:FileReference = new FileReference();
    var myBitmapData:BitmapData = new BitmapData (faceBG_mc.width,faceBG_mc.height, true, 0);
    myBitmapData.draw(faceBG_mc);
    var myPNG:ByteArray = PNGEncoder.encode(myBitmapData);
    function onSaveClickPNG(e:Event)
    fileRef.save(myPNG, "myPNG.png");
    So my problem is....
    The final image is copied to the clipboard with the eyes visible - yes
    The eyes appear in the image in the swf as intended - yes
    When the image is saved as a .png and is meant to include the eyes, they are blank (see picture above)
    I hope this helps.....
    Thanks in advance

  • Error 5006:  can't have more than one externally visible definition

    Hi
    I'm getting this error:
    5006: An ActionScript file can not have more than one
    externally visible definition: AMReports, playSound.
    playSound is a function in my main document class
    The error occured after I added a MovieClip and FLV component
    to my the same framemain timeline. This Movie Clip has 3 frames.
    I'll be using cue points added to the FLV component to move this
    from frame to frame in that MovieClip.
    Any one have an idea why this is happening?
    Thanks.

    I fixed this problem: a brace was in the wrong place.

Maybe you are looking for

  • Component Video from a Mac Pro

    Hey All, i have a dual 2.66 mac pro with the Nvidia geforce 7300GT. What i'm trying to do is go from DVI to Component out to my 42" plasma to watch videos from the computer. The methods I've tried have results in an image of the desktop that is purpl

  • Use old Windows laptop as second screen for Macbook Pro

    Hi all, I've recently bought a Macbook Pro (mid 2012, 13", 2,5 GHz). So I'm not using my Acer laptop anymore, but I've came across a discussion of people who extended their Mac screen on a Windows laptop. I've tried multiple VNC apps, but no decent r

  • What is the best way to create a sociogram?

    I need to draw up a sociogram of who's freinds with who in a class I work in. I've got the information I just need to know how to display it. Whats the best program to use?

  • How to output video as still image frames?

    Hi there, We need to convert a movie file which has something like 375 frames into 60 still image files. How could we go about doing this using After Effects? We have a lot of movie files to convert, is there a way to batch process this so that we ca

  • Business Catalyst Error in FireFox. Please HELP!!

    I started with Muse CC2014 and must use Business Catalyst. I used the HTML-files from Muse (export HTML) inside a online video (so HTML inside video) as you can watch at http://www.regio.tv/clients/ecommerce.html When I watch this video inside Chrome