What should I use: removeChildAt?

Hello!
I have the following code which brings pictures from xml into a slideshow and upon pressing btnNext the next image slides on and the one that was on stage slides off... Now when I press btnBack the previous images slides on but a next image slides on too and they collide!!!
Would you be so kind as to review my code and tell me what I should use to eliminate the casualty toll! I was thinking something like removeChildAt, but that does not quite work how I have it set up. When I publish it, it removes my stage background... and then my btnNext... and then my btnBack... and then I can't do anything...
Thanks for any help!!
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import com.pixelfumes.reflect.*;
import flash.display.BitmapData;
var xmlRequest:URLRequest=new URLRequest("imageData.xml");
var xmlLoader:URLLoader=new URLLoader(xmlRequest);
var imgData:XML;
var imageReflect:Reflect;
var imageLoader:Loader;
var rawImage:String;
var rawH:String;
var rawW:String;
var inTween:Tween;
var outTween:Tween;
var imgNum:Number=0;
var checkSec:Timer=new Timer(100);
var numberOfChildren:Number;
var imageLoaderHost:MovieClip;
xmlLoader.addEventListener(Event.COMPLETE, xmlLoadedF);
btnNext.addEventListener(MouseEvent.CLICK, nextImgF);
btnBack.addEventListener(MouseEvent.CLICK, prevImgF);
btnNext.buttonMode=true;
btnBack.buttonMode=true;
function xmlLoadedF(event:Event):void {
     checkSec.start();
     checkSec.addEventListener(TimerEvent.TIMER, checkerF);
     imgData=new XML(event.target.data);
function packagedF():void {
     checkSec.removeEventListener(TimerEvent.TIMER, checkerF);
     rawImage=imgData.image[imgNum].imgURL;
     numberOfChildren=imgData.*.length();
     rawW=imgData.image[imgNum].imgW;
     rawH=imgData.image[imgNum].imgH;
     imageLoaderHost=new MovieClip;
     imageLoader=new Loader;
     imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteHandler);
     imageLoader.load(new URLRequest(rawImage));
     master_mc.addChild(imageLoaderHost);
     imageLoaderHost.addChild(imageLoader);
     imageLoaderHost.y = (stage.stageHeight - Number(rawH)) /5;
     inTween = new Tween(imageLoaderHost, "x", Regular.easeInOut, 1500, (stage.stageWidth - Number(rawW)) /1.65, 1.5, true);
     imageLoader.scaleX=.8;
     imageLoader.scaleY=.8;
function loadCompleteHandler(event:Event) {
     imageLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadCompleteHandler);
     imageReflect=new Reflect({mc:imageLoaderHost,alpha:50,ratio:50,distance:0,updateTime:0,reflectionDropoff:1});
function checkerF(event:TimerEvent):void {
     if (imgNum==0) {
          packagedF();
     } else if (imgNum < numberOfChildren) {
          packagedF();
     } else {
          imgNum=0;
          packagedF();
function nextImgF(e:MouseEvent):void {
     checkSec.addEventListener(TimerEvent.TIMER, checkerF);
     outTween = new Tween(imageLoaderHost, "x", Regular.easeInOut, (stage.stageWidth - Number(rawW)) /1.65, -1200, 1.5, true);
     imgNum++;
function prevImgF(e:MouseEvent):void {
     checkSec.addEventListener(TimerEvent.TIMER, checkerF);
     outTween = new Tween(imageLoaderHost, "x", Regular.easeInOut, -1200, (stage.stageWidth - Number(rawW)) /1.65, 1.5, true);
     imgNum--;

Well, if you want people to actually watch your movies make a DVD using iDVD.

Similar Messages

  • Virtualization...what should i use?

    Hallo.
    I'm planning  to virtualize a Quad core / 4gb ram. I'd like to build 2-4 virtual machines for testing some advanced features of Asterisk / MySQL and some other well known softwares. I have some licenses for Asterisk addons from digium, so i'd like to maintain them over time, using the virtual machine and moving it.
    What should i use? I don't need fancy 3D Acceleration, just a common abstraction for all the hw i have (pretty standard: usb, nics, harddisks...).
    I was thinking about Xen Server or Virtual Box (anyway, i'm using them for my personal lab, so i'd prefer solutions that don't require a license...).
    The solution should be "headless", i don't want to be forced to login to X every time the guest systems need to be booted...
    Thanks in advances.
    See Ya
    Luca

    i've started playing around with QEMU/KVM a couple days ago, and i like it. was using vbox before, which i didn't.
    i haven't noticed any mouse lag yet, after installing a few of the main distros i wanted to try out again: fedora 19, debian wheezy, ubuntu (latest, whatever the no.). only trouble i have that so far i wasn't able to get a mouse working properly in an archlinux guest    probably something i'm doing wrong, but couldn't figure it out yet.
    tried a few GUI frontends, but found that i'm better off starting VMs from the command line: less confusing, and all of the GUI apps i tried had some quirks, like didn't find proper directories or executables.
    using KVM and virtio drivers, it's pretty fast; admittedly not as fast a bare metal install, but not slower than i remember vbox (just my impression, no benchmarking or such). assuming i'll get the arch guest trouble sorted out, i'll stick with KVM/QEMU.
    Last edited by phanisvara (2013-08-02 11:43:23)

  • What should I use to clean the trackpad?

    I bought iKlear to clean the screen of my MacBook and it works great. I have been using it for years on my iBook. I was reading the directions and it says not to use it on the trackpad. I had used it on my iBook trackpad with no problems. What should I use then to clean my trackpad? Why should I not use it on my trackpad? Anyone have suggestions or used iKlear on their trackpad despite iKlear's warnings?
    Thom

    A very slightly damped cotton cloth works wonders. Just be sure to wring it out as best you can so no liquid gets anywhere you don't want it to be.

  • Is it possible to raise the bit rate of songs higher than 256 on iTunes? If not what should i use or do to raise the bit rate of songs?

    Is it possible to raise the bit rate of songs higher than 256 on iTunes? If not what should i use or do to raise the bit rate of songs?

    Songs you rip from CD can have their bitrate increased to a maximum of 320Kbps from the iTunes preferences; alternatively, the default encoder can be changed to a lossless one. Songs from other sources have a fixed maximum bitrate.
    (67928)

  • What should I use? Vectors or...

    I'm storing a large amount of Person objects, this is for a type of game I'm trying to create where it saves the players name, wins, losses, rank, etc in each Person object (this will all be in a text file also). I want these so that they can be sorted by any one of these statistics. I'm not sure how to go about this. Vectors were the first thing that came to my mind, but then I thought about LinkedLists, but I don't know much about them yet, I just know it's an option. My brother told me use LinkedLists, but that's all he would tell me. What should I use for this kind of task? All suggestions are welcome, I need a little help with this design. One more thing about this, players will be added and removed also. I really need some insight, thanks.
    This is a side question, if someone could answer it, that would be nice, otherwise it's ok. How does a LinkedList differ from a Vector? Can't everything a LinkedList do, a Vector can do also with the same amount of ease? All I know that LinkedLists point to the next and previous nodes or something like that, not really sure what its advantage is. Thank you.

    An array memory for holding each of the objects is allocated when you create it, hence you have to define the number of object you want when you create it.
    +--+--+--+--+--+--+
    |I0|I1|I2|I3|I4|I5|  < Indexs
    +--+--+--+--+--+--+
    |V0|V1|V2|V3|V4|V5| < Values
    +--+--+--+--+--+--+Pro: you can access the data quickly, as you have a direct refrence to each value, via it's index.
    Con: Fixed size
    Con: Waisted space
    A Vector is a growable array.
    It does this by creating a fixed sized array, then waiting until it's full, then creating a bigger one and then copying all the data from the smaller, old array to the new, bigger array. This means that every now and again you suffer a performce hit as your array grows.
    Pro: you can access the data quickly, as you have a direct refrence to each value, via it's index.
    Pro: Not a fixed size
    Con: Will slow down when it grows.
    Con: Waisted space
    A Linked List does not have this problem each element holds the refrence to the next, unlike an array where the "system" holds a refrence to each element. This reduces its memory footprint, however its slower to search through as you have to loop through all the objects.
    +----+----+
    |DATA|LINK|
    +----+--|-+
            |     +----+----+
            +-->  |DATA|LINK|
                  +----+----+Pro: Growable
    Pro: Size
    Con: Slow to search
    There are things you can do to speed up a linked list (double linked lists & improve the order in which they are added) but it's still slow.
    I'll leave choosing the data structure to you.

  • What should I use as parameter name in call.addParameter in WS DII client

    I'm using dynamic invocation interface to call a web service in Oracle OC4J.
    The part of WSDL "Types" is:
    <element name="myType" type="tns:myType" />
       <complexType name="myType">
         <sequence>
           <element name="sss" nillable="true" type="string" />
         </sequence>
      </complexType>
    ...My J2SE client has following code I belive create problem:
    call.addParameter("sss", input,MyType.class, ParameterMode.IN);when I invoke the web service, I got error:
    javax.xml.rpc.soap.SOAPFaultException: caught exception while handling request: unexpected element name: expected={http://mypackage/B2BGateway/types}myType, actual=sss
    I changed my code according to this message as it expected to be:
    call.addParameter("{http://mypackage/types}myType",
         input,MyType.class, ParameterMode.IN);I got :
    HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Error parsing envelope: (2, 179) Expected name instead of {.
    seems the "{" should not be part of parameter name.
    Then, what should I use as parameter name.
    BTW, the web service server side code should works fine as I can test it with others client.
    Thanks

    Moved one step further:
    I changed abit to code:
    call.addParameter("myType", input,MyType.class, ParameterMode.IN);I can see the server side got SOAP request:
       <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <env:Body>
             <myType>
                <ans1:sss xmlns:ans1="http://mypackage/types/">abc</ans1:sss>
             </myType>
          </env:Body>
       </env:Envelope>As you can see, the problem in the generated request is "myType" does not have namespace
    Could someone tell me how to fix it.
    Thanks
    Edited by: John618 on Feb 21, 2009 5:03 PM

  • What should I use to burn an iMovie project to a DVD that will play in the TV?

    What should I use to burn an iMovie project to a DVD that will play in the TV?

    try google
    http://www.daniusoft.com/convert-imovie/imovie-to-dvd.html
    Thread
    https://discussions.apple.com/thread/4217823?start=0&tstart=0
    https://discussions.apple.com/docs/DOC-3711

  • If i  cannot instal adobe flash driver, what should i use?

    if i cannot install adobe flash driver, what should i use?

    Nothing else will work. Why can't you install it?

  • X.400 VS FTAM - What should be used?

    Hi Gurus,
    We are planning GTS Customs management and by SAP
    there are 2 ways for comunicating with the customs allowed:
    X.400 and FTAM
    What should be used?
    I know X.400, but FTAM I do not know.
    Is it difficult to set up FTAM and what do we need for FTAM
    and what needs to be done for FTAM?
    Thanks
    Regards
    Dieter

    From my point of view FTAM is the better solution and X.400 is old fashioned.
    FTAM is faster and you don't have to pay for every call like with the X.400.
    You can setup up the communication to customs via SAP PI (e.g. it.x-atlas by itelligence) and you need a FTAM router.

  • Does Mackeeper cause problems?  What should I use instead?

    I have been using Mackeeper since getting my new Macbook Pro laptop in December 2013/Jan. 2014 (OS X 10.9.4).  I just now read it is not advised to use Mackeeper to 'clean' your computer, and I have since deleted it.  Have I caused my computer problems by using it since I purchased it in December 2013/January 2014?  What, if anything, should I use instead to help keep the system running smoothly, fast, and without issues?  (i.e. malware, viruses, trojans, etc.)
    This is my third Mac laptop and I've always used some type of Mackeeper cleaner; I'm somewhat lost as to what I should now do -- or if I caused my system problems. 
    Thanks in advance.

    What, if anything, should I use instead to help keep the system running smoothly, fast, and without issues?  (i.e. malware, viruses, trojans, etc.)
    No so-called "cleaning" programs are necessary or beneficial.
    All are capable of causing system corruption that, at an extreme, may require completely erasing your Mac and reconfiguring it from the ground up.
    Keep your Mac's operating system up to date with software updates from Apple.
    -- or if I caused my system problems.
    That is possible. If your Mac is not performing as you think it should, describe what you're observing that is causing you concern. Please be as specific as possible - for example, is it taking a long time to launch programs? Is Safari loading web pages slowly, or not at all?
    Whatever you do, if you believe something is wrong with your Mac, never install any product that claims to "clean up", "speed up",  "optimize", "boost" or "accelerate" it; to "wash" it, "tune" it, or to make it "shiny". Those claims are absurd.
    There are many such products and they're all scams designed for one and only one purpose - to take your money. They are very successful at that task. Once that is accomplished, their mission is complete. If your Mac subsequently behaves poorly, if your data becomes irretrievably lost, or if you just waste your time - is completely irrelevant to their true purpose.
    Describe what's wrong and the experienced users on this site will help you fix it.

  • What should I use  between JSE and JEE?

    Is it true that JSE can do only certain level, but JEE can do the same with JSE and specially beyound of JSE.? If i want to develop a web application, what should i install to my computer between JSE and JEE or i have to install its both?

    hi
    you dont get all the features of j2se when you have j2ee with you. they are 2 different things.
    j2ee mostly deals with things which are required for a enterprise application building which include EJBs, Servlets, JSPs etc. while the J2SE is more useful for application developement (using Swing e.g). this is only a crude differentiation.
    the choice betweeen the two depends on your requirement. e.g. if you are developing a web application, you will go for J2EE and proceed using the components available there.
    if you specify your requirements, then we can discuss the details may be.
    Parag

  • Need Help..what should i use for this

    hello friends, i have to write a program which will load an xml file reader class at run time and depending on the content of xml file i'm going to generate mapping.. e.g xml file- <MyMapping> <ATO> <security type=int> </ATO> <FIX> <symbol type=String> </FIX> </MyMapping> Now i want to change the content of xml file without restarting my running application..changes should be reflected at runtime... also my xml file will contain nearly 1000 lines..so in this case which technique should i use whether i use JAXB which will give the classes of my xml file or any other ?? Also if i use JAXB whether JAXB gives classes corrsponding to my xml nodes (e.g ATO.java as per above example).

    daitkarsachin wrote:
    hi ,
    here is my question again..my xml will have
    <Message>
    <ATO>
    <somefiled="X" type=int value=35 />
    </ATO>
    <FIX>
    <somefiled="Y" type=String value=50 />
    <FIX>
    </Message>
    Now first i have to parse this xml ..then my java program is going to accept value from user ..and depending on user specified value i've to use either ATO or FIX fields...e.g if user value is 35 then my program should use fields within ATO node.
    You will read the XML structure into some kind of memory model. When the user supplies a value you will search for a matching value (likely from a collection such as a map or list) and return the value in that object that you locate.
    what should be done for this ..
    See above.
    and what if i change values in my xml file..will i have to restart my application to load xml again ?
    If you change the file on the filesystem, you should simply be able to re-parse the XML file and update your in-memory model. If you instead update your in memory-model, you can serialize the model back to XML on the filesystem. Neither needs to necessarily have anything to do with application start-up (other than the fact that you would normally read in the XML model then, but updating is a separate concern, as would re-reading it).
    - Saish

  • SetCursor(int) depreciated? What should I use?

    I have a frame and I set the cursor to an hourglass to indicate the user to wait for results (or end of some activity)...
    this.setCursor(Cursor.DEFAULT_CURSOR);
    When I compile I get a bunch of depreciation warnings. What should I us instead?
    Thanks for the help in advance!
    Kirk

    Whenever you get a deprecation warning you want to clear up, you should look at the API docs. They say to use Component.setCursor(Cursor).
    Replace
       this.setCursor(Cursor.DEFAULT_CURSOR);with
       setCursor(Cursor.getDefaultCursor());

  • Have a .mp4 video and would like to use it to burn to a disc and be able to be played on a dvd player, should i use idvd or what? also have a .avi file what should i use? thanks please help

    Have a .mp4 video and would like to use it to burn to a disc and be able to be played on a DVD player and a .AVI file what program should I use idvd?

    iDVD may or may not work with them – depending what kind of MP4 and AVI each is.
    Drag them into iDVD and preview them to check compatibility.
    If there are issues, use MPEG Streamclip and re-wrap them as QuickTime.
    Russ

  • What should I use instead Front row?

    Hello,
    I have discovered that Lion does not have Front Row. What are you using instead if front row?
    Thanx,
    c

    Thankx for answear,
    just installed Front Row on Lion

Maybe you are looking for

  • How do i delete a the registered mailbox and add it back again?

    Basically, i had my hotmail set up as the main mailbox but then it would only refresh half of my emails, so i decided to try and add my gmail account on and that worked fine, so i thought it might work if i deleted my hotmail and re-add it back it, i

  • Html or css - What's best practice for email?

    Hello, I am struggling getting fonts to look a certain way across all browsers.  I used CSS like this: <style type="text/css"> .header { font-family: Arial, Helvetica, sans-serif; font-size: 32px; text-transform: uppercase; color: #FFAE39; </style> <

  • Payment Exceptions in f110

    Hi All, Can any one help to know different payment exceptions in automatic payment run i.e f110. Thanks in advance

  • Editing to Tape problems

    Hi all, I am trying to edit to tape going form FCP 504 to a Sony DSR 45 DVCam deck. There seems to be no problems going to the SP Deck, however if I enter the in-point (as per manual) in the master mode edit to tape window, and then drag the sequence

  • Appels reçus, émis et absence ne s'affichent pas sur IOS7

    Bonsoir, depuis l'installation d'IOS7 sur mon iphone 5S, je ne vois plus mes appels émis, reçus ou manqués sur mon téléphone. J'ai installé la MAJ d'IOS7 et restaurer mon iphone mais rien n'y fait. Quelqu'un peut il m'aider svp ? Merci encore !