Problem loading swfs.

Hello, I got a problem with actionscript, I am not that good at it, but I know many programing languages so I guess its not that hard to understand
what it does, however.
What I want is, I have 2 swfs exported from Adobe After Effects, the one is continiously looping and the other is simply running just once,
and I want these 2 swfs to play the one after the other.
I try to load them as seperated frames so that the last frame loops again and again. But it seems I can't. I tried many techniques. So tell me urs.

Danis0 wrote:
Hello, I got a problem with actionscript
Then why not post in the ActionScript forum?

Similar Messages

  • Problem loading swf which reads data in a local file

    Hi,
    Using flex with a online project, I have to load a swf file, which reads data in a xml file (it works fine if I open it with flash player)
    I do a very simple test :
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="absolute"
                    minWidth="955" minHeight="600"
                    >
        <mx:SWFLoader id="swfloader" source="data/player.swf"/>
    </mx:Application>
    The result is that player.swf can't read the xml file (error : Error #2044: ioError non pris en charge : text=Error #2032: Erreur de flux. URL: enonce.xml).
    I do the same test with an AIR project, and it works fine !!!!
    It works also if I put the xml file directly at the same level as my compiled application (in bin-debug for instance).
    I think that it's a path problem, but I don't know how to set it.
    Is there any way to solve the problem ???
    Thanks a lot !
    Olivier

    Hi,
    Thanks for your answer, but I am not sure to understand it.
    What code I have to adjust :
    - the code of the swf I load ? It's a problem because I don't have access to the source code : my customer provides me only a swf file (with the xml file), and I have a lot of others swf files that work the same way, I can't ask him to modify everything.
    - the code of my application ? I don't really see how to use LoaderUtil.createAbsoluteURL, because when I debug, I see in the SWFLoader code that when this method is called, the returned url is good !
    Thanks for your help.
    Olivier

  • Problem loading swf file in flash player 9.0.47.0

    Hi all!
    I have a really strange problem and couldn't find any information over the internet.
    The problem only occurs in flash player 9.0.47.0. It works in all the others players, newer and older..
    I try to load a swf file to my web application and get the following error: "This content requires Adobe Flash Player 10.2. Would you like to install it now?"
    the log file shows:
    *** Security Sandbox Violation ***
    SecurityDomain 'http://10.1.1.84:8080/app/jsp/flex/bin-release/LP_FLEX_project.html' tried to access incompatible context 'http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?0.5087 71003223956'
    Warning: Reference to undeclared variable, 'out'
    Warning: Reference to undeclared variable, 'out'
    Warning: 'out' has no property 'text'
    Warning: Reference to undeclared variable, 'cameraSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'microphoneSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'privacy'
    Warning: checkPort is not a function
    Warning: Reference to undeclared variable, 'xOffset'
    Warning: Reference to undeclared variable, 'yOffset'
    Warning: Reference to undeclared variable, 'cameraSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'microphoneSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'privacy'
    Warning: checkPort is not a function
    Warning: Reference to undeclared variable, 'cameraSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'microphoneSettings'
    Warning: 'System' has no property '_visible'
    Warning: Reference to undeclared variable, 'privacy'
    Does anybody has a solution??
    Thanks alot!
    Assaf

    Maybe FP9 does not support your application / swf file?  How did you develop it?

  • Problem loading SWF

    Hi there,
    The following code is in my main FLA....
    quote:
    // Request the content
    var req:URLRequest = new URLRequest("PhotoViewer.swf");
    // Create a loader object
    var loader:Loader = new Loader();
    // Load the content
    loader.load(req);
    // Add loader into the Display List
    addChild(loader);
    // Check loading progress
    loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
    checkProgress);
    // Update progress bar
    function checkProgress(e:ProgressEvent):void
    var percent:int = (e.currentTarget.bytesLoaded /
    e.currentTarget.bytesTotal) * 100;
    loadingBar.text = String(percent + '%');
    mcLoadingBar.width = percent;
    // Check when content is loaded
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    contentLoaded);
    // Remove the progress bar objects
    function contentLoaded(e:Event):void
    removeChild(loadingBar);
    removeChild(mcLoadingBar);
    removeChild(loadingBarBorder);
    The SWF "PhotoViewer.swf" is a file that another Flash
    developer built and released as an open-source tutorial and the
    file uses a Document Class to create a Photo Gallery from an XML
    file. The PhotoViewer SWF works fine on it's own, but when I try to
    load it within my main SWF I get the following error message....
    quote:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at PhotoViewer()
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at PhotoViewer/init()
    at PhotoViewer/frame1()
    I can post the code for the PhotoViewer.fla and
    PhotoViewer.as if it will help locate the problem as to why I'm
    getting the above error.
    NOTE: The PhotoViewer.fla and PhotoViewer.as file has been
    updated by myself. Originally the PhotoViewer.as file's constructor
    would call a function called "init();" and the init function would
    specify the url of the XML file to load, but I have removed this
    init() function call from the constructor and instead I have placed
    this in the first frame of the PhotoViewer.fla and also updated the
    function call so it specifies the XML file to load (e.g.
    init("Portfolio-Identity.xml");).
    I thought it might be some problem with my ActionScript code
    loading the PhotoViewer.swf file, but I changed the loading url to
    another SWF that I built myself and it loaded the file fine.
    I'm not sure why I'm getting this error?
    Any help really appreciated!
    Kind regards,
    Mark

    My main FLA that is loading in the PhotoViewer.swf file has
    the following code....
    quote:
    // Request the content
    var req:URLRequest = new URLRequest("PhotoViewer.swf");
    // Create a loader object
    var loader:Loader = new Loader();
    // Load the content
    loader.load(req);
    // Add loader into the Display List
    addChild(loader);
    // Check loading progress
    loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
    checkProgress);
    // Update progress bar
    function checkProgress(e:ProgressEvent):void
    var percent:int = (e.currentTarget.bytesLoaded /
    e.currentTarget.bytesTotal) * 100;
    loadingBar.text = String(percent + '%');
    mcLoadingBar.width = percent;
    // Check when content is loaded
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    contentLoaded);
    // Remove the progress bar objects
    function contentLoaded(e:Event):void
    removeChild(loadingBar);
    removeChild(mcLoadingBar);
    removeChild(loadingBarBorder);
    The PhotoViewer.fla file has the following code....
    quote:
    init("Portfolio-Identity.xml");
    And the PhotoViewer.as file has the following code (see
    attached below)
    Hope this helps.
    Ta,
    M.

  • Problem loading SWF file in FlashIsland

    Hey,
    I am trying to use FlashIsland for ABAP WebDynpro.
    Unfortunately the SWF File is not loading. When I type the URL to the SWF File directly to the browser, the SWF file loads correctly.
    In the header I have posted the statement: initialize="initApp()". My initApp I have implemented, too (see below).
                   import sap.FlashIsland;
                   public function initApp():void
                        FlashIsland.register(this);
    What can be the problem there?
    First I thougt it might be a problem of my Internet Explorer configuration or the customizing of the SAP System. But when I execute the WDR_TEST_FLASH_ISLAND application everything works fine there.
    Thanks in advance for your help.
    Kind Regards,
    Thomas Weber

    So,
    I installed Flex Builder 3 with the Standard SDK 3.2.
    Now i implemented a very simple Flex Project again:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initApp()">
         <mx:Script>
              <![CDATA[
                   import sap.FlashIsland;
                   public function initApp():void
                        FlashIsland.register(this);
              ]]>
         </mx:Script>
         <mx:Label x="166" y="115" text="TEEEEESSSSSSSSSTTTTTT" width="399" height="161" id="LBL_TEST" enabled="true"/>
    </mx:Application>
    I get the same behavior like explained before. The Flash is not loading at all!
    And again I cant do any right click on the page. I get an empty page loaded...
    Please help me! What can be the problem?
    Nice regards,
    Thomas

  • Problem - loading .swf's

    I have a main movie published as a projector file (.exe) from
    Flash. This file needs to load other .swf-movies into it and it
    works flawlessly on my computer.
    However, when I copy the files and place them on other
    computers the main file works fine but the sub-.swf's will not load
    into the main movie.
    Does anyone have experience with this type of problem and how
    to solve it?
    Thanks.

    My problem has been solved - this discussion provided the
    solution:
    http://www.jetfly.no/flash/archives/000068.html
    It turns out that if you want to run a Flash presentation on
    your hard drive the external applications (in my case a bunch of
    .SWF's) must be placed inside of a directory THAT DOES NOT CONTAIN
    ANY SPECIAL CHARACTERS OR SPACES!!! A Flash Player 8 bug I
    suppose.

  • Problem Loading swf with MCL class

    Hey, I am relatively new to actionscripting and am having a
    bear of a time trying to figure out why this won't
    load.....basically i am trying to use the movieClipLoader class to
    call up a swf..... so basic i know..This is my script
    any help here?

    does container exit on the timeline that contains your code?
    is master.swf in the same directory with your flash swf and
    html?

  • Problem loading .swf embedded with HTML

    Hi All,
    I have embedded .swf file with HTML. It is working fine with
    win xp and win 2003. But not working on win 2000 server.
    I have set the MIME in IIS for .swf.
    Please let me know what setting I should configure.
    Thanks,
    Aung

    does container exit on the timeline that contains your code?
    is master.swf in the same directory with your flash swf and
    html?

  • Problem Loading .swf buttons on dreamweaver?

    I animated 4 flash buttons in one .fla file. When you rollover each button, an animation should play. However, when I preview the .swf in Dreamweaver, the rollover buttons only work HALF the time. I tried putting a preloader on the .fla file as well as toggling the quality to low in the original .fla, but it still only works half the time??

    How have you designed the buttons/animations?  What code is used?

  • I.E./Active X problem loading movie with multiple .swf

    I have a webpage that loads .swf's into a main "container"
    swf, and I've found a fix for the I.E./Active X (this is a good
    bookmark:
    http://www.kirupa.com/developer/flash8/flash_fix.htm
    ). But the container seems to get stuck on the preloader now? Any
    ideas?
    PROBLEM PAGE HERE
    WORKING PAGE HERE

    FRAME 1:
    System.useCodepage = true;
    main="";
    pageNum=1;
    if (_framesloaded > 50){
    //if (_framesloaded == _totalframes){
    gotoAndStop (8);
    } else {
    gotoAndPlay(1);
    FRAME 7:
    gotoAndPlay(1);
    FRAME 8:
    if (whichFrame == "return"){
    gotoAndStop (20);
    less6.gotoAndStop(2);
    } else {
    gotoAndStop("splash");
    FRAME 20:
    if (_framesloaded == _totalframes){
    gotoAndStop ("p14");
    } else {
    gotoAndPlay(10);
    }

  • As 3 load swf flie problem,help

    I have now trapped by a strange problem of loading the swf
    file.For some reason I need to use a main swf file to load other
    swf file and use the class in it,it's very common.
    And now I worte a class blow to explain what problem I met:
    package
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    public class TestClass extends MovieClip
    public var sp:Sprite;
    public static var count:Array=new Array();
    public function TestClass()
    sp = new Sprite();
    //drawcrr();
    this.addEventListener("test",test);
    count.push("");
    trace("count in circle is:", count.length);
    private function test(e:Event):void
    drawcrr();
    public function drawcrr():void
    sp.graphics.beginFill(0);
    sp.graphics.drawCircle(0,0,10);
    sp.graphics.endFill();
    addChild(sp);
    Save it as TestClass.as for next use;
    Use the class to link to a fla file as the documentClass then
    compile as a swf file name as
    kk.swf then make a copy name kk1.swf;
    Create a new fla file in the same directory then write the
    code blow on the mainTimeLine :
    var kk:TestClass = new TestClass();
    var URL1:URLRequest = new URLRequest("kk1.swf");
    var URL2:URLRequest = new URLRequest("kk.swf");
    function domain():LoaderContext
    var context:LoaderContext = new LoaderContext();
    context.applicationDomain = new
    ApplicationDomain(ApplicationDomain.currentDomain);
    return context;
    var L1:Loader = new Loader();
    L1.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
    L1.load(URL1);
    var L2:Loader = new Loader();
    L2.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
    L2.load(URL2);
    //v.text = flash.system.Capabilities.version;
    function onComplete(e:Event)
    trace(e.target)
    then compile this fla file you will find the flash will put
    out below:
    count in circle is: 1
    count in circle is: 2
    count in circle is: 3
    [object LoaderInfo]
    [object LoaderInfo]
    and if you notation the line "var kk:TestClass = new
    TestClass();" compile it again
    the flash will output :
    count in circle is: 1
    count in circle is: 1
    [object LoaderInfo]
    [object LoaderInfo]
    It's prove that the same class in the different swf was
    loaded by a main swf file,the same class in the different swf file
    will be treated as the different class so that I can use them
    individually but when I put the code:"var kk:TestClass = new
    TestClass();" in the main swf file all this will be break down,I
    can't use the class in kk.swf and class in kk1.swf individually
    the flash make then as the same class because the static
    variable "count" was count to 3.
    it prove that all those 3 swf file will use the exactly same
    class;So, that's the problem,it will make my programme cause error.
    Can some one kindly to tell me why this happened?And how can
    I solve this problem.

    Sorry about that.
    That problem is:
    If I use a shell swf to load some swf file and the shell swf
    and the loaded swf file have the same name class,The loaded swf's
    class will be ignored.
    That will make me can't use the loaded swf file's class which
    have same name with the shell swf.
    However, this problem can be solved by useing the application
    domain.Just give the swf you loaded a new application domain in the
    shell swf.
    But after that I found a new problem appear in front of mine,
    that is:
    If I use the different application domain in my shell swf how
    could they communicate with each other?
    For example:
    If my shell swf have a class named TEST,and the loaded swf
    also have the same name class those two classes both extends the
    class named TESTParent and the TESTParent have a public static
    variable to count the instance of the class.If I want use those two
    TEST
    class individually and at the same time made the static
    variable in the TESTParent count work as a same class how can I do?

  • AIR load swf cash problem

    hi folks
    I am building android app.
    I have a problem with loading several .swfs cache. this swf-s have almost same package and class structure/ names.
    App stores ActionScript and assets of first loaded swf and when i try to load second swf, anyway it loads first swf.
    I used
    request.cacheResponse = false;
    request.useCache = false;
    loader.unload();
    loader.unloadAndStop();
    loader = null;
    but no luck, any solutions, suggestions?
    thanks

    I solved problem, swfs that I loading in app have same package names and classes, I changed package names for each swf and everything works fine.
    Main app stores in cash loaded swf-s AS code, I have't found solution how to clean this cash

  • Problem during swf load

    Hello, All.
    We are getting problem while loading our swf in IE6. Loading
    swf results flickering in IE 6. And we have not observed the same
    in IE7/IE8. We tried to change the internet options etc to overcome
    the problem. We are still facing the issue. Could some body point
    out what could be the issue...
    Thanks a lot in advance,
    Prasanna.

    Hi,
    Can you please explain what this flickering is?

  • Problem loading external swf's

    Hi
    I'm creating an application where the user uses the ARROW KEYS to navigate around the menus and SPACEBAR to continue.
    On the first screen is the main menu that launches external swf's. (I have it as an exe)
    When I play the external swfs individually in the Flash Player.......the navigation is perfect and runs smoothly.
    But when I launch the external swf's through the first screen (menu).....the loaded swf becomes very slow/sluggish to react when I hit the ARROW KEYS.
    (eg. have to hit the arrow key 3/4 times before it moves)
    The frame rate in each fla is the exact same.
    I use the levels to launch the external swf..............I have also used the "load into an empty movieclip" and the outcome is still the same.
    I'm using CS5.
    What could be the problem???
    Thanks for your help.

    In the 3 external swfs, I have in each around 10 scenes. In each scene I have 6 frames with a stop() command in each frame.
    On the selected button in each frame I have the following code: (using actionscript2)
    on (keyPress "<Up>") {
         gotoAndStop(3);
    on (keyPress "<Down>") {
         gotoAndStop(1);
    on (keyPress "<Space>") {
         gotoAndStop("scene02", "firstframeLabel");
    This code is consistant through the 10 scenes.
    On the menu swf; I have a menu system that launches the 3 external swf.
    One scene, using 3 frames with a stop() command in each frame.
    On the selected button in each frame I have the following code: (using actionscript2)
    on (keyPress "<Up>") {
         gotoAndStop(3);
    on (keyPress "<Down>") {
         gotoAndStop(1);
    on (keyPress "<Space>") {
        loadMovie ("application01.swf", 30);

  • Problems loading Flex3 swf into AIR app

    This is a challenging problem that I have reduced down to the
    bare minimum and it is still reproduceable. I have built a minimal
    AIR application and added a SWFLoader to it which loads a SWF file
    named "Junk.swf" using an absolute path.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" title="Hello World">
    <mx:Style>
    WindowedApplication {
    background-color:"0x999999";
    background-alpha:"0.5";
    </mx:Style>
    <mx:SWFLoader
    source="C:/myProjectFolder/renderers/Junk.swf" width="100%"
    height="100%" />
    </mx:WindowedApplication>
    This works fine if I run the application from within Flex3,
    however when I build an installer, install the application to my
    windows vista system and execute it from the desktop the Junk.swf
    will not display. If I replace the Junk.swf with another SWF of the
    same name created in Flash CS3 then it will display properly when
    my test app is executed from either Flex or the desktop.
    The contents of the loaded SWF don't appear to be an issue
    since even the simplest of Flex3 SWFs fail to display.
    Interestingly when I add listeners to the SWFLoader to
    determine if any errors are happening no error events are sent, but
    I do receive both the INIT and COMPLETE events which tells me that
    the Junk.swf is found and loaded, just not displayed.
    Any assistance or even ideas that I could try would be
    appreciated.

    that's why i added those comments about the swf's domain.  for locally loaded swfs, use:
    SFMltd wrote:
    Hi Kglad, Thanks for the Example.
    if i run my class with securityDomain = SecurityDomain.currentDomain; then it throws this error: SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property.
    The swf file im trying to load is stored locally so i guess this error makes sense. However if i comment out that line i get the same "cannot access Stage owned by app" error?
    See below for class:
    package  {
      import flash.display.MovieClip;
      import flash.filesystem.File;
      import flash.events.Event;
      import flash.net.FileReference;
      import flash.events.MouseEvent;
      import flash.display.Loader;
      import flash.net.URLRequest;
      import flash.system.LoaderContext;
      import flash.system.ApplicationDomain;
      import flash.system.SecurityDomain;
      public class assetPreview extends MovieClip {
      private var loader:Loader;
      private var mainSWF:MovieClip = new MovieClip();
      public function assetPreview() {
      addEventListener(Event.ADDED_TO_STAGE, initialise);
      public function initialise(e:Event):void
      removeEventListener(Event.ADDED_TO_STAGE, initialise);
      var allowSWF:LoaderContext = new LoaderContext(false,ApplicationDomain.currentDomain);
    // allowSWF.securityDomain = SecurityDomain.currentDomain;
      loader = new Loader();
      loader.load( new URLRequest(settingsXML.pathToSWF),allowSWF);
      loader.contentLoaderInfo.addEventListener(Event.COMPLETE, viewPreview);
      public function viewPreview(e:Event):void
      addChild(mainSWF);
      mainSWF.addChild(loader);

Maybe you are looking for

  • My imac 21" takes ages to load videos and websites. HELP

    i have a imac 21" that i got like 4 months ago and it was running safari and google chrome very fast but now its is very slow it takes ages for it to load a video from youtube or any other place and it takes longer time for it to load a page then it

  • Is the Audigy SE cound card fully compatible with Windows Vista

    Hi, all. Is the Audigy SE sound card fully compatible with Windows Vista? I see conflicting posts about this issue. TIA. -- Bob Website: http://www.Property-Aid.com E-mail: [email protected]?Exchange ideas and investing tools at our Real Estate Maste

  • Creating a multipage PDF that prints 2 booklets side by side?

    Hi I am a designer with NO pre-press experience and I need some help! I am trying to print a booklet that is set at 8.5 x 7 as a 2 up document on 8.5 x14 paper. My problem is that I don't want the booklets to print consecutive pages (right now they w

  • Query Performance and Result Set Query/Sub-Query

    Hi, I have an infoset with as many as <b>15 joins</b> with different ODS and Master Data..<b>The ODS are quite huge with 20 million, 160 million records)...</b>Its taking a lot of time even for a few days and need to get atleast 3 months data in a re

  • JFileChooser....a small problem PLEASE HELP ME

    I have got a problem here. Here I have a JFileChooser, I want to add in a FileFilter, and user could only see some type of file. But as long as I try to get the extension....It wont compile, could any one teach me how to get the extension of a file i