Can a swf file begin executing code before loading completely?

I have a swf file with a preloader on the stage at authoring
time. The preloader centers itself by retrieving the stage
dimensions and calculating the coordinates it needs.
This works everytime in Flash preview, but once I put it
online it only works sometimes, mostly after I refresh the page.
The stage width and height it seems, are considered = 0 when this
happens and so my preloader doesn't position itself correctly.
The only reason I can determine for this error is that when
the code begins to execute the swf is not fully loaded, and thus it
gets wrong stage dimensions. I have exported the swf file to have
100% width and heigth, don't know if there are known issues with
this mode of publishing.
Any help on this matter is appreciated, thanks in
advance.

Hi Tim,
This idea offers some interesting possibilities. (Thank you.)
I'll have play with it to see if I can make it meet our needs.
I'm worried that the caption would be forced inside of the
perimeter of the movie, instead of outside next to the playback
controls.
If there was a way to get the timer to line up with the
playback controls outside of the Captivate 4 movie, that would be
ideal. Here is a
Snapshot
of what we are trying to re-create in CP4.
- Tom -

Similar Messages

  • HT5271 Downloaded latest Apple updates that informed me old versions of Adobe Flash Player were disabled and advised me to go to Adobe and down load latest version of Flash Player. Did that, but Flash Player won't play swf files, which it did before.

    Downloaded latest Safari update that informed me that older versions of Adobe Flash Player were being disabled and then advised me to go to Adobe and down load latest version of Flash Player. Did that, but Flash Player won't play swf files, which it did before. (Instead of opening, it comes up as a page of code).

    Hi..
    Quit Safari.
    Open System Preferences > Flash Player then select the Advanced tab.
    Click:  Delete All
    Now select the Storage tab.
    Click Delete All
    Relaunch Safari to test.
    edited by:  cs

  • My windows 7 machine does not recognise .swf files. I have down loaded the flash player but I think.

    My windows 7 machine does not recognise .swf files. I have down loaded the flash player but I think but it is linked as a plug in with chrome and IE.  How can I get my windows to recognise the .swf files to play them.

    The downloaded file is the projector, not an installer; you need to make the file association manually:
    move the downloaded exe file to a location you can remember, e.g. C:\Windows\SysWOW64\Macromed\Flash
    right-click on a swf file and select Open with > Choose default program
    navigate to the folder you saved the player and select flashplayer_13_sa.exe

  • Can I combine two methods of code to load various SWF files into the same location

    I presently have a set up where a large SWF file brought on the stage by clicking small icons from the scrollable thumbnail menu on the bottom of the stage. All of it happens at the same frame with .xml loading file.
    Here is the code for constructing the ImageLoader(for thumbnails) and SWFLoader for (bigger SWF files)
    [CODE]
       function _xmlCompleteHandler(event:LoaderEvent):void {
       _slides = [];
       var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.
       var imageList:XMLList = xml.image; //In the XML, we have <image /> nodes with all the info we need.
       //loop through each <image /> node and create a Slide object for each.
       for each (var image:XML in imageList) {
        _slides.push( new Slide(image.@name,
              image.@description,
              new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",
                   name:image.@name + "Thumb",
                   width:_THUMB_WIDTH,
                   height:_THUMB_HEIGHT,
                   //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates
                   //x:260, y:320,//doesn't work here but works in line 69
                   scaleMode:"proportionalInside",
                   bgColor:0x000000,
                   estimatedBytes:13000,
                   onFail:_imageFailHandler}),
              new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",
                    name:image.@name + "Image",
                    width:_IMAGE_WIDTH,
                    height:_IMAGE_HEIGHT,
                    //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates
                    x:0, y:144,
                    scaleMode:"proportionalInside",
                    bgColor:0x000000,
                    estimatedBytes:820000,
                    onFail:_imageFailHandler})
    [/CODE]
    Here is what I would like to resolve. I have another section on the site with an image collage. Every image is a button. I want to script this each image on click to go to the label with ImageLoader and SWFLoader AND TO OPEN A UNIQUE SWF (ASSOCIATED WITH AN IMAGE CLICKED) ON THAT PAGE
    Previously this is what I did to achieve it. I would specify a String:
    [CODE]
    var sourceVar_ProductsPopUps:String;
    [/CODE]
    and then all my buttons will have their unique SWF assigned for them which opens at another labeled section ("prdctsPopUps" in this example):
    [CODE]
    function onClickSumix1PopUp(event:MouseEvent):void {
      sourceVar_ProductsPopUps="prdcts_popups/sumix1-popup_tl.swf";
      gotoAndPlay("prdctsPopUps");
    [/CODE]
    Then in the "prdctsPopUps" section I would specify that var string to bring up SWF files. The value of sourceVar_ProductsPopUps allows to load mulitple SWFs from the previous page.
    [CODE]
    loaderProductPopUps = new SWFLoader(sourceVar_ProductsPopUps,
    [/CODE]
    But I need both of them to be working at the same time. First there is a sectionA from where a user can navigate to specifically targeted SWF to section B's SWFLoader. Then in the section B a user has an option to bring up other SWF files into SWFLoader from the scrollable thumbs menu. Is there a way to combine these two lines into one:
    [CODE]
              new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",
    [/CODE]
    and
    [CODE]
    new SWFLoader(sourceVar_ProductsPopUps,
    [/CODE]

    Thanks for looking into my issue.
    Unfortunatelly I am not so advanced in AS and do not complitely understand the logic of the problem. I will try to decribe my set up more precise.
    So, my main flash file is broken into labeled sections on the main time line.
    One of the sections is "Applications" It has an animated collage of images. Each image acts as a button and once clicked brings a user to a section called "ApplicationsPopUps".
    "ApplicationsPopUps" section has small image thumbnails scroll menu at the bottom of the screen and a large SWFLoader in the middle of the screen. User can click on an image in the thumbnails scroll menu and a corresponding SWF file will load in the middle of the screen in SWFLoader. User can click on left/right navigation buttons and preceeding/following SWF file will load in SWFLoader.
    Everything works fine (with your previous help)
    Here is the working code for the ImageLoader and SWFLoader (please let me know if you need additional code on the page):
    function _xmlCompleteHandler(event:LoaderEvent):void {        _slides = [];       var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.        var imageList:XMLList = xml.image; //In the XML, we have  nodes with all the info we need.        //loop through each  node and create a Slide object for each.       for each (var image:XML in imageList) {         _slides.push( new Slide(image.@name,               image.@description,               new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",               {                    name:image.@name + "Thumb",                    width:_THUMB_WIDTH,                    height:_THUMB_HEIGHT,                    //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates                    //x:260, y:320,//doesn't work here but works in line 69                   scaleMode:"proportionalInside",                    bgColor:0x000000,                    estimatedBytes:13000,                    onFail:_imageFailHandler}),                 new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",                   {                     name:image.@name + "Image",                     width:_IMAGE_WIDTH,                     height:_IMAGE_HEIGHT,                     //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates                   x:0, y:144,                     scaleMode:"proportionalInside",                     bgColor:0x000000,                     estimatedBytes:820000,                     onFail:_imageFailHandler}) 
    Thumbnails in the section "ApplicationsPopUps" and images in the image collage in the section "Applications" represent the same photographs. So when a user clicks on one of the images in "Applications" section it would be natural that that image will load in the "ApplicationsPopUps" section. However "ApplicationsPopUps" section presently has a working code (as sampled above) It looks too complex for me and I do not know hot to implement this feature. I do want to keep the functionality of the thumbs image scroller in section "ApplicationsPopUps" as it is now. But I want to add that when a user click on an image from section"Applications" then that particular SWF file will load in SWFLoader in section "ApplicationsPopUps" and then the present functionality can as well be exectuted. Presently it just opens on a first image in xml order.
    P.S. I see that you had a download link in your answer. How did you do it? I could also upload a small sample file with my problem. This way you could see all the set up right away.

  • Can I edit the rpt file & change the datasource before loading the report?

    We are an ISV and our application has a lot of reports.  Our reports use a SQL Server database as the data source and each SQL Server at our customer sites has a different name.
    In our testing we have determined that ReportDocument.Load tries to connect to the SQL Server that is saved in the RPT.  If it can't fine the SQL Server saved in the RPT the load take about 60 seconds while it is waiting for the SQL Server Connection to time out.
    We are using the Visual Studio 2008 version of Crystal Reports.  This did not seem to be a problem with VB6/CR8.5.
    We would like to edit the RPT and change the data source to the appropriate SQL Server before we call ReportDocument.Load.
    Is it possible to edit the rpt file and change the data source before loading the report?
    Or is there some way to tell Crystal not to try connecting to the DB
    during the report.load?
    In our case we will NEVER use the data source that is saved in the RPT, we will always change the data source using ApplyLogOnInfo.
    Thanks

    HI Todd,
    You Can Not edit the report document before ReportDocument.Load() because if you dont load the report then you dont have anything to Edit
    But as far as changing the datasource is concerned you can change that at runtime.
    For changing the datasource following code will help you if both databases have a same schema :
    Code for changing the database
    ConnectionInfo crConnectionInfo = new ConnectionInfo();
    crConnectionInfo.ServerName = "SERVER";
    crConnectionInfo.DatabaseName = "DATABASE";
    crConnectionInfo.UserID = "USERID";
    crConnectionInfo.Password = "PASSWORD";
    // Loop through the ReportObjects in a report and find all the subreports
    foreach(ReportObject crReportObject in crReportDocument.ReportDefinition.ReportObjects)
         // Check the kind of the ReportObject, if it is a subreport
         // proceed. If not skip.
         if(crReportObject.Kind == ReportObjectKind.SubreportObject)
              // Get the SubReport in the form of a ReportDocument
              string sSubreportName = ((SubreportObject)crReportObject).SubreportName;
              ReportDocument crSubReportDocument = crReportDocument.OpenSubreport(sSubreportName);
              // Use a loop to go through all the tables in the main report
              foreach(Table crTable in crSubReportDocument.Database.Tables)
    // Get the TableLogOnInfo from the Table and then set the new
    // ConnectionInfo values.
    TableLogOnInfo crLogOnInfo = crTable.LogOnInfo;
    crLogOnInfo.ConnectionInfo = crConnectionInfo;
    // Apply the TableLogOnInfo
    crTable.ApplyLogOnInfo(crLogOnInfo);
    // Set the location of the database. This value will vary from database to
    // database.
    crTable.Location = "DATABASE.OWNER.TABLENAME" or crTable.Locations;
    The sample for doing this is available on support site.
    Thanks,
    Prasad

  • Playing .swf files in Java code

    How can is run a .swf in Java code. And change the .swf at runtime. I tried Using the JFlashPlayer api. but it does not work properly.
    I have a set of different .swf files. I need to run these files using a next/ previous button .... which changes the .swf files at runtime for the FlashPlayer object.....
    Please provide me guidance.......very urget.....
    you can mail me on [email protected]
    REgards
    gp
    Message was edited by:
    GurujiForAll

    How can is run a .swf in Java code. And change the
    .swf at runtime. I tried Using the JFlashPlayer api.
    but it does not work properly.> Then you should contact the vendor for support which you are entitled too after paying the license fee. Unless of course that "not paying the license fee" is what "does not work properly" actually means.

  • Swf files take too long to load on server:

    Good Morning Everyone,
      I have a problem. I just uploaded a mostly all flash web site (It has one html page, the main one) and the rest of the buttons all load .swf files.  The problem I am having is that when I click on buttons on most of the pages, the screen will go black for about 15-20 seconds before loading it. The visitor would think it was a broken link and leave the site if that happened!!!
      Here is the link to the site:
      http://www.webwizkid.com/breaker boys flash homepage 2.html
      Try clicking on any of the links from that page, especially the History, Stories and Unit Plan pages.
    PS: This site was designed with  Flash MX and ActionScript II
    My web hosting service is IPOWER.com
    I am wondering if this has something to do with Bandwidth?
    Can anyone tell me what the problem could be?
    Hope to hear from someone soon.
    Sincerely,
    Tom

    How large (file size) are the .swfs that you are loading when a button gets clicked?
    During creation of the .swfs, did you test the .swf with the Bandwidth Profiler? it will tell you approx how long it will take to download at various bandwidth (Internet connection speed).
    http://www.communitymx.com/content/article.cfm?cid=C2A44
    to reduce file size, are you optimizig all the content?
    http://help.adobe.com/en_US/flash/cs/using/WSd60f23110762d6b883b18f10cb1fe1af6-7b23a.html# WSd60f23110762d6b883b18f10cb1fe1af6-7b21a
    Best wishes,
    Adninjastrator

  • Execute code before browser close

    Hi.
    I need to execute som code just before the user close the browser window(the session ends) where can i place the code
    Thanks in advance

    All client side events have to be handled on the client side. JavaScript is usually the place to handle client side events. Try searching for JavaScript event handling using your favorite search page.

  • Is there any possiblity to write and execute code before nodes get created in the content?

    Hi,
         I have created a dialog and after clicking OK the data is stored in the content. But I've the following requirement: "After clicking OK button on the dialog and before the data stored into the content, I've to do some action(I want to write some code)". Is it possible? Where can I write the code to perform the action before nodes get created? Let me know the solution. Your comments are welcome.
    Thanks & Regards,
    Arya

    This forum is only for discussions on the forums themselves. You should look in here for the forum corresponding to the Adobe product you are using and post your question there:
    http://forums.adobe.com/index.jspa?view=discussions
    When you do, please don't forget to provide enough information. We not only don't know what program you are talking about, but we don't even know if you are in Mac or Win.

  • Can a SWF file resize in the PDF when user zooms or goes 'full screen'?

    Hi,
    I've got some animation in my Indesign file which I've exported as a SWF and brought back in to InDesign.
    I then create the Interactive PDF. It has a white background, so I select it in Acrobat and got to PROPERTIES and give it a transparent background.
    BUT, when I go full screen or above 75% - the SWF shrinks on page.
    The users of this PDF will need to zoom in, or go full screen. I really need the SWF to be resizing as the user goes full screen, or views it however they choose.
    Is there a way to set the SWF to resize with the PDF?

    Let me guess. You’re using InDesign CS5 and never bothered to install any of the patches.
    Download and install 7.0.4.
    Bob

  • Very urgent..Can a batch file be executed from a button in application?

    HI!
    Please this is very urgent..
    I want to know wheather it is possible to provide a button in an htmldb application,
    that executes a batch(dos .bat file) file from a network location????
    Thanks
    Asit.
    Message was edited by:
    user459887

    It will be possible to do that but I suggest you search the HTML DB Forum first and place your question there rather than in this forum .
    Greg

  • How i can play swf files in ipad2

    Hi There,
    I designed one interactive presentaion in flash...and i want to use it on my ipad2...how can i???....i want it to be as it is....i mean in the vector format too....and the file has actionscript too...how i can manage this....is it possible????
    pls reply asap....
    jimmy

    by googling i understood that but....am not sure if we do so..we will get the exact quality of vector file.....if not what i the next best option....
    pls reply

  • CanI use swf files made w/ Flash 8 that include  FLVPlayBack comp

    I am porting an application from Flash 8 to Flex that
    includes a number of videos (FLV).
    In Flash 8 I am using the FLVPlayBack component to be able to
    include the available skins. In particular the
    MojaveExternalAll.swf.
    I tried to load the swf that inlcudes the FLVPlayBack
    component and the skin, but I only get the video (stopped at the
    first frame and no skin).
    Is there a method to use those skins, or are they equivalent
    video skins in Flex?
    Gilbert

    I am porting an application from Flash 8 to Flex that
    includes a number of videos (FLV).
    In Flash 8 I am using the FLVPlayBack component to be able to
    include the available skins. In particular the
    MojaveExternalAll.swf.
    I tried to load the swf that inlcudes the FLVPlayBack
    component and the skin, but I only get the video (stopped at the
    first frame and no skin).
    Is there a method to use those skins, or are they equivalent
    video skins in Flex?
    Gilbert

  • Swf file with external video not playing properly in Captivate 5

    So I'm trying to create a captivate project using swf file that has code that loads external flv inside of it.
    It all works great when I test it in flash but once I export it and insert it in Captivate the screens don't synchronize.
    The content of the video starts playing as soon as the project starts even though it's not on that video slide and when
    I try to scroll through the project the audio of that video screen doesn't stop.
    Anyone has an idea why this is happening, could it be my code in flash that's affecting it?

    Unfortunately, no. I gave up on the idea of inserting question slides in the middle of videos. That means I no longer have videos distributed across multiple slides, which I assume was causing the problem. Now, I only insert quiz slides AFTER the video slide. Not preferred but that's what I ended up with.
    I have recently upgraded to 7.  I haven't had a chance to see if the issue is fixed in 7.  To be honest I am having many issues getting my courses to play properly on the iPad. I am using all the default functions and quiz slides, but I continue to run into problems.

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

Maybe you are looking for