Loader Class access .swf content

Hi!
I am having trouble accessing a MovieClip from a .swf file
that I load in my main movie.
I use a code similar to the one bellow, and
myMovieClip is a MovieClip placed directly on the stage of
my .swf file.
I would apreciate a little help on this.
Thank you!

Thanks, AlbertG! I did, indeed, do that, but it didn`t
work...
It gave me an error that I was trying to access a proprety of
loader that didn`t exist. But the way to get around it is(at
least it worked for me):

Similar Messages

  • Flash CS4 loader class content not displaying in browser

    Hello,
    I'm very new at Dreamweaver and actionscript so any help would be greatly appreciated!
    I'm on a PC and created a simple gallery in flash cs4 to load images on a button click.  The images are being loaded with a loader class.  When I test the gallery in flash the images load correctly.  However, I inserted the .swf into Dreamweaver and when I uploaded the page onto the server, the buttons and the animation worked correctly, but none of the images were being displayed.  I tested it in both Firefox and IE and it did not work in either browser.
    I thought maybe the files were in the incorrect location, but everything is in the same file, including the .swf and the images.  I'm also using TweenMax and all those files are also together with the .swf.
    I also ensured that I had the latest version of the Flash player, but it still is not working.
    Thank you!

    Thank you for the quick response!  I am not actually using XML - I am loading the images from a folder.  Here is my code:
    function clicker(e:MouseEvent):void
    var myMC:MovieClip = e.currentTarget as MovieClip;
    switch(myMC.name){
      case"_button1":
       loader.load(new URLRequest("imgs/image01.jpg"));
       break;
      case"_button2":
       loader.load(new URLRequest("imgs/image02.jpg"));
       break;
    //loader class
    var loader:Loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,placeimage,false,0,true);
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,errorhandler,false,0,true) ;
    loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,preload,false,0,true);
    this.addChild(loader);
    //handler for the loader
    function errorhandler(e:IOErrorEvent):void
    trace(e);
    function preload(e:ProgressEvent):void
    trace(e.bytesLoaded);
    The imgs folder is in the same folder as my .swf and has been uploaded.  Could there be something wrong with the links?

  • How can I control stage position for swfs loaded by Loader class?

    I'm creating a grid of buttons that, when clicked, will load a specific swf and I'd like for each swf to play in a certain portion of the stage.  When I use the Loader class:
    var my_loader:Loader = new Loader();
    my_loader.load(new URLRequest("abc.swf"));
    addChild(my_loader);
    the swf always displays at top left.  Is this an attribute of the individual swfs that I'm loading, or can I address the position in the main movie?
    Thanks-
    Sean

    addChild(my_loader);
    my_loader.x = 500;
    my_loader.y = 250;

  • Custom class loader and local class accessing local variable

    I have written my own class loader to solve a specific problem. It
    seemed to work very well, but then I started noticing strange errors in
    the log output. Here is an example. Some of the names are in Norwegian,
    but they are not important to this discussion. JavaNotis.Oppstart is the
    name of my class loader class.
    java.lang.ClassFormatError: JavaNotis/SendMeldingDialog$1 (Illegal
    variable name " val$indeks")
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:431)
    at JavaNotis.Oppstart.findClass(Oppstart.java:193)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at JavaNotis.SendMeldingDialog.init(SendMeldingDialog.java:78)
    at JavaNotis.SendMeldingDialog.<init>(SendMeldingDialog.java:54)
    at JavaNotis.Notistavle.sendMelding(Notistavle.java:542)
    at JavaNotis.Notistavle.access$900(Notistavle.java:59)
    at JavaNotis.Notistavle$27.actionPerformed(Notistavle.java:427)
    JavaNotis/SendMeldingDialog$1 is a local class in the method
    JavaNotis.SendMeldingDialog.init, and it's accessing a final local
    variable named indeks. The compiler automatically turns this into a
    variable in the inner class called val$indeks. But look at the error
    message, there is an extra space in front of the variable name.
    This error doesn't occur when I don't use my custom class loader and
    instead load the classes through the default class loader in the JVM.
    Here is my class loading code. Is there something wrong with it?
    Again some Norwegian words, but it should still be understandable I hope.
         protected Class findClass(String name) throws ClassNotFoundException
             byte[] b = loadClassData(name);
             return defineClass(name, b, 0, b.length);
         private byte[] loadClassData(String name) throws ClassNotFoundException
             ByteArrayOutputStream ut = null;
             InputStream inn = null;
             try
                 JarEntry klasse = arkiv.getJarEntry(name.replace('.', '/')
    + ".class");
                 if (klasse == null)
                    throw new ClassNotFoundException("Finner ikke klassen "
    + NOTISKLASSE);
                 inn = arkiv.getInputStream(klasse);
                 ut = new ByteArrayOutputStream(inn.available());
                 byte[] kode = new byte[4096];
                 int antall = inn.read(kode);
                 while (antall > 0)
                     ut.write(kode, 0, antall);
                     antall = inn.read(kode);
                 return ut.toByteArray();
             catch (IOException ioe)
                 throw new RuntimeException(ioe.getMessage());
             finally
                 try
                    if (inn != null)
                       inn.close();
                    if (ut != null)
                       ut.close();
                 catch (IOException ioe)
         }I hope somebody can help. :-)
    Regards,
    Knut St�re

    I'm not quite sure how Java handles local classes defined within a method, but from this example it seems as if the local class isn't loaded until it is actually needed, that is when the method is called, which seems like a good thing to me.
    The parent class is already loaded as you can see. It is the loading of the inner class that fails.
    But maybe there is something I've forgotten in my loading code? I know in the "early days" you had to do a lot more to load a class, but I think all that is taken care of by the superclass of my classloader now. All I have to do is provide the raw data of the class. Isn't it so?

  • Loading external .swf content using a button in CS5 AS3

    My project has about 400 independent files. It was originally created in AS2 using the following script.
    on (release){
    loadMovie("A_002.swf", _root);
    This same script is used every time I need to load the following .swf movie.
    I would like to use a similar (equivalent) script using AS3. (Please note that the objective is not to load dynamic content into a particular file as when creating a "Gallery". My objective is for the new loaded movie to applear in its own screen. At the same time the file on scree shall unload completely or dissapear.
    I have been trying to achieve the above result for a long time with no luck. I mean a long time a couple of months. PLEASE HELP !!!!!!

    I have tried the following:
    back_btn.addEventListener(MouseEvent.CLICK, mouseClick);
    function mouseClick(event:MouseEvent): void {
    varLoader:Loader = new Loader();
    loader.load(newURLRequest("file_to_be_loaded.swf"));
    addChild(loader);
    This script loads the file. However, it loads on top of the loader file. My goal is that once the called file loads up, the previous file will leave the screen leaving only the loaded file.
    NOTE: The objective is not to build a gallery. This optionn is used instead ob having 400 different scenes. Each .swf shall be loaded independently of all other .swf/s.
    Thanks for your help.

  • WARNING: Unable to access loaded classes

    Hi,
    Just installed OAS 10.1.3 on AIX. When I started the home OC4J instance, I got "WARNING: Unable to access loaded classes" in the OC4J~home~default_group~1 log file. Why this happened? Which classes unable to access?
    Thanks in advance.
    Richard

    Fixed as per Oracle Support (Note 376890.1 and Bug.5252013, not published yet)
    set the java system property in opmn.xml for home OC4J instance
    -Dclass.transfer=delegate

  • Getting atg.servlet.pagecompile.PageCompileException: can't load class: _dasadmin_3__UTF_s8._index Exception while accessing merch server dynamo

    Hi Experts,
    I am getting following error while accessing merch server dynamo,
    18:10:17,334 ERROR [STDERR] java.lang.UnsupportedClassVersionError: _dasadmin_3__UTF_s8/_index : Unsupported major.minor version 51.0
    18:10:17,335 ERROR [STDERR]     at java.lang.ClassLoader.defineClass1(Native Method)
    18:10:17,335 ERROR [STDERR]     at java.lang.ClassLoader.defineClassCond(Unknown Source)
    18:10:17,335 ERROR [STDERR]     at java.lang.ClassLoader.defineClass(Unknown Source)
    18:10:17,335 ERROR [STDERR]     at atg.servlet.pagecompile.ReusableClassLoader.findClass(ReusableClassLoader.java:330)
    18:10:17,335 ERROR [STDERR]     at atg.servlet.pagecompile.ReusableClassLoader.findClass(ReusableClassLoader.java:286)
    18:10:17,335 ERROR [STDERR]     at java.lang.ClassLoader.loadClass(Unknown Source)
    18:10:17,335 ERROR [STDERR]     at atg.servlet.pagecompile.ReusableClassLoader.loadClass(ReusableClassLoader.java:602)
    18:10:17,335 ERROR [STDERR]     at java.lang.ClassLoader.loadClass(Unknown Source)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.pagecompile.PageProcessor.loadClass(PageProcessor.java:2704)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.pagecompile.PageProcessor.loadClass(PageProcessor.java:2605)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.pagecompile.PageProcessor.compilePageClass(PageProcessor.java:2479)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.pagecompile.PageProcessor.getPageInfo(PageProcessor.java:1787)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.pagecompile.jsp12.Jsp12PageProcessor.getPageInfo(Jsp12PageProcessor.java:324)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.minimal.MinimalServletContainer.compileServlet(MinimalServletContainer.java:153)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.pagecompile.PageCompileServlet.service(PageCompileServlet.java:303)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.DynamoServlet.service(DynamoServlet.java:148)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:160)
    18:10:17,336 ERROR [STDERR]     at atg.droplet.DropletEventServlet.service(DropletEventServlet.java:657)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:267)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.pipeline.DispatcherPipelineServletImpl.service(DispatcherPipelineServletImpl.java:253)
    18:10:17,336 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    18:10:17,337 ERROR [STDERR]     at atg.servlet.pipeline.MimeTyperPipelineServlet.service(MimeTyperPipelineServlet.java:228)
    18:10:17,337 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    18:10:17,337 ERROR [STDERR]     at atg.servlet.pipeline.FileFinderPipelineServlet.service(FileFinderPipelineServlet.java:729)
    18:10:17,337 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    18:10:17,337 ERROR [STDERR]     at atg.servlet.pipeline.DispatcherPipelineServletImpl.service(DispatcherPipelineServletImpl.java:275)
    18:10:17,337 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    18:10:17,337 ERROR [STDERR]     at atg.servlet.pipeline.ServletPathPipelineServlet.service(ServletPathPipelineServlet.java:208)
    18:10:17,337 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    18:10:17,337 ERROR [STDERR]     at atg.security.ExpiredPasswordAdminServlet.service(ExpiredPasswordAdminServlet.java:312)
    18:10:17,337 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    18:10:17,337 ERROR [STDERR]     at atg.servlet.pipeline.BasicAuthenticationPipelineServlet.service(BasicAuthenticationPipelineServlet.java:513)
    18:10:17,337 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    18:10:17,338 ERROR [STDERR]     at atg.servlet.pipeline.DynamoPipelineServlet.service(DynamoPipelineServlet.java:491)
    18:10:17,338 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    18:10:17,338 ERROR [STDERR]     at atg.dtm.TransactionPipelineServlet.service(TransactionPipelineServlet.java:249)
    18:10:17,338 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    18:10:17,338 ERROR [STDERR]     at atg.servlet.pipeline.HeadPipelineServlet.passRequest(HeadPipelineServlet.java:1271)
    18:10:17,338 ERROR [STDERR]     at atg.servlet.pipeline.HeadPipelineServlet.service(HeadPipelineServlet.java:952)
    18:10:17,338 ERROR [STDERR]     at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:272)
    18:10:17,338 ERROR [STDERR]     at atg.nucleus.servlet.NucleusProxyServlet.service(NucleusProxyServlet.java:237)
    18:10:17,338 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    18:10:17,338 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    18:10:17,338 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    18:10:17,338 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    18:10:17,338 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    18:10:17,339 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    18:10:17,339 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    18:10:17,339 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    18:10:17,339 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
    18:10:17,339 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
    18:10:17,339 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    18:10:17,339 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    18:10:17,339 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    18:10:17,339 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    18:10:17,339 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    18:10:17,339 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    18:10:17,339 ERROR [STDERR]     at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
    18:10:17,340 ERROR [STDERR]     at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
    18:10:17,340 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    18:10:17,340 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    18:10:17,340 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
    18:10:17,340 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
    18:10:17,340 ERROR [STDERR]     at java.lang.Thread.run(Unknown Source)
    18:10:17,340 ERROR [PageCompileServlet] Error compiling page: /index.jhtml : can't load class: _dasadmin_3__UTF_s8._index
    atg.servlet.pagecompile.PageCompileException: can't load class: _dasadmin_3__UTF_s8._index
    Can You please suggest me to fix this issue.
    Thanks & Regards,
    Murali

    I cleanedup pagebuild in both merch1 server and home path,
    Even I'm getting same error.
    10:50:40,098 ERROR [PageCompileServlet] Error compiling page: /index.jhtml : can't load class: _dasadmin_3__UTF_s8._index
    atg.servlet.pagecompile.PageCompileException: can't load class: _dasadmin_3__UTF_s8._index
      at atg.servlet.pagecompile.PageProcessor.compilePageClass(PageProcessor.java:2482)
      at atg.servlet.pagecompile.PageProcessor.getPageInfo(PageProcessor.java:1787)
      at atg.servlet.pagecompile.jsp12.Jsp12PageProcessor.getPageInfo(Jsp12PageProcessor.java:324)
      at atg.servlet.minimal.MinimalServletContainer.compileServlet(MinimalServletContainer.java:153)
      at atg.servlet.pagecompile.PageCompileServlet.service(PageCompileServlet.java:303)
      at atg.servlet.DynamoServlet.service(DynamoServlet.java:148)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:160)
      at atg.droplet.DropletEventServlet.service(DropletEventServlet.java:657)
      at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:267)
      at atg.servlet.pipeline.DispatcherPipelineServletImpl.service(DispatcherPipelineServletImpl.java:253)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.MimeTyperPipelineServlet.service(MimeTyperPipelineServlet.java:228)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.FileFinderPipelineServlet.service(FileFinderPipelineServlet.java:729)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.DispatcherPipelineServletImpl.service(DispatcherPipelineServletImpl.java:275)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.ServletPathPipelineServlet.service(ServletPathPipelineServlet.java:208)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.security.ExpiredPasswordAdminServlet.service(ExpiredPasswordAdminServlet.java:312)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.BasicAuthenticationPipelineServlet.service(BasicAuthenticationPipelineServlet.java:513)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.DynamoPipelineServlet.service(DynamoPipelineServlet.java:491)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.dtm.TransactionPipelineServlet.service(TransactionPipelineServlet.java:249)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.HeadPipelineServlet.passRequest(HeadPipelineServlet.java:1271)
      at atg.servlet.pipeline.HeadPipelineServlet.service(HeadPipelineServlet.java:952)
      at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:272)
      at atg.nucleus.servlet.NucleusProxyServlet.service(NucleusProxyServlet.java:237)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
      at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
      at java.lang.Thread.run(Unknown Source)
    Can You please suggest any other solution.
    I'm using JBOSS version : jboss-eap-5.1.2
                  JDK version      : jdk1.6.0_31
    Thanks & Regards,
    Murali

  • Can an AS1/2 swf loaded via Loader class tell the main movie (AS3) that it has run to the end of its timeline?

    If I load an external swf:
    my_loader.load(new URLRequest("abc.swf"));
    addChild(my_loader);
    abc.swf starts playing - how do I get it to tell the main movie that it reached the end of its timeline and finished playing?  Added bonus: the loaded swf is AS1 and the main movie is AS3.  I'm not sure if I could convert the loaded swf to AS3.
    Thanks,
    Sean

    I have not used this component but it may work for you:
    http://www.jumpeyecomponents.com/Flash-Components/Various/ActionScript-Bridge-91/

  • What is or isn't possible on iOS?  (Not having Loader, loadBytes(), external swfs, etc)

    My basic question is:  "What are the classes which we should not use for iOS using the packager."
    I have been trying for a few days trying to get a simple Flash app to run on the iPad.  A very simple app (with sound!) with just 2 classes works fine (Performance is a whole other issue.  We will get to that).  But if I try anything else, all I get is a white/black screen on the iPad.  So it would be really nice to know what classes, functions, etc we CANNOT use for the Packager.
    I have fairly simple app (not as simple as 2 classes) which loads some art assets via URLRequest/Loader, puts them on the stage.  Fairly common standard practice in AS3.
    I've read about not able to load an external file using the Packager.  So to fix the situation of loading assets, I have looked into the [embed] tag, which seems to work.  I hope the blogger doesn't mind, but this page is an excellent source on what works and doesn't work with the [embed] tag in it's various flavors:  http://www.richardleggett.co.uk/blog/index.php/2010/03/08/flash_builder_and_flash_pro_asse t_workflows.  For example, AS3 in a swf is stripped out from an external swf using [embed].
    The best way to load an external swf file for iOS seems to be using [embed] with "application/octet-stream" and load the swf through ByteArray (Option #4 in the link above).  This works great on the PC.  HOWEVER, on iPad, it fails.  The [embed] tag works on the iPad with the other ways, so my guess is that loadBytes() does not work.  Is this true Adobe/Flash guys?  Can you confirm this?
    My initial question is "why is this not allowed on iOS?".  If it is because of the fact that it uses a Loader, can it be changed so it's not using a Loader to construct a MovieClip?  I have a ByteArray with the raw swf/MovieClip data.  Why can't I construct a MovieClip from it without going through Loader?
    This loadBytes() failure seems to be the only thing preventing me from using the normal pipeline of Flash development in loading external assets.  If there are other ways people have found, please share!
    Now on to performance.  Adobe, can you post some examples/samples of code which runs at decent performance?  Like a "tech demo" of what is possible using the Packager running on iPad/iPhone.  That would be extremely helpful for everyone.  I have done a lot of the optimizing suggestions on various sites and pages ( and by Adobe http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html), but I am not seeing the 30 fps performance that is MORE than possible on iPhone/iPad.  Displaying and moving around Bitmaps (I don't use any vector graphics) should be blazing fast.  Quake runs on iPad without any problems and that code is 10 years old.  Moore's law dictates that drawing Bitmaps using CPU should be faster than a 3D engine written 10 years ago...  I am trying out the new iOS 4.2 which is supposed to be "significantly" better, but I am still stuck on loadBytes().
    So at this point, I am blocked on loadBytes() and my performance for a simple app which draws a few Bitmaps and MovieClips is terrible.  I am hopeful some people out there have figured out some solution (there are lots of clever people out there) and I will stumble on to something.  But being forced to go native Objective-C seems to be my only option at this point.
    In summary, here are the questions I would like to ask the Adobe/Flash group for some more help/information/advise:
    - Why is Loader not allowed on iOS?  Is it a technical limitation of the hardware/os/Flash?  Will it never be supported?  What is the future of this class on iOS?
    - Why is loadBytes() not allowed on iOS?  I have the raw embedded data in memory.  I don't need to make a remote call so security should not be an issue.  Can I create a MovieClip without using Loader?
    - Why is AS3 stripped from the timeline when a Symbol is retrieved using [embed]?  Maybe this is the same reason loadBytes() fails, but if I could use [embed] and get a copy of the Symbol, that is what I need.  (There are issues with the mx.core.MovieClipLoaderAsset/Asset, but it is better than being blocked by loadBytes())
    - What are some apps you guys have written that we can use to compare PC vs iOS?  Again, a "tech demo" or sample code of what you as experts in Packager for iOS have done which runs at decent framerate (30+fps) would be of tremendous help.  If the Adobe/Flash group hasn't gotten the current Packager for iOS to handle more than 50+ 2D Bitmaps on screen running at 30+fps, that would be good to know.  Please let us know what the experts and owners of your software are capable of getting the most throughput using the Packager.  I'd hate to sound a bit fed up/angry, but I think you are wasting a lot of people's time and energy with a piece of software that, to me, seems like it was a bit early to release.  Flash can do some great things.  If it can do it on iOS, even better.  But PROVE it to us that it's possible, before having your customers run into barriers imposed on us by trial and error.
    Thanks.

    I have hardly ever seen a post here from someone at Adobe, so you may need to be patient.
    Read this article, and get its associated demo files, to see some good performing tech demos:
    http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html
    Back to your main point, loaders are working, what isn't working for you is accessing of things in the library of a successfully loaded swf, that have been set to Export for ActionScript. That means that the swf you have loaded has an ActionScript Class, to represent the library symbol. iOS Flash apps are native ARM code, and don't include the virtual machines that a browser plugin has, and so it's not able to interpret ActionScript. That may be why it would fail.
    Now, I can think of at least a couple of reasons why you might want to have external swfs with elements that you want to reuse in the main swf. One would be if you're intending to make a lot of them, like say if you wanted to have an Asteroids game and the ability to use artwork from a set of different swfs. Another reason might be if you want to skin your interface, by taking specific elements from the loaded swf and using them in the main swf. That way you could have artists preparing those swfs for you, and you just include them in your package, and load the one you want.
    There is a way to do either of those things. The second one can be done by having the item as a named symbol on the stage of the loaded swf. With a to-be-loaded swf named "inner.swf", that has a movieclip on its stage named "mc1", this script in the main swf would load that external swf and use its symbol on the main swf's stage, without having to make the inner swf's symbol use ActionScript:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    For the other case, you can take the item off the stage of the loaded swf and draw it into a bitmapdata, and then make as many bitmaps from that as you like. Here's the above example, only it adds the original movieclip to the main swf stage, and also creates a bitmap that looks the same:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    var bmd:BitmapData = new BitmapData(innermc.width,innermc.height);
    bmd.draw(innermc);
    var bm:Bitmap = new Bitmap(bmd);
    bm.x = 150;
    bm.y = 150;
    addChild(bm);
    So, the thing to learn is that a native ARM code application does not have an ActionScript interpreter in it, and if you need to do something that normally requires interpreting ActionScript, find another way to do it.

  • How can I load an external SWF into a movie clip that's inside other movie clip?

    Hi.
    I creating my first flash (actionscript 3.0) website but I'm
    stuck with a visual effect I want to create.
    I have a window on my website called contentWindow. Every
    time you click a button this window is supposed to leave the stage,
    load the requested content and return to the stage.
    The sliding window is a movie clip with 83 frames, 21 to
    enter the stage, 21 to leave the stage again, 20 for nothing (its
    just to simulate the loading time) and 21 to return to the stage.
    Now my goal is, when the user clicks on a navigation button,
    the window exits the stage, loads an external SWF with the content,
    and then returns to the stage.
    I've the "window" movie clip with an instance name of
    "contentWindow". Inside there is another movie clip with an
    instance name of "contentLoader". The content that the user
    requested should appear inside the "contentLoader".
    Now, when the contentWindow leaves the stage, 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()
    If I switch
    "contentWindow.contentLoader.addChild(navLoader);" for
    "contentWindow.addChild(navLoader);" it works fine, but the
    external SWF doesn't move with the window.
    How can I load an external SWF into a movie clip that's
    inside other movie clip?

    Hi,
    Recently, I have been putting together a flash presentation.
    And I am just wondering if the following might help you, in your
    communication with the said swf file:
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    onComplete);
    function onComplete(event:Event):void
    event.target.content.thinggy_mc.y -= 100;
    Not the best example, but this allows you to target a mc
    within an external swf file. I think if you look up this code, you
    will have an answer ;)
    Kind Regards,
    Boxing Boom

  • Error 2032 loading xml from swf

    Hello everyone.
    I have a php site (based on Joomla! CMS). In one php page, there is a <object> element wich loads the Adobe Flex 1.5 swf file that I have developed (Slideshow.swf). This swf file is a slideshow that loads a xml file using a httpservice. The xml file contains the urls to the images to be shown. The error occurs when thw swf file tries to load the xml file, but not always.
    - SITUATION 1: Visiting http://localhost/Slideshow.html or http://localhost/Slideshow.swf
      The html and the swf are the files generated by Adobe Flex builder.
      Navigators: IE 8, Mozila Firefox 3.5.5
       --> Yes, it works!!
    - SITUATION 2: Visiting http://mydomaing.com/folder1/folder2/Slideshow.html or http://mydomaing.com/folder1/folder2/Slideshow.swf
      The html and the swf are the files generated by Adobe Flex builder.
      Navigators:
         IE 8 --> Yes, it works!!
         Mozila Firefox 3.5.5   --> I don't get Error 2032, but the images can't be found. This is another problem...
    - SITUATION 3: Visiting http://mydomain.com
      Navigators: IE 8, Mozila Firefox 3.5.5
      --> No, it doesnt' work!! I get Error 2032!!
      The whole page loads. The swf loads, but when the swf tries to load the xml file, the fault event is throwed. Then I use an Alert.show. I'll give you as much information as I can:
    ERROR MESSAGE (FOR SITUATION 3)
    Message: faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: ./slideshowGallery.xml'
    Name: Error
    Root cause: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]
    Error ID: 0
    Fault code: Server.Error.Request
    Fault detail: Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: ./slideshowGallery.xml
    Fault string: HTTP request error
    FLEX CODE
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init();"
    The init method:
    private  
    function init():void{ 
    httpService.send();
    The httpservice element:
    <mx:HTTPServiceid="httpService"url="
    ./slideshowGallery.xml"resultFormat="
    e4x"fault="httpService_fault(event);"
    result="httpService_result(event)"
    />
    I think the handlers don't care. In SITUATION 3, the send() invocation always triggers the fault handler.
    The xml file is in the same folder as the swf file (I use ./slideshowGallery.xml for the url field of the httpservice element).
    This is the html code generated by the php page of my site:
    <div id="ol-flashheader">
    <object type="application/x-shockwave-flash" data="/templates/mx_joofree2/images/header.swf" width="700" height="240">
    <param name="wmode" value="transparent" />
    <param name="movie" value="/templates/mx_joofree2/images/header.swf" />
    </object>
    </div>
    Note: header.swf is my Slideshow.swf renamed.
    Ah, I have also a cross-domain policy file: http://mydomain.com/crossdomain.xml. And the following is curious. The content is:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy
    SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
      <allow-access-from domain=www.mydomain.com />
      <allow-access-from domain="mydomain.com" />
      <allow-access-from domain="*.mydomain.com" />
    </cross-domain-policy>
    But when i visit http://mydomain.com/crossdomain.xml with IE 8 what i see is:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy
    SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
      <allow-access-from domain=www.mydomain.com secure="true"/>
      <allow-access-from domain="mydomain.com" secure="true"/>
      <allow-access-from domain="*.mydomain.com" secure="true"/>
    </cross-domain-policy>
    But, when i visit that url with Firefox... correct, It doesn't adds the secure="true" attributes!! jajaja
    Please, I need some advise to solve this problem.
    Thank you very much.
    When I visit the web page (www.mydomain.com) and the swf tries to load

    I haven't found the solution yet, but i can give more info:
    I have modified the crossdomain.xml file to set secure="false". This way, when you view it with Internet Explorer, you can see secure="false" instead of secure="true". But this didn't solve the problem.
    I have read somewhere that avoiding Internet Explorer to cache files, could help. So, I have added the next line to the <header> section of the php page that contains the <object> tag that loads sthe swf file:
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
    This didn't solve the problem.
    Regards.

  • Loading an AS2 Swf into an AS3 project

    I have a need to be able to load legacy AS2 SWF's into a new
    AS3 project. I know that this is not readily possible, because you
    can only communicate between the two via the LocalConnection class.
    So, what I have done is to create an AS2 proxy SWF. This SWF will
    handle the loading of all legacy SWF's and act as a middleman to
    pass the function calls between the pre-compiled SWF and the new
    SWF using the LocalConnection class. The new SWF also needs to be
    able to load AS3 SWF's, though.
    Because of this, I have the need to detect the AS version of
    the loaded SWF. If 1 or 2, then change the source to the
    AS2Proxy.swf, if 3 then simply load it.
    I have written the following code. My problem comes in when
    the init event fires. Regardless of the compiled version of the
    loaded SWF, it always traces 3 as the AS version.

    Alright, I solved this problem, only to come up with many
    more.
    To solve this problem, I needed to point to the loaderInfo
    object of the UILoader's content. So:
    simulation.content.loaderInfo.actionScriptVersion.
    Now the proxy loads correctly, but I start getting errors
    immediately. Let me paste some code to show the next steps:
    First off. I immediately receive a StatusEvent error, though
    the path gets sent into the proxy and loads correctly.
    Next, when the complete event fires in the AS2 SWF - it sends
    a completion back up to let the AS3 SWF know that it finished (and
    any handling that needs to happen at that point.) I receive the
    following error:
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.LocalConnection was unable to invoke callback loadSwf.
    error=ReferenceError: Error #1069: Property loadSwf not found on
    com.applied.flash.events.AS2Connect and there is no default
    value.

  • Remove / unload external swf file(s) from the main flash file and load a new swf file and garbage collection from memory.

    I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?
    This is the error message(s) I am receiving: "TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at index_fla::MainTimeline/Down3()"
    import nl.demonsters.debugger.MonsterDebugger;
    var d:MonsterDebugger=new MonsterDebugger(this);
    stage.scaleMode=StageScaleMode.NO_SCALE;
    stage.align=StageAlign.TOP_LEFT;
    stage.addEventListener(Event.RESIZE, resizeHandler);
    // loader is the loader for portfolio page swf
    var loader:Loader;
    var loader2:Loader;
    var loader3:Loader;
    var loader1:Loader;
    //  resize content
    function resizeHandler(event:Event):void {
        // resizes portfolio page to center
    loader.x = (stage.stageWidth - loader.width) * .5;
    loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    /*loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;*/
    addEventListener(Event.ENTER_FRAME, onEnterFrame,false, 0, true);
    function onEnterFrame(ev:Event):void {
    var requesterb:URLRequest=new URLRequest("carouselLoader.swf");
    loader = null;
    loader = new Loader();
    loader.name ="carousel1"
    //adds gallery.swf to stage at begining of movie
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requesterb);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    // stop gallery.swf from duplication over and over again on enter frame
    removeEventListener(Event.ENTER_FRAME, onEnterFrame);
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent):void {
    // re adds listener for contact.swf and about.swf
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
    var requester:URLRequest=new URLRequest("carouselLoader.swf");
        loader = null;
    loader = new Loader();
    loader.name ="carousel"
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    removeChild( getChildByName("about") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of gallery.swf
    MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    function Down1(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    var requester:URLRequest=new URLRequest("contactLoader.swf");
    loader2 = null;
    loader2 = new Loader();
    loader2.name ="contact"
    loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader2.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader2);
    loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    function Down3(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    var requester:URLRequest=new URLRequest("aboutLoader.swf");
    loader3 = null;
    loader3 = new Loader();
    loader3.name ="about"
    loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader3.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader3);
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    removeChild( getChildByName("carousel") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
    stop();

    Andrei1,
    Thank you for the helpful advice. I made the changes as you suggested but I am receiving a #1009 error message even though my site is working the way I wan it to work. I would still like to fix the errors so that my site runs and error free. This is the error I am receiving:
    "TypeError: Error #1009: Cannot access a property or method of a null object reference."
    I'm sure this is not the best method to unload loaders and I am guessing this is why I am receiving the following error message.
         loader.unload();
         loader2.unload();
         loader3.unload();
    I also tried creating a function to unload the loader but received the same error message and my portfolio swf was not showing at all.
         function killLoad():void{
         try { loader.close(); loader2.close; loader3.close;} catch (e:*) {}
         loader.unload(); loader2.unload(); loader3.unload();
    I have a question regarding suggestion you made to set Mouse Event to "null". What does this do setting the MouseEvent do exactly?  Also, since I've set the MouseEvent to null do I also have to set the loader to null? e.g.
    ---- Here is my updated code ----
    // variable for external loaders
    var loader:Loader;
    var loader1:Loader;
    var loader2:Loader;
    var loader3:Loader;
    // makes borders resize with browser size
    function resizeHandler(event:Event):void {
    // resizes portfolio page to center
         loader.x = (stage.stageWidth - loader.width) * .5;
         loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
    //adds gallery.swf to stage at begining of moviie
         Down();
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent = null):void {
    // re adds listener for contact.swf and about.swf
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
         var requester:URLRequest=new URLRequest("carouselLoader.swf");
         loader = new Loader();
         loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader.load(requester);
         } catch (error:SecurityError) {
         trace(error);
         this.addChild(loader);
         loader.x = (stage.stageWidth - 739) * .5;
         loader.y = (stage.stageHeight - 500) * .5;
    // sure this is not the best way to do this - but it is unload external swfs
         loader.unload();
         loader2.unload();
         loader3.unload();
    // remove eventlistner and prevents duplication of gallery.swf
         MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         function Down1(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         var requester:URLRequest=new URLRequest("contactLoader.swf");
         loader2 = null;
         loader2 = new Loader();
         loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);    
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader2.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader2);
         loader2.x = (stage.stageWidth - 658.65) * .5;
         loader2.y = (stage.stageHeight - 551.45) * .5;
    loader.unload();
    loader2.unload();
    loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         function Down3(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         var requester:URLRequest=new URLRequest("aboutLoader.swf");
         loader3 = null;
         loader3 = new Loader();
         loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader3.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader3);
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
         loader.unload();
         loader2.unload();
         loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
         stop();

  • Loading an external SWF in and displaying it behind overlay/watermark

    I am building a SWF and the goal is to load in an external SWF file and then display that within my container. They are totally unrelated items and I do not want to modify the functionality of the item I am loading in. My SWF will briefly display a watermark overlay, but then disappear. Can anyone guide me into this best way of doing this?
    Also, is there anyway to get the properties from the SWF I loaded in (namely height and width) so I might be able to easily adjust the size of my SWF to match?
    Thanks!

    just load your external swf using the loader class.  what you described doing is standard stuff and nothing special needs to be done.
    however, you must wait until loading is complete before you can access the loaded object's width and height.

  • Accessing Jar contents

    Hi everyone,
    I'm sorry to ask such a dumb question, but I'm still e newbie with Java.
    Ok here goes:
    How can I access the contents of a Jar file, for example images in a package, like:
    com.mypackage.images ----> images that I need to access.
    I used the example of images for simplicity but the contents of the jar file could be anything, like database drivers, or other classes.
    Thank you in advance.
    Chris

    It's really quite easy; if your entire application is in the same jar-file it will be just as if you weren't using jars at all. To use classes in a different jar-file, that jar-file just has to be put in the classpath-variable, and all the classes inside will be accessible.
    Not sure what you meant about the images - if you were talking about a class named images, a package or actual images to be loaded. In the latter case, there are a few differences from otside of a jar-file:
    // If your images are outside the jar:
    Image img1 = Toolkit.getDefaultToolkit().getImage("nameOfImage.png");
    // If your images are inside the jar:
    Image img2 = Toolkit.getDefaultToolkit().getImage(getClass().getResource("nameOfImage.png"));

Maybe you are looking for

  • JVM and Azureus error

    # An unexpected error has been detected by Java Runtime Environment: # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d965340, pid=2296, tid=1652 # Java VM: Java HotSpot(TM) Client VM (1.6.0-beta-b59g mixed mode, sharing) # Problematic frame: # V [

  • Dashboard ISSUE,  blank or white widgets

    I've recently upgraded to snow leopard 10.6.1 but dashboard widgets go wrong since then. Some widgets are blank and some are partially white. Calendar shows only a table without dates. Clock shows arms without the name of the city. It's quite strange

  • How do you remove the program where it highlight a word that takes you to a link?

    I would like to remove the program where it highlights words that when clicked it takes me to a different link. How do I do that?

  • What Applications are included in Creative Cloud Complete

    Creative Cloud Complete - 29.99 / mo Latest Photoshop, Illustrator, and more ? dose it include all Adobe Applications such as AE, Photoshop, Lightroom ,,, etc?

  • IPod wont reset, how to fix it?

    I accidentally updated my iPod to 1.1, i took to Best Buy and they restored it, then updated and told me to restore it at home, after restoring, it is still at 1.1, another problem is that i have over 350 songs and 100 videos and the space still says