External SWF rate

I am using loadMovieNum to place an external swf on the stage. it is unloaded via an on (release). another button loads the external swf again. when it is reloaded a second time the external swf seems to play faster. the external swf has the following script. both swfs are at 12 fps. any help would be appreciated.
import mx.transitions.Tween;
import mx.transitions.easing.Strong;
this.createEmptyMovieClip("container2_mc",this.getNextHighestDepth());
container2_mc._x = 216;
container2_mc._y = 72;
this.createEmptyMovieClip("container1_mc",this.getNextHighestDepth());
container1_mc._x = 216;
container1_mc._y = 72;
this.attachMovie("loader","loader_mc",this.getNextHighestDepth());
loader_mc._x = 342;
loader_mc._y = 243;
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
myListener.onLoadProgress = function(target,bytesLoaded,bytesTotal) {
loader_mc._alpha = 100;
var pct = Math.round(bytesLoaded/bytesTotal*100)
loader_mc.bar_mc._xscale = pct;
myListener.onLoadComplete = function(target) {
loader_mc._alpha = 0;
fadeIn();
buttons_mc.attachMovie("prev","prev_mc",buttons_mc.getNextHighestDepth());
buttons_mc.attachMovie("next","next_mc",buttons_mc.getNextHighestDepth());
buttons_mc.next_mc._x = 684;
buttons_mc.next_mc._y = 243;
buttons_mc.prev_mc._x = 0;
buttons_mc.prev_mc._y = 243;
var numPics:Number = 7;
var picArray:Array = new Array();
var currentElement:Number = 0;
var currentContainer:MovieClip = container1_mc;
for (i=0;i < numPics;i++) {
var location:String = "images/main/main_0" + (i+1) + ".jpg";
picArray.push(location);
myMCL.loadClip(picArray[currentElement],container1_mc);
buttons_mc.next_mc.onRelease = function() {
nextPicture();
clearInterval(myInterval);
myInterval = setInterval(nextPicture,10000);
function nextPicture()
if (currentContainer == container1_mc) {
  currentContainer = container2_mc;
else
  currentContainer = container1_mc;
currentContainer._alpha = 0;
container1_mc.swapDepths(container2_mc);
if (currentElement < picArray.length-1){
currentElement++;
else
  currentElement = 0;
myMCL.loadClip(picArray[currentElement],currentContainer);
buttons_mc.prev_mc.onRelease = function() {
if (currentContainer == container1_mc) {
  currentContainer = container2_mc;
else
  currentContainer = container1_mc;
currentContainer._alpha = 0;
container1_mc.swapDepths(container2_mc);
if (currentElement > 0){
  currentElement--;
else
  currentElement = picArray.length-1;
myMCL.loadClip(picArray[currentElement],currentContainer);
clearInterval(myInterval);
myInterval = setInterval(nextPicture,10000);
function fadeIn() {
new Tween(currentContainer,"_alpha",Strong.easeOut,0,100,48,false);
//--------------setInterval--------//
myInterval = setInterval(nextPicture,10000);

Not sure if this is the best method but it seems to work:
In external SWF       _global.myInterval = setInterval(nextPicture,8000);
In main SWF when called to reload external SWF      clearInterval(_global.myInterval);
                                                                              loadMovieNum("main_interval.swf",1);
If there is a better method any direction would be appreciated and thanks much for the input.

Similar Messages

  • Loading an external .swf into an empty container

    I'm loading an external .swf into an empty container.
    Everything seems to work fine except when the .swf is loaded both
    seems to be running extremely sluggish. The button rollovers are
    slow, the page transitions..everything. I can't figure out why it
    is doing this. Both .fla's have the same frame rate. Is there some
    known reason why this might happen?

    well, we've tried that and it is actually a little bit worse.
    Normally i test everything in a browser window anyway. I'm thinking
    it might be a naming issue of some variable or something that is
    the same for both fla's....not sure yet though.

  • What happens when the Main Flash is 25 fps and an external SWF file is 12 fps?

    Hello everyone,
    I have a Main Flash which is set to 25 fps. This Flash is
    used to load an external swf file which was created using 12 fps. I
    would like to know what really happens when the Main Flash loads
    the external swf file? Does the Main file forces the external file
    to be run on 25 fps or the swf file is run with its own 12 fps?
    Any ways, if someone can take the time and explain this, I
    would be greatful.
    Thank you very much and have a great day.
    Khoramdin

    the external swf plays at 25fps - all loaded movies will take
    on the frame rate of the parent movie.
    Chris Georgenes
    Adobe Community Expert
    mudbubble.com
    keyframer.com
    http://tinyurl.com/2urlka
    Khoramdin wrote:
    > Hello everyone,
    >
    > I have a Main Flash which is set to 25 fps. This Flash
    is used to load an
    > external swf file which was created using 12 fps. I
    would like to know what
    > really happens when the Main Flash loads the external
    swf file? Does the Main
    > file forces the external file to be run on 25 fps or the
    swf file is run with
    > its own 12 fps?
    >
    > Any ways, if someone can take the time and explain this,
    I would be greatful.
    >
    > Thank you very much and have a great day.
    >
    > Khoramdin
    >

  • External SWF layer problem

    I can only guess if its a layer / stacking problem or not, but I have a main fla file that loads three external SWF's, all ontop of each other, three buttons for each movie, that designate that movie is the visible one playing.
    It's basically a portfolio site.  You can see the site here
    www.tvnstudios.com/loadvis.html
    Why aren't the movies playing smoothly?  The FPS rate is the same for all three of the external SWF's and for the main fla that is loading them.
    Can anyone help? 
    I'd be so grateful!
    Thanks,
    -T
    p.s.  I'm including the fla file that has the actionscript that loads the movies.  It's a small code, but maybe the error is in there somewhere...

    If you are loading all of the files and they are all playing at the same time, that could be the problem.  Invisible files still eat up their share of the processor if they are left in a playing mode.
    I am unable to determine there is any slowness, primarily due to not knowing what the first one is supposed to be doing and the others appear to be flip book implementations that work fine as long as they are only the couple of pages I can see.

  • Loading External swf's

    I have created buttons with this Actionscript.  They load in the external swf's fine, but when I click on them again they load them in again, and again, and again...  What do I need to write in the code so it loads in fresh everytime you click on the button? (or in other words, cleans up the load in page before it loads in new files). 
    var myLoader:Loader=new Loader();
    rates_btn.addEventListener(MouseEvent.CLICK, rates);
    function rates(myevent:MouseEvent):void {
    var myURL:URLRequest=new URLRequest("fooshrates.swf");
    myLoader.load(myURL);
    myLoader.x = 15
    myLoader.y = 15
    addChild(myLoader);
    contact_btn.addEventListener(MouseEvent.CLICK, contact);
    function contact(myevent:MouseEvent):void {
    var myURL:URLRequest=new URLRequest("contact.swf");
    myLoader.load(myURL);
    myLoader.x = 15
    myLoader.y = 15
    addChild(myLoader);
    testimony_btn.addEventListener(MouseEvent.CLICK, testimony);
    function testimony(myevent:MouseEvent):void {
    var myURL:URLRequest=new URLRequest("fooText.swf");
    myLoader.load(myURL);
    myLoader.x = 535
    myLoader.y = 0
    addChild(myLoader);

    if you're publishing for fp 10, use unloadAndStop() after the first load.

  • Playback speed of external swf

    hi all,
    i have created on player like interface in which i play some
    external swf files one by one like (windows media player)
    i used loadmovie method to load the swf file.
    i have list of recorded swf files. if i play them in flash
    player one by one then they play with normal speed.
    but if i play it in my own player interface using loadmovie
    method, it plays very fast.
    why this is so? please help

    Hey there,
    I think you will find that all sub movies take the frame rate
    of the Main movie, you will need to add more frames into your
    submovies. There maybe another way but I'm not aware of it
    unfortunately...

  • 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);

  • External swf plays to fast

    I am fairly new to using Actionscript and am having trouble
    figuring out what I need to do. I have a main document that calls
    modular .swf movies that I have set up. After I have audio play it
    loads up a .swf with a powerpoint that I converted to flash. When I
    play it in my main document it plays way to fast. I've tried
    "document.frameRate = 0.3" in the powerpoint flash, but that
    doesn't work. I need someone to point me in the right direction
    please.

    Your main loader swf ( the one you are loading all other
    external swf's into) controls the frame rate of all "Child" swf's.
    So, if you are loading a swf that runs great at 25 frames a sencond
    into one that is set to 50 frames a second, if will run twice as
    fast.
    IM assuming here that you are loading one into another. IF
    this is not the case and are loading single swf's into a basic html
    page, then you need to look at the expert settings in the PP
    application. Im pretty sure that once you have set the frame rate
    within the swf, there is nothing you can do externaly to control
    the rate.
    I would be interested myself if there is a way but Im pretty
    sure theres not.

  • 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.

  • Unable to load external swf which has runtime sharing with another swf.

    Hi,
    I am getting issues on loading external swf say "importer.swf" file into another swf file say "loader.swf" for second time like
    ReferenceError: Error #1065: Variable testSymbol is not defined. VerifyError: Error #1014: Class testClass could not be found.
    at global$init()
    In the external swf "importer.swf", i am trying to import the symbol "testSymbol" from another swf file say "exporter.swf", which exports through runtime sharing option for the symbols.
    I am having some buttons in loader.swf file and on each button click i am loading different swf files into the loader.swf after unloading the previous one.
    I am able to load and unload different swf files but unable to load the importer.swf file which is sharing symbols from external swf and that too for the second time i.e., when i click the button twice.
    When trying to debug with flash debugger, all the other swf files are being unloaded before loading of another swf but the swf which is sharing symbols/classes with another swf is not getting unloaded.
    Output when i am trying to load two files example and importer files into loader.swf file on two different button clicks. On first button click example.swf is loaded. On second button click , example.swf is unloaded and importer.swf is loaded which is successful. On first button click again importer.swf is unloaded and example.swf is loaded. On second button click again, example.swf is unloaded and importer.swf is loaded, here i am getting issues shown above.
    Attemping to launch and connect to Player using URL D:\runtime issue\loader.swf
    [SWF] D:\runtime issue\ loader.swf - 8181 bytes after decompression
    [SWF] D:\runtime issue\example.swf - 441708 bytes after decompression
    [UnloadSWF] D:\runtime issue\example.swf
    [SWF] D:\runtime issue\importer.swf - 1920 bytes after decompression
    [SWF] D:\runtime issue\importer.swf - 441708 bytes after decompression
    [SWF] D:\runtime issue\ example.swf - 441708 bytes after decompression
    [UnloadSWF] D:\runtime issue\ example.swf
    [SWF] D:\runtime issue\importer.swf - 1920 bytes after decompression
    ReferenceError: Error #1065: Variable xxxxxx is not defined.
    Debug session terminated.
    Code i am using
    b1.addEventListener(MouseEvent.CLICK, b1Clicked);
    b2.addEventListener(MouseEvent.CLICK, b2Clicked);
    var ldr:Loader;
    function b2Clicked(e:MouseEvent)
        if(ldr != null)
            ldr.unloadAndStop(true);
        ldr = new Loader();
        ldr.load(new URLRequest("importer.swf"));
        addChild(ldr);
    function b1Clicked(e:MouseEvent)
        if(ldr != null)
            ldr.unloadAndStop(true);
        ldr = new Loader();
        ldr.load(new URLRequest("example.swf"));
        addChild(ldr);
    If i try to open the swf using IE, i am not getting any issues at all. But i need to open this loader.swf in a air application. Also when i use loaderContext for the loader instance i am able to get rid of this issue but i cant use it in my application.
    So, please help me in resolving this issue.
    Thanks

    I got my answer. I had to append the photo url to the 'movie' value of the javascript embed method. Like this:
    <script language="JavaScript" type="text/javascript">
       AC_FL_RunContent(
          'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
          'width', '550',
          'height', '400',
          'src', 'lesson2',
          'quality', 'high',
          'pluginspage', 'http://www.adobe.com/go/getflashplayer',
          'align', 'middle',
          'play', 'true',
          'loop', 'true',
          'scale', 'showall',
          'wmode', 'window',
          'devicefont', 'false',
          'id', 'lesson2',
          'bgcolor', '#ffffff',
          'name', 'lesson2',
          'menu', 'true',
          'allowFullScreen', 'false',
          'allowScriptAccess','always',
          'movie', 'lesson2?photo=http://www.flash-mx.com/images/image1.jpg',
          'salign', ''
          ); //end AC code
    </script>
    Thanks,
    srb.

  • How can I get a preloader to launch a main (external) swf file, and have the main file remove the preloader once it's fully loaded?

    Using Flash MX, ActionScript 2:
    I’ve been struggling for several weeks, trying to get a preloader to work on a large (~80 MB) photo portfolio file (using the method where the preloader is on frame 1 of the file, and when loading is completed, it jumps to the content).  I’ve done countless tutorials, and none seem to work on my presentation.  I even tried downloading a trial version of CS4 so I could export every one of the file’s library movie clips and images so that they load on Frame 2 (a feature MX doesn’t have).  It takes about 20 seconds for the .exe to load from a CD, and no matter which preloader construction I use, it always seems to appear in the last few seconds before the movie loads completely.  During the initial wait time, there’s no indication that anything is happening:  no hourglass on the mouse, and not even a blank screen. This is only true for the first time that the file is loaded from the CD; on subsequent loads, the file must already be in RAM, because it loads within a few seconds. 
    I decided that I’m going to try and make the file which the user clicks on (one named Windows_Portfolio.exe or another called Mac_Portfolio.hqx) the preloader so that it would be tiny, and would load instantly.  I want that file to launch the external huge portfolio file (renamed files.swf), keep track of its loading progress, and cycle through a slideshow (10 thumbnail images that transition into each other over 100 frames) proportionally, based upon the percentage of files.swf that had been loaded.
    I assume that there should be a loadMovie() or a loadMovieNum() command on the preloader’s timeline to launch files.swf, and that the initial code of files.swf should have some sort of this._parent._visible=false or other way of deleting the preloader on level0.  Can anyone explain the steps to me, or direct me to a good Flash MX tutorial that explains how to launch another external swf from a preloader .exe, keep track of its load progress, and delete the preloader .exe once the external swf had been loaded?
    Also, I’ve read that, using this construction on a CD, every file has to be in the same place, and that I can’t nest files.swf in a folder named “files,” and reference it with files/files.swf.  Is this true?
    Thanks for any assistance you can offer.

    If you know JavaScript (ECMA Script) then you might be able to get it done applying a for loop and a random function
    to the for loop if you know how to get a page-loaded request into JavaScript.
    But an easier solution, if you know ActionScript 3.0, and if your SWF's don't need to be recoded and can load into a "container" SWF would be to create a master FLA file that loads your SWF's in a random fashion using Math.random() as a multiplier, though you won't see much variation if you only have 2-3 SWF's to load--if you had more than that then you would begin to benefit from the random function's capabilities.  In ActionScript 3.0 use the load() method along with addChild() to load the SWF and add it to the stage.  You will be able to search for specifics on how to code the FLA properly by using Flash's Adobe Help tool and also using an internet search.
    -markerline
    P.S. Once you have the master FLA coded you can Publish it to an SWF and an HTML and if the container/master SWF needs to be in a page with other content you can simply copy and paste the object and embed tags for the container SWF from the published HTML into any place on your master HTML that you need it to reside.  You can then use CSS to control placement of the SWF object if it is in a div tag.

  • 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

  • How to load and unload more than one external swf files in different frames?

    I do not have much experience on Adobe Flash or Action Script 3, but I know the basics.
    I am Arabic language teacher, and I design an application to teach Arabic, I just would like to learn how to load and unload more than one external swf files in different frames.
    Thanks

    Look into using the Loader class to load the swf files.  If you want to have it happen in different frames then you can put the code into the different frames.

  • How to control timeline sound of external SWF

    Hi All,
    Basic Intro:
    I am new in Action Script and trying to create a video tutorial framwork. In this I have lots of animated SWF files in all the files I have multiple scenes as those are 5min. to 10 min. each and all the files have the relevent background and nurration voice place directly on the TIMELINE frame by frame to match lip syncing animated chreactors.
    My file structure :
    Login.swf with login box is embedded into the Index.html
    After logged in it will load another SWF which is Control panel.swf
    3. Controlpanel.swf has the controls to control the loaded external swf files i.e.: Chapter menu, Play, pause, replay, volume-bar, next and previous buttons.
    By Default Controlpanel.swf will open chapter1.swf as soon as user logged in so no one need to open 1st file.
    Here user can navigate to other chapter swf file through Chapter menu or Next and Previous buttons.
    All files are loading and playing properly, here I am trying to control the animation and Sound both at a same time with Pause, Play and Replay through relevant buttons.
    Problem:
    By pressing “Pause button” animation stops but not the sound. Sound remains playing, and if I replay the swf by “Replay button” than animation restarts but sound also restarts that overlaps already playing audio.
    Question: So could anybody help me finding out how to:
    1. Pause the sound with animation by the same click of Pause button, and
    2. Stop the sound with animation by the same click of Stop button, and
    3. On replay it should stop playing the previously running audio and restart it with the animation like fresh loaded file, it should not sound overlapping.
    Constraints:
    Here I am using the sound file on the same time line of each individual swf file which I cannot add into any single movie clip because all the chapter swf file are having multiple scenes in it.
    For my problem I have already done a lot of browsing online in various forums and didn't find the solution. So here I am sharing the complete information regarding the project and wishing to get some good solution out here but if I missed any helpful information please ask me anytime and please help me to quickly find out the solution.
    Thanks a lot to all of you in advance to help me.

    create one global sound variable
    you can write when you are pressing pause button
    globalsoundvariable.setVolume(0)
    to play
    globalsoundvariable.setVolume(100)

  • AS3: How to access and control embedded sounds in an external swf?

    I rarely use sounds in AS3/Flash. I am using Flash Pro CS6, but I can't seem to figure out how to access, control (play, stop, etc) sounds embedded in an external SWF loaded into the main SWF.
    It's easy to control them when embedded on the main swf. However, on an externally loaded SWR, I get all kinds of errors. For this app, I really need to embed them in the external SWF.
    I read several solutions, but none seem to work.
    I embed the sound an mp3 file called soundSegment1.mp3 using Flash CS6 import tool and then open the actionscript properties panel on flash to select the class name: SoundSegment1. Then I edit the class code and create a file called SoundSegment1.as and it's saved right next to my document class main.as in the same directory. The code of the SoundSegment1 class looks like this:
    package  {
        import flash.media.*;
        public class SoundSegment1 extends Sound
            public function SoundSegment1 ()
                // no code in here
            public function playSound()
                var soundSegment1:Sound = new SoundSegment1();
                var channel:SoundChannel = soundSegment1.play();
    Then, in my main.as, I have done several attempts to play this sound such as:
    var fileLocation:URLRequest = new URLRequest(SWFToLoad); loader.load(fileLocation); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeListener); loader.contentLoaderInfo.addEventListener(Event.INIT, initListener); 
    function initListener(e:Event):void // I also placed this code on the completeListener and it didn't work {      loader.content.soundSegment1.playSound(); // doesn't work.  }
    I get:
    Line XXX 1061: Call to a possibly undefined method playSound through a reference with static type flash.display:DisplayObject.
    or, I also read that I should be able to do something like this anywhere in the Main.as file:
    var theClass:Class = Class(loader.content.getDefinitionByName("SoundSegment1")); var theSound:theClass = new theClass(); theSound.play()  //doesn't work either.
    I also tried on the completeListener:
    var TheClass:Class = e.target.applicationDomain.getDefinition("SoundSegment1") as Class; var theSound:TheClass = new TheClass();
    theSound.play()  //doesn't work either.
    I get:
    ReferenceError: Error #1065: Variable SoundSegment1 is not defined. at flash.system::ApplicationDomain/getDefinition()
    I am stuck and I really need to get this to work. I would be genuinely grateful for your help.
    Thank you in advance for any help provided. I really need to get it to work, because I can't simply embed them in the main SWF or load them individually externally one by one.
    Thanks again!

    THANK YOU!
    I think your code may be over my head though. I think you are using an anonymous function which is not something I am familiar with (but I want to learn about if it's useful).
    I also don't know where the classS came from. I see that it's a parameter sent along with the event, but I don't really see where that came from.
    Someone at: http://www.kirupa.com/forum/showthread.php?305098-Playing-a-embedded-sound-in-an-external- swf&p=2658098#post2658098
    Is showing what seems to be an easier solution, but my problem there is I can't access the source file of the "child" swf....  ayayay.....
    I am going to tinker with your solution and see if it gets me anywhere. Thanks so much for your help again.

Maybe you are looking for

  • Date format in OBIEE 10g Calender Control

    Once date selected in Calender, it is taking Date-Time format automatically. i.e when we select 20/01/2013 in calender and select GO button, then it takes '20/01/2013 00:00:00'. How can we change from Date-Time format to Date format only. Best regard

  • IPhoto synching to iphone no longer works

    I upgraded to IOS5 and the new iPhoto update but now my phone does not synch to iPhoto. Does it have something to do with iCloud?  1.  My iCloud is not activated because the Apple ID in iCloud is wrong.  Instead they have an email alias in there but

  • Firefox history tab not working.

    My problem is with Firefox history tab, after the last system restore, it simply won't work. i mean after heavy browsing, it still show blank in the history tab. I usually perform Backup and Restore of my PC. I used Moz Backup 1.5.1 to restore my las

  • Repository configuation failed while installing grid control 11.2.0.1

    Hi, I am installing oracle grid control 11.2.0.1 on linux.but at the installing the componets i.e repository configuration got failed. can anybody suggest me for the same.... [oracle@rac1 gc]$ ./runInstaller Starting Oracle Universal Installer... Che

  • OCA_Abuse exception 6402 while promoting the job, Bobj

    Hi Guys, I am facing below issue while promoting Webi reports from PRD to QA. Below is the error i am facing. The server supplied the following details: OCA_Abuse exception 6402 at [.\osca_fs_impl.cpp : 431]  46405 {D:\Apps\BOQ\SAP BusinessObjects En