I want to load external swf in movieclip and next external swf should load Automatically

I want to load external swf in movieclip and next external swf should load Automatically when current swf is finished in AS3.
How can we can check total frame and current frame of imported swf in a movie clip.
any help will be appreciated
regards,
Jatin Dembla

in as3 you use the loader class (not movieclips) to load external swfs.
you can use an Event.COMPLETE event listener (applied to the loader's contentLoaderInfo property) to check when loading is complete and start the next swf loading.
you can use the loader's content property (caste as a movieclip) to determine info (including totalFrames) about the loaded swf's main timelnie (once loading is initialized, for the totalFrames, or complete, for some other properties like height and width).
var loader:Loader=new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadcompleteF);
loader.load(new URLRequest("swf1.swf"));
var loadedSWF:MovieClip;
function loadcompleteF(e:Event):void{
loadedSWF=MovieClip(loader.content);
trace(loadedSWF.totalFrames);

Similar Messages

  • I want to enter information in one table and have it update other tables automatically

    I am a very unlearned Numbers user.
    Here is my desire/dilemma.  I run a summer camp and have to record information for our camp.  I use the information in a number of forms from check in and check out to records for each cabin, and more.
    I would like to create a master table that has all of the information for each camper that I will call a master list. I then want to create the tables that will contain the information needed for each specific form.  I want the specific forms to be able to update automatically when new information is entered in the master.  The master record will be sorted by the cabin and bed numbers, so I can tie the subtables to those cells, but I need the row to update as well.
    My question is how can I do this in the shortest and simplest way possible?
    I hope this question is clear.
    Thanks!
    Roy

    Hi Roy,
    Well, the simplest is likely to sort the Master table by Cabin number, then use copy/paste to transfer the information to the separate tables for each cabin. But that's not automatic.
    Before jumping in to this, I'd like a better idea of what your Master table will look like, what one of the sub-tables would look like, and which data you want to transfer from the Master to the Subs. A screen shot would be helpful to anyone trying to help you with this, not just to me.
    One consideration is how you will use the sub-tables. An immediate difficulty that comes to mind if you are goiing to mix retrieved data and directly recorded data on the same table is that data collected from the Master table and data recorded directly on one of the sub tables are independent of each other. Consider the list below:
    1 Bob Baines
    2 Chuck Clay
    2 Dexter Davis
    3 Ed Elmore
    1 Frank Fencepost
    1 Greg Gilson
    3 Harvey Hall
    Bob, Chuck and Frank would appear (in that order) on the Cabin 1 list:
    Bob       x √ √ √
    Frank    √ √ √ √
    Greg     √ x x √
    But if Chuck, for some reason, was transferred to cabin 1:
    1 Bob Baines
    1 Chuck Clay
    2 Dexter Davis
    3 Ed Elmore
    1 Frank Fencepost
    1 Greg Gilson
    3 Harvey Hall
    That transfer would affect only the data collected from the Master table. The data entered directly would remain where it was when entered, with disastrous results to Frank's (so far) perfect attendance record.
    Bob        x √ √ √
    Chuck    √ √ √ √
    Frank     √ x x √
    Greg
    Regards,
    Barry

  • Cross using of MovieClips and externally constructed MovieClips in 2 SWF-Files

    Hello, I have two SWF-Movies. One is exported into eht other as Child.
    Can I instance the Objects of the two libraries in all places, where ActionScript is possible? (In Keyframes of the MovieClips and in external class definitions.)

    the applicationdomain holds the classes from loaded swfs.  you should read the flash help files.
    but, if you wanted to create an instance of the class C1 that's defined in swf2.swf and, you're loading swf2.swf, you could use:
    var ldr:Loader = new Loader();
    var urlR:URLRequest = new URLRequest("swf2.swf");
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,f);
    var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
    ldr.load(urlR,loaderContext);
    function f(e:Event){
        var C:Class = Class(ApplicationDomain.currentDomain.getDefinition("C1"));
        var c1:* = new C();

  • Can't Access MovieClips and Functions in Loaded SWF

    Hi everybody,
    I'm trying to simply access anything inside this loaded SWF and all I get is 'null'.
    I have code in the parent SWF that needs to tell the child SWF movieclip what to do but nothing works. This was a piee of cake in AS2 and I can't seem to get anything to crossover in AS3.
    Here's my code:
    import com.greensock.TweenMax;
    import flash.display.MovieClip;
    var myLoader:Loader = new Loader();
    var url:URLRequest = new URLRequest("SWCS_S3_500x250_exp_panel_2.swf"); // in this case both SWFs are in the same folder
    myLoader.load(url);  // load the SWF file
    panel2.addChild(myLoader);   // add that instance to the display list, adding it to the Stage at 0,0
    panel2 = myLoader.content as MovieClip;
    photo_about.alpha = 0;
    photo_downloads.alpha = 0;
    //panel2.content_about.alpha = 0;
    //panel2.content_downloads.alpha = 0;
    function closeSection():void
              panel2.controlsMC.forcePause();
              TweenMax.to(photo_about, .5, {alpha:0});
              TweenMax.to(photo_downloads, .5, {alpha:0});
              TweenMax.to(photo_home, .5, {alpha:0});
              TweenMax.to(panel2.content_about, .5, {alpha:0});
              TweenMax.to(panel2.content_downloads, .5, {alpha:0});
              TweenMax.to(panel2.controlsMC, .5, {autoAlpha:0});
              TweenMax.to(panel2.content_home, .5, {alpha:0});
    panel2 traces null and all the clips loaded within pull up undefined property errors.
    Can somebody please tell me what I'm doing wrong? I'd be stoked to know what I'm missing and feel like this should be a piece of cake.
    Thanks for any help!

    You are not adding the content to the stage at 0,0, you are adding it to panel2 at 0,0.  THen you take panel2 and assign it to be something that likely doesn't exist by the time you assign it.  You need to wait until the loader completes loading before you attempt to do anything with its content, otherwise it has no content (null).  Similarly, you cannot control anything in the loaded swf until it has finished loading.  So assign an event listener to the contentLoaderInfo property of the Loader to determine when loading is complete, and have the event handler function deal with starting the interaction with it.
    var myLoader:Loader = new Loader();
    var url:URLRequest = new URLRequest("SWCS_S3_500x250_exp_panel_2.swf");
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, processLoadedSWF);
    myLoader.load(url);
    function processLoadedSWF(evt:Event):void {
        // deal with the loaded swf here
        // but you don't want to be assigning it to the panel2 object that contains the loader
    As far as controlling anything inside the swf you load, is it an AS1/2 or an AS3 swf?

  • Loading external swf using Loader.load() method is delayed with flash player 10.1 and next versions.

    I am trying to load an external swf file of size 300 kb using Loader.load() method and trying to access some objects in it and i am getting some delay in loading the external file with flash players 10.1 and next versions.
    The action script code used to load:
    var strUrl:String="toLoad.swf";
    var urlReq:URLRequest=new URLRequest(strUrl);
    var ldrLoader:Loader = new Loader();
    var ldrLoaderContext:LoaderContext = new LoaderContext();
    ldrLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, externakSwfLoaded);
    ldrLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorInLoadingSwf);
    ldrLoader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorInLoadingSwf);
    ldrLoaderContext.applicationDomain = ApplicationDomain.currentDomain;
    ldrLoader.load(urlReq, ldrLoaderContext);
    addChild(ldrLoader);
    System specifications:
    O.S. Windows XP sp2 (32 bit)
    Browser IE 6.0 (128 bit)
    Flash Player version WIN 10,2,152,32

    I think you are lost. This forum is for ROME. It sounds like you want one of the Flash or Flex forums...
    Good luck!
    Harbs

  • I have CS6 on my iMac.  I want to load it onto an external drive to use off my Mac Air.  I have the serial number.  How do I do this without having to subscribe to CC?

    I have CS6 on my iMac.  I want to load it onto an external drive to use off my Mac Air.  I have the serial number.  How do I do this without having to subscribe to CC?

    Note the min-requirements for PS CS6 on a Mac.
    Mac OS
    Multicore Intel® processor with 64-bit support
    Mac OS X v10.6.8 or v10.7
    1GB of RAM
    2GB of available hard-disk space for installation; additional free space required during installation (cannot install on a volume that uses a case-sensitive file system or on removable flash-based storage devices)
    1024×768 (1280×800 recommended) resolution display with 16-bit color and 256MB (512MB for Extended) of VRAM
    OpenGL 2.0-capable system
    DVD-ROM drive
    Nancy O.

  • I want to set up the Time Machine and I would love to use the Time  Capsule but since I already have a wireless router I need suggestions on  what other external disks Apple could recommend to use with the Time Machine and  how to configure that disk

    I want to set up the Time Machine and I would love to use the Time
    Capsule but since I already have a wireless router I need suggestions on
    what other
    external disks Apple could recommend to use with the Time Machine and
    how to configure that disk.
    A complication that I need to resolve is the fact that I am using Vmware
    Fusion to be able to use Windows on my Mac. Now it seems that Time
    Machine is not backing up my files
    on that virtual Windows without additional configuration and my question
    is whether you can advise me here or whether this is only a matter for
    the Fusion virtual machine.

    If you want to use Time Capsule you can.. you simply bridge it and plug it into the existing router.. wireless can be either turned off or used to reinforce the existing wireless.. eg use 5ghz in the TC which is much faster than your 2.4ghz.
    You can also use a NAS.. many brands available but the top brands are synology, qnap and netgear readynas  series. These will all do Time Machine backups although how well always depends on Apple sticking to a standard. There are cheaper ones.. I bought a single disk zyxel which was rebadged and sold through my local supermarket. It actually works very well for TM at least on Snow Leopard. Major changes were made in Lion and again ML so do not instantly think it will work on later versions. I haven't tried it yet with those versions.
    Any external drive can be plugged into the mac. Use the one with the fastest connection or cheapest price according to your budget. USB2 drives are cheap and plentiful. But no where near as fast as USB3 or FW800. So just pick whichever suits the ports on your Mac. Interesting Apple finally moved to USB3 on their latest computers.
    TM should exclude the VM partition file.. it is useless backing it up from Mac OS side.. and will slow TM as it needs to backup that partition everyday for no purpose.. TM cannot see the files inside it to backup just the changes.
    You need to backup windows from windows. Use MSbackup to external drive.. if you have pro or ultimate versions you can backup to network drive. But MSbackup is a dog.. at least until the latest version it cannot restore the partition without first loading windows. There are about a zillion backup software versions for windows.. look up reviews and buy one which works for you. I use a free one Macrium Reflect which does full disk backups and is easy to restore.. to do incremental backups though you have to pay for it.

  • TypeError: Error #1034 - Want to display a swf

    Hi,
    I´m new to AS3 and try to load/display swf´s on the stage. The swf´s should run and if the user clicks a button the next swf should be displayed.
    That works so far if I use some swf´s that are created also with FlashPlayer 9 and AS3. But if I use a swf created by someone else I get a TypeError: Error #1034. So far, I have no idea why this happens. Maybe you can have a look at my code and give me a hint. Thanks in advance.
    var configfile = "test.xml";
    var xml_url:String = configfile;
    var urlLoader:URLLoader = new URLLoader();
    urlLoader.addEventListener(Event.COMPLETE, setClips);
    var xml:XML;
    var currentClip:int = 0;
    var clips:Array = new Array(); btnPrevious.addEventListener(MouseEvent.CLICK, previousClip);
    setChildIndex(btnPrevious,1);
    btnNext.addEventListener(MouseEvent.CLICK, nextClip);    
    setChildIndex(btnNext,1);
    function setClips(e:Event) {
        this.xml = new XML(e.target.data);
        this.playClip(this.currentClip);
    function playClip(index:Number) {              
        if (!this.clips[index]) {           
            var request:URLRequest = new URLRequest(this.xml.item[index]);           
            var loader:Loader = new Loader();
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.setMovieClip);    
            loader.load(request);
        else {
            this.currentClip = index;              
         this.clips[this.currentClip].play();    
            this.addChild(this.clips[this.currentClip]);
            setChildIndex(this.clips[this.currentClip],0);              
            this.clips[this.currentClip].addEventListener(Event.ENTER_FRAME, this.onEnterFrameCheck);
    function nextClip(e:MouseEvent) {
         this.clips[this.currentClip].gotoAndStop(0);
            this.removeChild(this.clips[this.currentClip]);
         this.currentClip = this.currentClip + 1;    
         if(this.currentClip == this.xml.item.length()) {
              this.currentClip = 0;
         this.playClip(this.currentClip);    
    function previousClip(e:MouseEvent) {
        this.clips[this.currentClip].gotoAndStop(0);
        this.removeChild(this.clips[this.currentClip]);
        this.currentClip = this.currentClip - 1;
        if(this.currentClip == -1) {
           this.currentClip = this.xml.item.length() - 1;    }         this.playClip(this.currentClip);    
    function setMovieClip(e:Event):void {    this.clips[this.currentClip] = MovieClip(e.target.loader.content);
        this.addChild(this.clips[this.currentClip]);
        setChildIndex(this.clips[this.currentClip],0);  
        this.clips[this.currentClip].addEventListener(Event.ENTER_FRAME, this.onEnterFrameCheck);
    function onEnterFrameCheck(e:Event):void {
        if(this.clips[this.currentClip] && this.clips[this.currentClip].currentFrame == this.clips[this.currentClip].totalFrames) {
            this.clips[this.currentClip].gotoAndStop(0);    
            this.clips[this.currentClip].removeEventListener(Event.ENTER_FRAME, this.onEnterFrameCheck);         
            this.removeChild(this.clips[this.currentClip]);    
            if(this.currentClip >= this.xml.item.length()-1) {
                 this.currentClip = -1;
         }                               this.currentClip++;              
            this.playClip(this.currentClip);
    urlLoader.load(new URLRequest(this.xml_url)); 
    stop();
    And here The XML:
    <banners>
    <item>banner1.swf</item>
    <item>banner2.swf</item>
    <item>banner3.swf</item>
    </banners>
    The full Error Message (In German:)
    TypeError: Error #1034: Typumwandlung fehlgeschlagen: flash.display::AVM1Movie@34d4df9 kann nicht in flash.display.MovieClip umgewandelt werden.
        at teaser_fla::MainTimeline/setMovieClip()

    The problem will be related to trying to manipulate an AS1/AS2 file using AS3... it cannot be done.  In this case, you are probably just seeing the first of a few errors where you try to manipulate an AS2 object by trying to cast it as an AS3 MovieClip object.  You would run into problems later when you try controlling/reading that same file (currentFrame is not an AS1/AS2 property, but you attempt to extract it).
    Per the Flash Help documentation...
    "ActionScript 3.0 code can load a SWF file written in ActionScript 1.0 or 2.0, but it cannot access the SWF file's variables and functions. "
    You can implement the LocalConnection class to overcome some of the issues, but if you are using other people's files, you are likely to hit a wall...
    "LocalConnection objects created in ActionScript 3.0 can communicate with LocalConnection objects created in ActionScript 1.0 or 2.0.
    The reverse is also true: LocalConnection objects created in ActionScript 1.0 or 2.0 can communicate with LocalConnection objects created in ActionScript 3.0. Flash Player handles this communication between LocalConnection objects of different versions automatically."

  • I loaded music on my nano with my old laptop. now using a new laptop and want to load music on my nano but it wants to delete all song. How can I load new music frmo new laptop onto my nano and keep existing songs?

    I loaded music on my nano with my old laptop. now using a new laptop and want to load music on my nano but it wants to delete all song. How can I load new music frmo new laptop onto my nano and keep existing songs?

    Import the music on the external HD into iTunes.  If you don't want iTunes to make a new copy of each track that is stored in your iTunes Media folder on your PC's internal HD, make sure the Copy files to iTunes Media folder when adding to library option is NOT ticked from under the Advanced tab of iTunes Preferences.  Just remember that if you go this route, you'll always need to have your external HD plugged in before you start up iTunes.
    B-rock

  • I want to load a sales order from xml file. How can I do.

    Hi,
    I want to load a sales order from XML  file. How can I do ? how can i create the sales order?
    what are the necessary  setting for  create the sales orders.
    with Regards,
    Prakesh.

    Three options come to my mind.
    Option 1: Use SAP transaction SXDA_TOOLS (Object Type BUS2032), Program Type (BAPI) and Program (CREATEFROMDAT2).
    Option 2: Use SAP transaction SXDA_TOOLS (Object Type BUS2032), Program Type (DINP) and Program (RVINVB10).
    Option 3: Translate the xml to IDoc so that ORDER04 / ORDER05 Idoc can be used to create Sales order (WEDI transaction).

  • I have my iTunes on my PC and have an iPod Classic, I have just purchased an iPod touch and want to load all of my Itunes music onto it, how do I do this and not loose my library, I'm not very computer savvy.

    I have my iTunes on my PC and have an iPod Classic, I have just purchased an iPod touch and want to load all of my Itunes music onto it, how do I do this and not loose my library, I'm not very computer savvy.

    You sync music the same way as on the Classic. What you sync to an iPod does not effect the iTunes library on your computer.
    iTunes 11 for Windows: Syncing overview
    or
    iTunes 11 for Mac: Syncing overview

  • I have downloaded cds into my itunes library and want to load them ont my ipod touch.  it is only transferring music that i have purchased.  How come?

    I have downloaded cds into my itunes library and want to load them ont my ipod touch.  it is only transferring music that i have purchased.  I did not have this problem with my iphone or my old ipod touch.  How come?

    Do they play in iTunes on the computer?
    Did you use the iTunes import feature?
    http://support.apple.com/kb/PH12486
    What is the format of the songs? Select a song and right click and select Get Info and go to the Summary tab

  • How do I load my hubby's backed up contacts from itune to my phone with his new sim - itunes is registering my serial number and wants to load my contacts

    We are fairly new iPhone users and my hubby lost (misplace he says) his iPhone but we had an another phone (not iPhone) and want to load his contacts onto a new SIM  that he can use on that phone. We have changed his phone number to the new sim.   I thought if I put his SIM in my iphone I could go in & add his backed up contacts onto his Sim but can't see how I can direct iTunes to do this as it must be looking at the phone serial number instead of the phone number which I was hoping it would do.  I wants to back up & sync my contacts/info to his new SIM?  Is anyone able to tell me how I can get his contacts onto his SIM without a new iPhone?
    Thanks for your help.
    Jacki

    No contact information is stored in iTunes. Contact information is synced through iTunes to a supported contact application on your computer: Outlook, Windows Address Book, OS X Address Book. Unless you own a sim card reader/writer, you're gonna have to manually enter these contacts directly on the phone.

  • Admission charge my iPod is turned a corner, and Does not want to load composure?

    Admission charge my iPod is turned a corner, and Does not want to load composure?

    Could English not be your native language since you question does not make sense? If so try posting in your native language. Otherwise clarify.

  • Want to use external drive for new Mac, fresh iTunes

    So I recently got a new Mac and have not transferred any music to it yet. In fact I haven't even launched iTunes. I want to store all of my music and play it from an external drive. I have found articles detailing how to transfer your library from your internal drive to an external one but I don't have an internal library of music on this machine. How do I set up iTunes to play from an external library for the first time? And how do I add my backed up music from my previous iTunes to that external drive's new music library? Do I just drag the files into the folder and hope iTunes will recognize them?
    Thanks!

    okay, i had to collect my thoughts for a moment
    ... but I don't have an internal library of music on this machine.
    is *this machine* the new Mac ?
    How do I set up iTunes to play from an external library for the first time?
    the files will have to be added to iTunes. however, with the correct settings, they can be put straight on the external.
    in order to set up iTunes on the new Mac, you will have to launch it. with the external drive mounted on your new Mac's desktop, go iTunes > preferences > advanced and point +iTunes media folder location+ to the external. this will cause iTunes to put all newly added content in that location.
    also on the advanced tab, check +keep iTunes media folder organized+ and +copy files to ... when adding to library+.
    And how do I add my backed up music from my previous iTunes to that external drive's new music library?
    did you back up the music to disk ? if so, you should probably authorize iTunes with your iTMS account details, then just pop in the disk(s) and add the content to your library.
    if you have backed up to an external HD, use the +add to library+ command from the file menu and navigate to the folder containing your media files.
    JGG
    edited by the Jolly Green Giant (where Green stands for environmentally friendly)

Maybe you are looking for

  • Problem with Background image and JFrame

    Hi there! I've the following problem: I created a JFrame with an integrated JPanel. In this JFrame I display a background image. Therefore I've used my own contentPane: public class MContentPane extends JComponent{ private Image backgroundImage = nul

  • Throws severe error in OBIEE SA with Essbase Cube as Source

    Hi All, Currently we built the SA using Essbase ASO cube as source.Wehen we are trying to drag more then 4-5 dimension hierarchies it throws an severe error Essbase Error: Query is allocating too large memory(>4GB) and cannot be executed.Query alloca

  • Creation of 250+ custom UDFs in OIM 11gR2

    We are working on a IAM implementation using OIM 11g R2. Our requirement is to add 250+ custom UDF attributes in user profile. We already have 100 UDFs and planning to create additional 150 UDFs. Could you please let us know if anyone of you have com

  • Purchase order through FI

    Dear all, Can we create the PO in FI? By the thing is client which is series org. didn't implemented MM. thet want issue the PO through FI to buy anything. is it possible? If it's posible, plz  tell me the procedure. Thanks in advance, Regards sriniv

  • New MacBook Air w/ lines, what is the panel #?

    So after long delay I bought a MBA for my primary computer... However, I have the grey lines and I returned it and received another one with even worse grey lines. This is absolutely insane! How can this be? When compared next to the MBP and MB this