Loading the Display List partially while runtime

Happy Christmas!!
How do I manage that, while the movie starts, some parts of the Display List are "hold in the backhand" and get loaded when I decide that they should.
Can I only do that via external SWF-Files? Further question: Is it possible to stream the files, by calculating the download speed and starting the movie when I want it to do, or is Flash doing that automatically?
Thank you very much.

being a part of the display list me
rely means they will not be redrawn if htey are not on the list and nor will their events be dispatched up through the display list.
this does not mean if they are not onthe list they do not load.
loading a movieClip is something that you must enforce and watch over.
var ldr:Loader= new Loader()    
     ldr.addEventListner(Event.EVENT_COMPLETE,onComplete)
     ldr.load(new URLRequest('external.swf'))
function onComplete(event:Event){
//this fires when your swf has been loaded.  at this point you can add it to the display List
addChild(event.target)
event.target.removeEventListener(Event.EVENT_COMPLETE,onComplete)
this wil add the loaderObject which holds the swf to the stage.
if you have 10 external movies and want to load all 10 before adding any of them to the displayList you can do something like this
var arrayOfMovieClipsToDisplay:Array=new Array()
var counter:int=0
var totalLoads:int=5
var swfsToLoadAr:Array=['external1.swf','external2.swf',external3.swf',external4.swf',externa l5.swf']
for(var i=0;i<totalLoads;i++){
var ldr:Loader= new Loader()    
     ldr.addEventListner(Event.EVENT_COMPLETE,onComplete)
     ldr.load(new URLRequest(swfsToLoadAr[i]))
function onComplete(event:Event){
//this fires when your swf has been loaded.  at this point you can add it to the array
arrayOfMovieClipsToDisplay.push(event.target)
checkLoads()
function checkLoads(){
if(counter<totalLoads){
counter++
}else{
for each(var ldr:Loader in arrayOfMovieClipsToDisplay){
addChild(mc)

Similar Messages

  • Using a devices camera and adding the image to the display list

    Hi,
    My students and I have not been able to make an AIR app that can take a picture using the devices camera and then add the image to the display list. We are able to open the devices camera and of course take a picture, but that's it.
    We've been using these two tutorials/examples:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/CameraUI.ht ml
    and
    http://tv.adobe.com/watch/adc-presents/input-for-mobile-devices-camera/
    I've uploaded our project: http://www.dayvid.com/professor/camera.zip
    Can someone help us out?
    Thanks!
    Below is the main document class:
    package  {
    import flash.desktop.NativeApplication;
    import flash.display.Loader;
    import flash.display.MovieClip;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.ErrorEvent;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.events.MediaEvent;
    import flash.media.CameraUI;
    import flash.media.MediaPromise;
    import flash.media.MediaType;
    import flash.events.MouseEvent;
         public class Main extends MovieClip{
              private var deviceCameraApp:CameraUI = new CameraUI();
              private var imageLoader:Loader;
              public function Main()
                   this.stage.align = StageAlign.TOP_LEFT;
                   this.stage.scaleMode = StageScaleMode.NO_SCALE;
                                     camera_btn.addEventListener(MouseEvent.CLICK, cameraBtnClicked);
                          private function cameraBtnClicked(event:MouseEvent):void
                                    if( CameraUI.isSupported )
                                                      result_txt.text = "Initializing camera...";
                                                      deviceCameraApp.addEventListener( MediaEvent.COMPLETE, imageCaptured );
                                                      deviceCameraApp.addEventListener( Event.CANCEL, captureCanceled );
                                                      deviceCameraApp.addEventListener( ErrorEvent.ERROR, cameraError );
                                                      deviceCameraApp.launch( MediaType.IMAGE );
                   else
                                                      result_txt.text = "Camera interface is not supported.";
              private function imageCaptured( event:MediaEvent ):void
                   result_txt.text = "Media captured...";
                   var imagePromise:MediaPromise = event.data;
                   if( imagePromise.isAsync )
                    result_txt.text = "Asynchronous media promise.";
                    imageLoader = new Loader();
                    imageLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, asyncImageLoaded );
                    imageLoader.addEventListener( IOErrorEvent.IO_ERROR, cameraError );
                    imageLoader.loadFilePromise( imagePromise );
                   else
                    result_txt.text = "Synchronous media promise.";
                    imageLoader.loadFilePromise( imagePromise );
                    showMedia( imageLoader );
              private function captureCanceled( event:Event ):void
                   result_txt.text = "Media capture canceled.";
                   NativeApplication.nativeApplication.exit();
              private function asyncImageLoaded( event:Event ):void
                   result_txt.text = "Media loaded in memory.";
                   showMedia( imageLoader );   
              private function showMedia( loader:Loader ):void
                   this.addChild( loader );
              private function cameraError( error:ErrorEvent ):void
                   result_txt.text = "Error:" + error.text;
                   NativeApplication.nativeApplication.exit();

    Hi,
    Do I have to add the picture to the cameraroll in order to add it to the AIR apps display list?
    Both examples from Adobe claim that their examples work. Do they not?
    In the example, the event handler asyncImageLoaded is never called. The output text field shows -   result_txt.text = "Asynchronous media promise."; So the Event.COMPLETE is being added. But I don't think it's being dispatched.
    Any ideas?

  • Problem adding to the display list from a class

    If I try to convert as3 in an mxml file into a class file and
    create an instance of the class, I am unable to add the instance to
    the display list. The original mxml file is at the bottom of the
    page. The modified mxml file and its associated class are below.
    The problem is that I cannot use addChild(myComponent); So how to I
    add the UIComponent to the Display list?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import LoadSwf
    private var myLoader:LoadSwf
    public function init():void{
    myLoader=new LoadSwf()
    ]]>
    </mx:Script>
    </mx:Application>
    Class:
    package{
    import flash.display.MovieClip;
    import com.adobe.viewsource.ViewSource;
    import flash.events.Event
    import mx.core.UIComponent
    import flash.display.Loader
    import flash.events.TimerEvent;
    import flash.events.StatusEvent
    import flash.net.LocalConnection
    import flash.net.URLRequest
    import flash.net.URLVariables
    import flash.utils.Timer;
    public class LoadSwf{
    private var request:URLRequest
    private var loader:Loader = new Loader();
    private var conn:LocalConnection = new LocalConnection();
    private var myComponent:UIComponent=new UIComponent();
    private var swfTimer:Timer;
    private var myParameters:URLVariables ;
    public function LoadSwf(){
    request= new URLRequest("Login.swf");
    myParameters= new URLVariables()
    myParameters.loginID = "101";
    myComponent.addChild(loader);
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    finishedLoading);
    loader.load(request);
    private function finishedLoading(e:Event):void{
    //PROBLEM IN THE FOLLOWING LINE!!!!!!!
    addChild(myComponent);
    swfTimer = new Timer(10);
    swfTimer.addEventListener(TimerEvent.TIMER,sendData);
    swfTimer.start();
    private function sendData(e:Event):void{
    conn.addEventListener(StatusEvent.STATUS, onStatus);
    conn.send("myConnection", "lcHandler",
    myParameters.loginID);
    private function onStatus(event:StatusEvent):void {
    if (event.level=="status") {
    trace("LocalConnection connected");
    swfTimer.stop();
    }else if (event.level=="error"){
    trace("FAILED to connect")
    }

    "SiHoop" <[email protected]> wrote in
    message
    news:[email protected]...
    > If I try to convert as3 in an mxml file into a class
    file and create an
    > instance of the class, I am unable to add the instance
    to the display
    > list. The
    > original mxml file is at the bottom of the page. The
    modified mxml file
    > and its
    > associated class are below. The problem is that I cannot
    use
    > addChild(myComponent); So how to I add the UIComponent
    to the Display
    > list?
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    > layout="absolute"
    > creationComplete="init()">
    > <mx:Script>
    > <![CDATA[
    > import LoadSwf
    > private var myLoader:LoadSwf
    > public function init():void{
    > myLoader=new LoadSwf()
    > }
    > ]]>
    > </mx:Script>
    > </mx:Application>
    > Class:
    > package{
    > import flash.display.MovieClip;
    > import com.adobe.viewsource.ViewSource;
    > import flash.events.Event
    > import mx.core.UIComponent
    > import flash.display.Loader
    > import flash.events.TimerEvent;
    > import flash.events.StatusEvent
    > import flash.net.LocalConnection
    > import flash.net.URLRequest
    > import flash.net.URLVariables
    > import flash.utils.Timer;
    > public class LoadSwf{
    > private var request:URLRequest
    > private var loader:Loader = new Loader();
    > private var conn:LocalConnection = new
    LocalConnection();
    > private var myComponent:UIComponent=new UIComponent();
    > private var swfTimer:Timer;
    > private var myParameters:URLVariables ;
    > public function LoadSwf(){
    > request= new URLRequest("Login.swf");
    > myParameters= new URLVariables()
    > myParameters.loginID = "101";
    > myComponent.addChild(loader);
    >
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    > finishedLoading);
    > loader.load(request);
    > }
    > private function finishedLoading(e:Event):void{
    > //PROBLEM IN THE FOLLOWING LINE!!!!!!!
    > addChild(myComponent);
    You didn't add this component to the Application, so I
    wouldn't expect to
    see anything you add in this component in the Application.
    HTH;
    Amy

  • Refresh the display list

    Hi experts,
      i am using one standard function module in my program.  i am calling this program using a submit and return statement in another program.In the standard funtion module one write statement is used.  My issue is once the function module is called and the program is returning to the main program. once it is returned the main program got stopped and going to the next screen and showing the list whatever which is written by using write statement. i think this is happening because of the return statement. but i want to suppress the display list.
    Thanks in advance.
    Arul

    Use addition EXPORTING LIST TO MEMORY of the SUBMIT statement.
    Like:
    SUBMIT report EXPORTING LIST TO MEMORY
                  AND RETURN.
    Regards,
    Naimesh Patel

  • Is the "Display list of web app items submitted by a user" feature not available in the free trial?

    Is the "Display list of web app items submitted by a user" feature not available in the free trial? I can see it in the tutorials but its not available when I am logged in.

    Its just named a little differently now. You should be able to add the module {module_webappscustomer} through the Modules toolbox in the web page editor window, as indicated below. Please note that webapps feature is available only for webCommerce sites. Read more about the available modules and its usage in detail here - http://kb.worldsecuresystems.com/134/bc_1345.html?bc-partner#main_Web_App_Modules
    Thanks,
    Vinayak

  • Replacing items in the display list

    I have a series of objects in a display, half of which have to be updated regularly. The items are originally added to the display list in pairs and are of 2 different types. My display list look like this:
    object1
    object2
    object1
    object2
    object1
    object2
    To update the display list, I delete half of the objects, so my list now looks like this:
    object1
    object1
    object1
    I now want to add the updated objects to the list, but doing so makes the list look like this so the objects no longer alternate:
    object1
    object1
    object1
    object2
    object2
    object2
    Is there a better way to think about deleting and adding objects to the display list so I can maintain my alternating list?
    Thank you!

    So, you mean to say that the objects will be displayed one after the other? just like a list? if so, go with list with itemrenderers, ArrayCollection + filters / sorting. All you do is maintain the data in a order, the list wil take care of displaying the itemrendderers .. this way it is more maintainable and scalable.

  • BAPI or FM to load the source list i.e t-code ME01

    Hi all,
    is there any BAPI or FM to load the source list i.e t-code ME01
    Thanks

    Hi,
    Please check these FM.
    ME_MAINTAIN_SOURCE_LIST
    ME_POST_SOURCE_LIST    
    ME_GENERATE_SOURCE_LIST
    Regards,
    Ferry Lianto

  • Question about timeline navigation and the display list-

    I’ve got a movieclip called “rotatorProxy” that spans the entire timeline. I’ve got nav buttons that jump to various frames on that timeline. I need to get the display depth of rotatorProxy each time the nav buttons move the playhead. The AS3 code is easy enough:
    var zIndex:int = this.getChildIndex(getChildByName("rotatorProxy")) ;
    my problem is where to put it. If I put this code in any script that executes in the target frame, it works, but only if I hit the nav buttons slowly. If I bang on a single nav button rapidly, getChildByName("rotatorProxy”) can return null. I don’t know much about how the display list works but I assume the display list is rebuilt after every jump and the frame scripts are executing asynchronously, so it’s possible my getChildByName call is  executed before the display list is complete. Is there an event or some other handle that would allow me to call my code before the frame is rendered but after the display list is complete?

    Wow, thanks for the fast response...
    “if rotatorProxy exists in all frames, it should never return null.”
    That’s what I thought, but not what I’m seeing, rapidly jumping around on the timeline seems to confuse the player and it temporarily looses track of rotatorProxy.
    You can sort of see it in action here: http://www.appliedcd.com/newACT/act.html
    The zIndex is used to establish the depth of the rotating screens which have been added to the display list via AS. If you bang on the nav buttons quickly you’ll see the stacking order screw up, if you had been in the development environment you’d see the null error thrown.
    I’ll see if I can use the render event to sort this out. I know testing in the frame after the jump will work, but it’s cleaner if I can establish the proper stacking order before the first jump frame is rendered.

  • [svn:fx-trunk] 12542: When adding a mask to the display list need to validate it and all its children .

    Revision: 12542
    Revision: 12542
    Author:   [email protected]
    Date:     2009-12-04 10:38:32 -0800 (Fri, 04 Dec 2009)
    Log Message:
    When adding a mask to the display list need to validate it and all its children.  Previously the children were not validated and their display list was updated before properties were committed or measure was done.  RichText was not set up to handle this.
    QE notes:
    Doc notes:
    Bugs: SDK-24511
    Reviewer:  Evtim, Deepa
    Tests run: checkintests, fxg, primitives, Group
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24511
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/MaskUtil.as

    AFAIK, the only way to do this is to write a system modifcation.
    The BADI is executed only once at startup of the session, so that makes it merely static. (A strange point in time, I discussed it with SAP and they just shook their heads)
    I had the same problem with some other F4-Helps and it was a big hazzle. From my experience, no straight answer.

  • Hi, I'm trying to shut down the phone in the normal way (the Sleep / Wake button and hold down on the Close tab) turns off the display after a while yet, but the phone turns off completely opens up the phone to come out after the apple logo .. What is the

    Hi, I'm trying to shut down the phone in the normal way (the Sleep / Wake button and hold down on the Close tab) turns off the display after a while yet, but the phone turns off completely opens up the phone to come out after the apple logo .. What is the reason I'd appreciate if you help how to fix it ...pleasa help me

    Doing those doesn't turn off your phone?
    As stated hold down the top button only until you see the red slider to power off your phone.
    If that doesn't work then take it to Apple and see what they say.

  • [svn:fx-trunk] 11641: A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks , not just alpha masks.

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

  • Help Removing events on a portion of the Display List

    Hey all
    Basically I'm looking for a "switch" that I can use to shut
    of all events for a Display Object and all of its descendants in
    the Flash display list / scene graph.
    I have a Display Object with a good number of descendants
    that have various MouseEvent listeners/handlers assigned to them.
    I'd like to be able to remove/disable all of these mouse-related
    events (or just all event types if thats easier) at a certain point
    in time without knowing the number of descendants or how many and
    which kind of event listeners have been registered with each node.
    So apart from writing a unique event removal method for each
    node, and then walking the Display List, calling this method for
    each node, how do I do this? Rasterizing this display object to a
    Bitmap object and then swapping the two in the display list to
    obtain a "static" version with no handlers is a work-around I don't
    really want to do either (sorry).
    any ideas?

    For the mouse events, perhaps a combination of
    DisplayObjectContainer.mouseChildren and
    InteractiveObject.mouseEnabled

  • Noobie question: How do I add something to the display list from a non-main class?

    I know how to use addChild() within the main class to add
    something to the stage display list and have it appear on the
    screen, but how do I add something to the stage display list from
    code within another class?
    So for example say I want to add some text (myTextField) to
    the stage's display list from within NotTheMainClass' code, could
    you give an example of the necessary code?

    you must pass a reference to a display list object or create
    one that's available to your class.
    there are so many ways to do this i'm not sure how you want
    to proceed. but you can create a globally available reference to
    the stage and root timeline:

  • How to force the display to sleep, while keeping the computer running?

    I'm running some compression and transcoding programs on my iMac G5 (iSight) that keeps the CPU at 100% for hours at a time. My Energy Saver prefernces is set to sleep the display after a few minutes, but never to sleep the computer or the hard disk.
    Like I'd expect with such a high CPU load, my computer's screen does not go to sleep.
    Is there a program or command line utility that I can run to force my screen to go to sleep, but keep the computer running?
    iMac G5 17" (iSight)   Mac OS X (10.4.5)  

    To put your display only to sleep;
    Go to System Preferences, click on 'energy saver', check the 'Put the display to sleep when the computer is inactive for' box, and then set the time. Note; this just puts the display to sleep, not the whole computer. Your hard disk will keep running. I find this much more convienent than putting the computer in 'full sheep'. It wakes up much quicker without some of the hassle some computers display coming up from full sleep.

  • Problem adding an image to the display list

    I'm trying to create a component to add images to a Panel (id=hbox). I seem to be loading the images successfully (because the trace statement works), but can't add them to the display.
    I'm using the following line of code, but getting an error:
    hbox.addChild(event.currentTarget)
    What am I doing wrong?
    Thank you!
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" backgroundAlpha=".5"   backgroundColor="0xffffff" creationComplete="init()"  >
        <mx:Script>
        <![CDATA[
        public function placeAnimals():void{
            for(var i:int=0; i<12;i++){
                var imageLoader:Loader = new Loader();
                var url:String = "images/animal"+i+".png";
                var urlReq:URLRequest = new URLRequest(url);
                imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
                imageLoader.x=50*i
                imageLoader.load(urlReq);       
                function imageLoaded(event:Event):void {
                    trace("Success="+event.currentTarget.url)
                   //hbox.addChild(event.currentTarget)
             public function init():void {
                 placeAnimals()
        ]]>
        </mx:Script>
        <mx:Panel  id="hbox"  height="200"   backgroundImage="images/smallWhitePanel.png"  borderStyle="none" />
    </mx:Canvas>

    You cannot add an image directly like that... why not dot the following
    var img:Image = new Image();
    img.source = url;
    this.addChild(img);
    hpefully it should work.. i'v neva seen image being added to the hbox like that... it will work only if you embed it / put it in source element..
    the following link should help you
    http://livedocs.adobe.com/flex/3/html/help.html?content=controls_16.html

Maybe you are looking for