How can I load an external SWF into a clip that is inside another video clip?

Hello.

I create my first flash (actionscript 3.0) Web site, but I'm stuck with a visual effect, I want to create.
I have a window on my website called contentWindow. Whenever you click on a button, this window is supposed to leave the scene, loading the requested content and back on the scene.
The sliding window is a clip with 83 frames, 21 to enter the stadium, 21 to leave the scene once again, 20 for anything (it's just to simulate the load time) and 21 to the back on the scene.

Now, my goal is, when the user clicks a navigation button, the window leaves the scene, loading an external SWF with the content and then returned to the scene.

I have the clip of 'window' with an instance name of "contentWindow". Inside there is an another film clip with an instance name of "contentLoader. The content that the user has requested must appear inside the 'contentLoader.

Now, when the contentWindow leaves the scene, I get this error message:

Quote:
TypeError: Error #1009: cannot access a property or method of a null object reference.
at rwd_fla::MainTimeline/trigger()

Tags: Adobe Animate

Similar Questions

  • How can I load an external .swf into my step by pressing a button?

    Hello world...

    I have to add an external swf in a specific position in my scene by pushing a button.

    Comeon can help me?

    Thank you.

    using as3, assuming you have a button named "myButton":

    var myLoader:Loader = new Loader(); something to load the swf file

    myButton.addEventListener (MouseEvent.CLICK, loadSWF); Earphone for your button click

    function loadSWF(event:MouseEvent):void {}

    listener for when the charge is complete

    myLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, addSWF);

    load the SWF - using your url of course

    myLoader.load (new URLRequest ("yourSWFsURL.swf"));

    }

    function addSWF(event:Event):void {}

    var mySwf = myLoader.content; the thing charge charger

    mySwf.x = 100; anywhere in x

    mySwf.y = 100; anywhere in there

    addChild (mySwf); Add it to the stage

    }

    HTH,

    -Ted

  • LOAD AN EXTERNAL SWF INTO A CLIP

    Hello.

    I work in a project that load several SWF into a main movie. I use this code and works fine:

    btn_que.addEventListener(MouseEvent.CLICK, presionado); 
    function presionado(Event:MouseEvent){
       //Crea una variable llamda cargador para que cree un cargador//
       var newMedia:Loader = new Loader();
       //Crea una variable para generar un clip vacio (anteriormente host)//
       var cont:MovieClip = new MovieClip();
       //Ruta donde esta la pelicula a cargar//
       newMedia.load(new URLRequest("que_es.swf")); 
       //Posicion X que va a tener//
       cont.x = 0;
       
       stage.addChild(cont);
       cont.addChild(newMedia);
    }

    But I want to load the swf file into a clip (called host), when the person in the button click (really my button is a movi clip).

    What should I do?

    Thank you...

    See the code below (read comments):

    btncerrar.visible = false;
    // declare variable in this scope
    // so that it is visible by other functions
    var newMedia:Loader;
    // container should be in upper score too
    // Sprite is more efficient
    var cont:Sprite;
    
    btn_que.addEventListener(MouseEvent.CLICK, presionado);
    function presionado(Event:MouseEvent){
       //Crea una variable llamda cargador para que cree un cargador//
       newMedia = new Loader();
       //Crea una variable para generar un clip vacio (anteriormente host)//
       cont = new Sprite();
       //Ruta donde esta la pelicula a cargar//
       newMedia.load(new URLRequest("que.swf"));
       btncerrar.visible = true;
       //Posicion X que va a tener//
       cont.x = 0;
       stage.addChild(cont);
       stage.addChild(btncerrar);
       cont.addChild(newMedia);
    
    }
    
    btncerrar.addEventListener(MouseEvent.CLICK, cerrar);
    function cerrar(Event:MouseEvent){
         btncerrar.visible = false;
         cont.removeChild(newMedia);
         newMedia.unload();
         newMedia = null;
    }
    
  • How can I load my CS5 on my new laptop that does not have a hard drive?

    How can I load my CS5 on my new laptop that does not have a hard drive?

    Downloads available:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

  • load an external swf on a mc that is on the screen

    This seems like a basic question, but if I have a swf file in the same directory as the fla and wants her to be on a mc, is there an easy way? so I make a movieclip on the screen and you want it to load. someone at - it a small example?

    Use the loader class to load an external swf.

    var loader: Loader = new Loader();

    Loader.Load (new URLRequest ("yourexternalswf.swf"));

    addChild (loader);  Adds the charger to the current timeline

    If you want to add the loader to a movieclip, the method addChild to this movieclip, for example:

    yourmovieclip.addChild (loader);

  • How can I load multiple RAW files into the same workspace (in layers)?

    I want to load several raw files from my windows files in a workspace to manpulate together. How can I do this?

    You can place in the RAW files as layers of smat object. I also think that you can also use the script load Photoshop files in a stack. Other Scripts cal also be downloaded and used >

    Photo Collage Toolkit

    Scripts for Photoshop is powerful and I think that this package demonstrates this a video showing a collage of 5 model PSD image fills with images:

    The package includes four simple rules to follow to make Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.

    1. Models of photo collage for the desired print size - width and height of the size and DPI print resolution.
    2. Photo collage templates must have a background layer in Photoshop. The content of this layer can be anything.
    3. Photo collage templates must have alpha channels named "Picture 1", "Picture 2"... "Picture n".
    4. Photo collage templates layers above the background layers must provide transparent areas to reveal the images which will be placed below them.

    There are fifteen scripts in this package, they provide the following functions:

    1. HelpPhotoCollageToolkit.jsx - online help
    2. TestCollageTemplate.jsx - used to test a model of Collage of Photo while you're doing it with Photoshop.
    3. CollageTemplateBuilder.jsx - can build models that are compatible with this toolkit scripts.
    4. LayerToAlphaChan.jsx - used to convert a stack of the Prototype Image layers in a document template.
    5. InteractivePopulateCollage.jsx - used to fill interactively model Any Photo Collage. Offers more user control insert images and text.
    6. ReplaceCollageImage.jsx - allows to replace an object layer dynamic image collage populated with another image resized and positioned correctly.
    7. ChangeTextSize.jsx - this script can be used to change the size of text Image stamps when the size used by the filling did not work well.
    8. PopulateCollageTemplate.jsx - used to fill a Photo Collage template and leave the populated copy automatically opened in Photoshop.
    9. BatchOneImageCollage.jsx - used for the models automatically batch fill Collage that have only a single image inserted. The Collage or picture may be stamped with the text.
    10. BatchMultiImageCollage.jsx - used to model automatically batch fill any Photo Collage with images in an image source folder. Easier to use than the interactive script. Recorded collages can be twisted.
    11. PasteImageRoll.jsx - paste Images into a document to print on roll paper.
    12. BatchPicturePackage.jsx - used to model automatically batch fill any Photo Collage with an image in the image source folder.  Rotation of images for a better fit.
    13. BatchPicturePackageNoRotate.jsx - used to model automatically batch fill any Photo Collage with an image in the image source folder.
    14. PopulatePicturePackage.jsx - used to fill a Photo Collage fill with the same single image model and leave the populated copy automatically opened in Photoshop.
    15. PCTpreferences.jsx - edit this file to customize Collage fill preset scripts and add your own layer styles.

    Documentation and examples

  • How to correctly load an external swf file in iosAir app? I get a blank screen.

    So this code works flawlesly we Air for Android, it works very well when I test the movie in Flash, but once I have the export, I get a blank screen. I've done a swf with a place withotu any code, and flash is still unable to load. It's weird cause everything works well when using the shell to the debug option, but when I goes to the white screen of standard debugging appears on my ipad. I read somewhere that it caused by the way flash saves the link to external files. So after the file is compiled Flash is unable to find the files added prefiously, which results in a blank screen. There is clearly something wrong with the way in which the process of compiling the application.

    Tried this:

    var Xpos:Number = 0;

    var Ypos:Number = 0;

    var loader: Loader = new Loader();

    var link: URLRequest = new URLRequest ("Untitled - 1.swf");

    Loader.Load (Link);

    addChild (loader);

    And this:

    var ldr:Loader = new Loader();

    LDR. Load (new URLRequest ("Untitled - 1.swf"));

    ldr.contentLoaderInfo.addEventListener (Event.COMPLETE, loaded, false, 0, true);

    function loaded(event:Event):void {}

    addChild (event.target.content);

    }

    But nothing works. I still get a blank screen. Is it possible to add the SWF manually in the file descriptor cause flash most likely he mess up? I don't really want to use via the command line.

    Read this article, especially the little loadercontext and currentdomain:

    http://blogs.Adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-SWFs-in-air-apps on ios.

  • How can I load all my music into a folder

    I have 400 songs on a micro sd .every artist has it's own folder.my bridge will have access only a folder randomly play.want to access all songs randomly thanks lynn

    I have 400 songs on a micro sd .every artist has it's own folder.my bridge will have access only a folder randomly play.want to access all songs randomly thanks lynn

    ==========================================
    If you perform a search from the SD card to format (extension)
    the files of music... for example... MP3... When all the files
    lie... type Ctrl + A to select all the and Ctrl + C to copy
    them...

    Now... Right-click on an empty space on your desktop and choose...
    New / folder... Right-click on the new folder and choose... Dough.
    This should copy all MP3 files into the new folder.

  • How to speak with mcs external swf to the main fla file

    Hello

    I have a main fla file that loads an external swf into a holder mc, let's call it "swfloaderholder", when you click a menu item.

    Inside the external swf fla, I have a mc holder, call it, 'jpgloaderholder' that loads different JPEG files.

    Is there a way to "talk" to the "jpgloaderholder" since the main FLA to breast?

    Thank you

    R

    I can go below, and it will be probably more useful to you if you show the code that you use for the charger.

    You must wait until the file is loaded before you try...

    MovieClip (yourLoader.content) .gotoAndStop (someFrame);

  • Load an external swf as a different size?

    Hello - it seems that it would be quite easy, but I couldn't understand the research in the Flash help documentation.

    I am using Flash CS3 and AS2.0.  I use the loadMovie function to load an external swf into an empty movieclip.  The problem is that the external swf file is bigger that the image I am load, so I would load it with specific width/height settings (essentially to load it in and resize it down).

    What would be the command loadMovie to do it with?

    Thank you!!!

    You will have to wait for the movie to load before you can change its size.  To know that the film is loaded, you want to override the method MovieClipLoader.loadClip, loadMovie.  The loadClip method supports having a similar earpiece so that you can know when the file is loaded and ready to use.  If you are looking for the MovieClipLoader.addListener method in the help documentation, there is an example that should help you through most of it.  He uses an onLoadInit event listener which is what you want to use because you have to wait as the SWF to be loaded and ready for use before trying to influence it.

  • Hello, how can I insert a PDF file into a Pages Document?

    How can I insert a PDF file into a Document that I wrote with Pages? I know that I used to do with Windows Word.

    Drag it out of the Finder.

    Peter

  • How can I create a screen divided into movie maker?

    original title: Director - split screen

    How can I create a screen divided into movie maker?  I have a video of the presenter and a PowerPoint presentation and would like to show on the screen in the film.

    You need a custom... transition may be the
    the following link would be a place to start.

    Split video Transition
    http://www.windowsmoviemakers.NET/forums/ShowPost.aspx?PostID=200548

    Maybe the next Movie Maker Forum
    would provide more information:

    Movie Makers Forums
    http://www.windowsmoviemakers.NET/forums/

  • files and folders: How can I load all my files and folders to my new account of my external hard drive?

    Who can help, I just put a new account on my computer and deleted the old account. I backed up the old files on my external hard drive. I want to know is how can I load all my files and folders to my new account of my external hard drive? I thank you for your time and knowledge have a very nice evening, Shawn

    Because it's a new account (even if with the same name), the restore procedure is unable to put files and folders in the same place, they came (because this place technically no longer - if yes, then the process is done and the transfer is complete). It can create a set of separate files (maybe even under a new user name, if it has been stored in this way).  If so, all you need to do is copy the data as you would copy any other files and folders (not the main files of the user profile themselves but the data in them) on the new files in your user account and who will take care of the transfer. Here is more information about the restore procedure which may help you in the process.

    Here is an article on the restore procedure:http://www.vista4beginners.com/How-to-restore-files to make sure you do this right.  It's a selective restore of a full or selective backup (not a full restore from a full backup) - but since you did a full backup, it matches your process more closely than would a full restore.

    This is a GREAT article on the backup and restore processes in Vista http://technet.microsoft.com/en-us/magazine/2007.09.backup.aspx , but he won't go into detail about the restoration process - considering almost as easy, of course.  But it teaches you a lot about what is possible and how to do it.  It also focuses primarily on the full backup process, but he did mention the full backup and restore process as well.

    Here is an article on the advanced use of restoration (during normal restore does not work):http://www.mayankraichura.com/post/2009/08/06/Avdvanced-Restore-via-Windows-Vista-Backup-and-Restore-Center.aspx.

    Restore files from a backup
    http://Windows.Microsoft.com/en-us/Windows-Vista/restore-files-from-a-backup

    Back up and restore: frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-and-restore-frequently-asked-questions

    I also found the following (but don't know if it of true or not):

    1. after the start of "backup and Restore Center."

    2. I chose "Advanced Restore"

    3. I was did not an administrator password... maybe because my account is an administrator account.

    4 choose "files from a backup made on a different computer.

    5. in the dialog box indicating "Select the location of the backup to restore", select "hard drive, CD or DVD...". »

    6. under the drop-down list box, select your drive/partition and continue

    7. If all the backups on your drive, it will show a list of them.

    8. in my case, he showed a backup, but in the backup location, it will show "backup location is not available."

    9. I was frustrated, but then I somehow just select this backup (Yes... even if he said that thebackup location is not available " ")

    10. and you press "next".

    11 guess what... no error!

    12. a window appeared asking me if I wanted to do a full restore, or I want to select specific folders or files.

    13. I selected the folders I wanted to restore and bingo... it their restored smoothly.

    14. so that the next time see a mistake, try to continue with him... ;)

    I don't know if this will help, but it does not provide much information about the process (when it works).

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How to pass parameters to external swf with the loader?

    Hello everyone

    I am loading an external swf file using the charger. It's a pdf file converted to swf format.

    How do I pass parameters to the file so that I can highlight certain words in the file?

    Thank you

    Hello everyone

    I solved this problem.

    Thank you

  • How can I load my photoshop CS6 cd to a new Macbook that has no cd slot and does not support the cd drive external mac.

    How can I load photoshop CS6 on a new macbook, which doesn't have a cd slot and does not support the cd drive external mac? I have the original cd of the program.

    Jake

    Download & install instructions https://forums.adobe.com/thread/2003339 can help

    -includes a link to access a page to download the Adobe programs if you do not have a disk or drive

    -you will need to enter your original serial number during the installation for non-Cloud programs

    - or kglad links in response to #1 here can help https://forums.adobe.com/thread/2081216

    Also go to https://forums.adobe.com/community/creative_cloud/creative_cloud_faq

    - and also read https://forums.adobe.com/thread/1146459

Maybe you are looking for