External SWF disappears after a while

Hello!

I have a preloader to preload a SWf file, everything works fine, except when I run the HTML on any browser, external swf file disappears after 1-2 minutes.

Basically, I put on preloader (swf file), html code and preload external swf.

This is the code:

import flash.geom. *.

import flash.display. *.

var loadurl:String = "external.swf";

var nDepth:Number = 0;

var nWidth:Number = 200;

var nHeight:Number = 20;

var cLoader:MovieClipLoader = new MovieClipLoader();

var oListener:Object = {onLoadInit:onContentLoaded};

var mcLoader:MovieClip = this.createEmptyMovieClip ("Loader_MC", 0);

var mcContent:MovieClip = this.createEmptyMovieClip ("Content_MC", 1);

var cMatrix:Matrix new matrix());

cLoader.addListener (oListener);

txtPercLoad = mcLoader.createTextField ("PercLoad_TXT", nDepth ++, 0, 0, nWidth, nHeight);

mcContent._alpha = 0;

mcContent._lockroot = true;

mcLoader._x = Stage.width/2 - mcLoader._width / 2;

mcLoader._y = Stage.height/2 - mcLoader._height / 2;

txtPercLoad._x = mcLoader._width / 2 - txtPercLoad._width / 2;

txtPercLoad._y = mcLoader._height / 2 - txtPercLoad._height / 2;

cLoader.loadClip (loadurl, mcContent);

_root.onEnterFrame = function()

{

var nBytesLoaded:Number = mcContent.getBytesLoaded ();

var nBytesTotal:Number = mcContent.getBytesTotal ();

var nPercLoaded:Number = Math.round (nBytesLoaded/nBytesTotal * 100);

If (nPercLoaded > 0)

{

SetTextFormat (txtPercLoad, nPercLoaded.toString () + "%");

}

}

int onContentLoaded (Void): Void

{

SetTextFormat (txtPercLoad, '100% ');

cLoader.removeListener (oListener);

Remove _root.onEnterFrame;

delete oListener;

delete cLoader;

_root.onEnterFrame = function()

{

trace (_root + ": onContentLoaded::_root.onEnterFrame");

var nInc:Number = 5;

mcLoader._alpha = nInc;

mcContent._alpha += nInc;

If (mcLoader._alpha < = 100) {mcLoader.removeMovieClip () ;};

}

}

SetTextFormat (txtField:TextField, sText:String) function

{

var txtFmt:TextFormat = new TextFormat();

sText = "Content load" + sText;

txtFmt.font = "Arial";

txtFmt.align = 'center ';

txtFmt.size = 12;

txtFmt.color = 0xff0000;

txtFmt.bold = true;

txtField.selectable = false;

txtField.text = sText;

txtField.setTextFormat (txtFmt);

txtFmt = null;

}

Please let me know what I am doing wrong? Thanks in advance

If you keep an eye on the value of mcContent._alpha, you will see that you will never the second function onEnterFrame, the _alpha property continues to go until it reaches a maximum and then stop negative backwards, which means it is invisible.  I confirmed this with the execution of your code.

I don't know what is the limit.  In Actionscript, when a limit is reached, it is common to move towards the opposite limit - basically a digital loop system.

Tags: Adobe Animate

Similar Questions

  • Text on Notification icons disappears after a while

    As soon as I re - start my PC, if I fly over the pointer in the bottom right Notification icons, their text indicates. After a time, the text appears, only to appear again if I re - start.

    Although this isn't the biggest global problem, I would be happy to get an answer in case it is the symptom of something else.

    Thank you

    David

    Oh sorry, just checked, have you tried:

    taskbar > right click > properties > notification area > customize?

    Is there something that says «restore system icons»

  • Can anyone please tell me how to do the photos appear in the front panel and disappear after a while?

    Try the joint.   The visibility of the image is going to be enabled/disabled by the Boolean value.   Don't know exactly what you are trying to do, but you should be able to adapt to the use of the node property to what you need.

  • How can I reinstall safari on the iphone running ios 8.1.3 5 safari disappeared after the last update

    How can I reinstall safari on the iPhone 5 with ios 8.1.3? Safari disappeared after or while I was doing the update.

    Safari is an integrated application and cannot be deleted, but it can be hidden by setting restriction.  Check settings / general / Restrictions and see if Safari is simply disabled.  If not, then it must be somewhere on your iPhone because it can not be deleted, that is maybe it drew into a folder, so use Spotlight search to look for.

  • Preloader which modifies the external SWF files every 5 seconds

    Hello

    I made a web banner in flash that loads an external swf and another external swf changes after 5 seconds. The banner have a preloader, but the problem becomes when you load the first time. As sovereign wealth funds are not cached in the cache of the browser and yet, time 5 seconds start counting from the preloader, and when the external swf file, shows only 1 second rest and it is replaced by another. There is a way to 'freeze' the time for each external swf until it loads completely?

    The code that loads SWFs every 5 seconds (this code is placed in a layer of action):

    start of the code:

    var intervalId: number;
    var: number = 0;
    var maxCount:Number = 23;
    var duration: number = 0;
    var banners: Array = new Array)
    "abatrade.swf,"
    "bancobrasil.swf,"
    "caparao.swf,"
    "cedro.swf,"
    "cesama.swf,"
    "copasa.swf,"
    "damatta.swf,"
    "emtel.swf,"
    "engedrain.swf,"
    "extel.swf,"
    "feedback.swf,"
    "iti.swf,"
    "intermedium.swf,"
    "magnesita.swf,"
    "maquenge.swf,"
    "maxxdata.swf,"
    "orteng.swf,"
    "paiva.swf,"
    "paraibuna.swf,"
    "paraopeba.swf,"
    "sabesp.swf,"
    "serpro.swf,"
    "soll.swf,"
    'thawte.swf '.
    );

    function executeCallback(param:String) {}
    var duration: number = 5000;
    loadMovie (banners [count], loadmovie_mc);
    loadmovie_mc._x = 0;
    loadmovie_mc._y = 0;

    clearInterval (intervalId);
    if(Count < maxCount) {}
    Count ++;
    intervalId = setInterval (Thi, "executeCallback", duration, banners [count]);
    }
    else {}
    Count = 0;
    intervalId = setInterval (Thi, "executeCallback", duration, banners [count]);
    }
    }

    If (intervalId! = null) {}
    clearInterval (intervalId);
    }

    intervalId = setInterval (Thi, "executeCallback", duration, banners [count]);

    end of the code
    ----------------------------------------

    And the code to the preloader (this code I place in the movieclip that loads external SWF files):

    start of the code:

    {onClipEvent (enterFrame)}
    var gtT:Number = this.getBytesTotal ();
    var gtL:Number = this.getBytesLoaded ();
    var gtP:Number = int ((gtL/gtT) * 100);
    If (TWG > gtL) {}
    This ._alpha = 0;
    _root. Loader._alpha = 100;
    _root. Loader.bar._width = gtP;
    clearInterval (intervalId);
    } else {}
    This ._alpha = 100;
    _root. Loader._alpha = 0;
    intervalId = setInterval (Thi, "executeCallback", duration, banners [count]);
    delete onEnterFrame;
    }
    }

    end of the code

    Note that I tried to freeze the time using a clearInterval does in the second code, but he simply doesn't work...

    Any ideas? Thank you

    Edson

    Here's the correct code kglad send me. Thank you very much!

  • AS2 button table to load external swf files

    Hey everybody.  Someone here recently helped me tremendously with a question I had on the creation of a back button in my flash file, allowing the user to click the button and view the file before swf.  I hope someone can help me make the next button now, too.

    I have a movieclip that loads an external swf files table.  I thought that the next button would be as simple as changing a selection just few things for the previous button.  However, this does not work.  When I try it, the movieclip doesn't even load the swf files.  Here's my AS2 code for my folder.  I have bolded the part at the end is for the previous button.  Does anyone know how to make the back button?

    var currentSwf:Number = 0;
    var swfs:Array = new Array ("EZSmartStand/SmartStand.swf", "EZSmartStand/Warnings.swf", "EZSmartStand/LCDDisplay.swf", "EZSmartStand/Operation.swf", "EZSmartStand/Harness.swf", "EZSmartStand/Transferring.swf", "EZSmartStand/800lbvid.swf", "EZSmartStand/Ambulating.swf", "EZSmartStand/Accessories.swf", "EZSmartStand/HarnessLaundering.swf", "EZSmartStand/ChargingBatteries.swf", "EZSmartStand/EmergencyLowering.swf", "EZSmartStand/EmergencyLowering2.swf");

    var listener: Object = new Object();
    var mcl:MovieClipLoader = new MovieClipLoader();
    mcl.addListener (listener);

    Function to load the film "next".  It uses the current value of currentSwf
    to access the table of sovereign wealth funds, then increments this value.  This version loops
    around at the beginning after the last of them.

    function loadNext (): Void {}
    mcl.loadClip (SWF [currentSwf], theTargetClip_mc);
    currentSwf ++;
    If (currentSwf > = swfs.length) currentSwf = 0;
    }

    When the SWF load, put in place to constantly check its current image
    against the total number of frames, and so those that match, the SWF is done playing.
    If this is the case, then load the following.

    listener.onLoadInit = {function(targ:MovieClip):Void}
    theTargetClip_mc.onEnterFrame = function (): Void {}
    If (this ._currentframe = this ._totalframes) {}
    loadNext();
    delete this.onEnterFrame;
    }
    }
    }

    loadNext();
    function loadNext (): Void {}
    If (currentSwf > = swfs.length) return;
    mcl.loadClip (sovereign wealth funds [currentSwf], theTargetClip_mc);
    currentSwf ++;

    }

    function loadPrevious (): Void {}

    if(currentSwf>1) {}


    currentSwf-= 2;


    loadNext();


    }


    }

    rewind_btn.onRelease = loadPrevious;

    You must change your code so that the value of currentSwf reflects the real current swf being viewed.  It makes it easier to manage in the aspect of thinking.  While I'm not show all your code, here's how I recommend you change functions, by adding one specifically for loading, and change the other just increment/decrement the value currentSwf.

    function loadNext (): Void {}
    currentSwf ++;
    If (currentSwf > = swfs.length) currentSwf = 0;
    loadSWF (currentSwf);
    }

    function loadSWF (nextSWFToLoad) {}
    mcl.loadClip (SWF [nextSWFToLoad], theTargetClip_mc);
    }

    loadSWF (currentSwf);

    function loadPrevious (): Void {}
    -currentSwf;
    if(currentSwf==-1) currentSwf = swfs.length - 1;
    loadSWF (currentSwf);
    }

    rewind_btn.onRelease = loadPrevious;

  • The green arrows front and rear under file and Edition disappeared after I downloaded the new Firefox toolbar. How to recover?

    The green arrows to page forward or backward at the top left under the file and edit disappeared after I downloaded the new toolbar for Firefox (for 3.6) and was replaced by the most visited, getting started and last new icons, which I have little use for. How to bring back the original toolbar?

    If the Navigation toolbar is not be displayed? See below.

    Don't see the menu bar not (File, Edit, View, history, Favorites, tools, help)?
    Turn on/off the menu bar is a new feature in version 3.6.
    (~ ~ Red: Linux and OSX see ~ ~: what happened to the file, edit and view menus? )
    Windows Method 1. Press and hold the key and press the letters of the following in this exact order: V T M then release the key
    Windows method 2 Press the F10 key, while the Menu bar, choose "view > toolbars", click on 'Menu Bar' so that a check mark next to the Menu bar
    Method Windows 3 Press and release the button. The Menu bar is displayed; then choose ~ ~ red: V ~ ~ iew > ~ ~ red: T ~ ~ oolbars and click on ~ ~ Red: M ~ ~ enu Bar as well as a checkbox is placed next to Menu bar
    The menu bar should now be displayed permanently, unless you turn it off again using view > toolbars. Check = not displayed, NO check mark is not displayed.
    See:

    http://support.mozilla.com/en-US/kb/Menu+bar+is+missing
    

    http://KB.mozillazine.org/Toolbar_customization#Restoring_missing_menu_or_other_toolbars
    Navigation, bar toolbar bookmarks and other toolbars under view > toolbars. By clicking on one of them will place a check mark (display) or remove the check mark (not shown).
    To display the status bar, view, and then click status bar to place a check mark (display) or remove the check mark (not shown).
    Mode full screen
    http://KB.mozillazine.org/netbooks#Full_screen

    See also:
    Back and front toolbar buttons or others are missing
    Customize controls, buttons, and Firefox toolbars
    How to customize the toolbar

  • Someone used this on me and after a while windows shell program take completely my computer as well as bank accounts

    I finally understand what has happened to all computers, I threw out and now it's a. Someone used this on me and after a while windows shell program take completely my computer as well as the account numbers of bank accounts and cards and so on. I got it with computers. I have been a dedicated customer of Microsoft and I can't believe that you would put on such a dangerous program that any computer fool can use to people disrupting. I want to know what I can wip this thing by buying a new hard drive and operating system put this program on this subject before I sitgn on the internet and don't have not this thing happen? I would like to send you the hard drive rinse you these people in the open air where I could get my hands on them. This coswt haqs me more than I want to tell you.

    I think that you're wrong in your assessment of what you have been.  "Shell Microsoft Program"?  Please explain.

    If configure you your own computer, software Windows XP firewall is enabled, have a decent router (reset and configured with a password before connecting anything to him) between your network and the Internet, and you have changed all your passwords for each account to a password that is hard (15 characters or more containing at least three of the four character types (: uppercase, lowercase, number, and symbol) and checked that each account online has a configuration password recovery method that * you * have you personally (no one else has used your password they obtained to make sure if you have already changed your password, they could get the upper hand) and you have a decent anti-virus software installed. Then you should be fine.

    You can Disable Remote Desktop (on Windows XP Professional - you left out the details of your operating system in your rant) and Remote Assistance if that makes you more comfortable or you do not use these functions.

    Otherwise - most of it security is common sense stuff.  Do not download or run things do not know the origin of and trust said origin and application.  Do not open unknown emails and instant messages.  If you do not call to get your computer fixed, don't expect sopmeone will call you to fix your computer problem - and if they don't - know it's a scam.  Don't visit questionable websites.  Do not use the computer on a daily basis with a user account that could ruin everything (run as a normal user, not an administrator for your daily activities.)  Keep your system and you have installed - including all antivirus software - up to date/current.  Keep your computer in a locked - room physical security is a top priority.  Backup your important data to external media.  Change your password periodically - because you have a password - most probably someone can get it.  If something is * really * important keep you the 'secret' and protected - encrypt.  Almost every other method can be easily bypassed - encryption, not so much.  Etc and so on...

  • HP Pavilion Touchsmart kept Sound disappears after installation and reinstalling the drivers

    I have a HP Pavilion Touchsmart 14-B132TX Sleekbook. My sound disappeared while I was using it a month ago. I called the HP Hotline and Technical Support told me just uninstall it from the Device Manager and when restarted, automatically installs the driver. What I did.

    The sound came back but still once he disappeared after about 15 minutes of use, so I called tech support again and they gave me links to HP support for drivers to download and install which I did and rebooted the computer and the sound came back again. BUT again, the noise has disappeared. I called tech support and they just do a system restore which I did and the sound came back again. But he disappeared again after all just 7 minutes of use.

    These are the drivers, I installed from the HP Web site: sp60642, sp64082, sp60464 and sp64031. After reinstalling the drivers. I cleaned my laptop with CCleaner and went to HP Support Assistant in the hope of getting a solution, there was a statement here to download the QUALCOMM Atheros driver and I installed again the driver said... The sound has come back after rebooting. AND again, he has disappeared after just using the laptop for about 3 minutes. (it gets worse!.) This laptop is quite new, he just bought 10 months ago. What is going on? Please help me. I use the Windows 8 operating system. PLEASE HELP ME.

    Hello

    Try the following.

    Open windows control panel, open Windows Update, select "View update history" in the left pane and then select "Installed updates" link in the next window.

    Locate the KB2962407 update, right click and choose uninstall.  Once completed, restart the computer, open windows control panel, open Windows Update and select "Check for updates".  You will see the update that you have uninstalled just offered once again - right click and select "Hide update".

    After that you may or may not need to remove and reload the sound driver - if you do, how to use Recovery Manager to reinstall the drivers and software is detailed in the document at the link below.

    Recovery Manager - Windows 8.

    Kind regards

    DP - K

  • How to make the window disappears after minimize instead of becoming the output of the image?

    How to make the window disappears after minimize instead of becoming the output of the image?

    Hi Sam,

    This issue may have caused due to infection by the virus or system files missing or damaged or because of the corruption of the user profiles. I would like to know some information about this problem so that we can help you further.

    1. have you made changes on the computer before this problem?

    2. do you get any error code or error message while starting?

    3. have you checked if the problem occurs on a different user account?

    I would suggest trying the following methods and check if it works for you.

    Method 1:

    Run the Microsoft Safety Scanner and check if there is any threat of viruses found.

    Microsoft safety scanner: http://www.microsoft.com/security/scanner/en-us/default.aspx

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. During these 10 days, it will remove all the files infected by the virus and records. I suggest you create a backup of your data, and then install Microsoft Safety Scanner.

    Method 2:

    Run the System File Checker scan and check if it helps. This will help you to find and replace missing or damaged system files.

    See the following article from Microsoft Support to run the System File Checker.

    http://support.Microsoft.com/kb/929833/en-us

    Method 3:

    If you have not checked if the problem occurs on a different user account are not, then try again to create a new user account and check if the problem persists. This is to check if the problem is caused due to the corruption of user profiles or not.

    See the following article from Microsoft Help to create a new user account.

    http://Windows.Microsoft.com/en-us/Windows/create-user-account#create-user-account=Windows-7

    If the problem does not persist in the new user account, then try the steps in the following article from Microsoft Help to fix the damaged user profile.

    http://Windows.Microsoft.com/en-us/Windows/fix-corrupted-user-profile#1TC=Windows-7

    Please reply with the status of the issue so that we can better help you.

  • External HD disappeared from my library catalogue

    My two external hard drive disappeared from my library edition in LR.  I looked at my last backup and near 13 000 images are in a single file.  How can I return all photos in LR with their dates to work with them even once?  I think I could have happen because I worked in two external HD?  I did it for a while and this is the first time I've had this happen. Ouch.  Appreciate any suggestions.

    Please show us a screenshot of what you see in Lightroom where the external HD "extirpated" should appear.

    In addition, it may be that you accidentally opened the wrong catalog. Browse to the file-> open the new item and select each illustrated catalog, they seem the external HDs 'disappeared '?

  • I currently store my pictures on and an external hard drive.  Lightroom 6 was not able to find the picture momentarily files.  I inserted an external Flash DRIVE after removing the hard drive and the computer renamed the stick with the same drive letter t

    Redesign existing external hard disks and still 6 Lightroom able to find existing photos.

    I currently store my pictures on and an external hard drive.  Lightroom 6 was not able to find the picture momentarily files.  I inserted an external Flash DRIVE after removing the hard drive and the computer renamed the stick with the same drive letter that has been designated by Lightroom to store my photos.  I could go into my Windows 10 and reset the player to the letter that Lightroom has given at the beginning of the external hard drive.   However, I know this can happen again, if I connect any stick USD or another device, while the external hard drive is not connected to my laptop.   I found the information that I can do the new designation of the final drive by choosing a letter it is 1/2 way or higher in the alphabet.   I would like to turn an external hard drive on a strong letter, warns we hope this previous problem.   My question is, if I already have a lot of pictures on this external hardrive with the designation of the current drive, how it becomes a higher letter and have 6 Lightroom recognizes files, now under the new designation of drive letter without having to go to each photo individually and manually force Lightroom 6 find each photo.  It would take more time than I'd like to lose.  Is there a way to get just 6 Lightroom to recognize the new disk designation has changed and is able to find all of the existing files?

    I have read the ADOBE LightRoom 6 manual and seem not to be able to find anything on how to do it.

    Any help would be welcome.

    Thank you!

    So in Windows, you can select a drive like q letter (or any other letter you want only towards the end of the alphabet)

    Then in Lightroom, you can reconnect to the photos on q: the following instructions (see specifically 4 Figure and related text)

    Adobe Lightroom - find moved or missing folders and files

  • How can I unload external SWF?

    I use the following code to load an external SWF file. I want to unload the SWF (Clock.swf) after 10 seconds (automatically). How can I? I use greensock class.

    import com.greensock;

    com.greensock.easing import. *;

    com.greensock.plugins import. *;

    import com.greensock.events.LoaderEvent;

    var mySwf1:SWFLoader = new SWFLoader ("Objects/Clock.swf", {height: 200, width: 200, onComplete:completeHandler1, container: ClockContainer});

    mySwf1.load ();

    function completeHandler1(event:LoaderEvent):void {}

    TweenLite.to (event.target.content, 0, {alpha: 0});

    TweenMax.fromTo (event.target.content, 3, {x: 0, y: 0, width: 200, height: 200, alpha:. 1}, {x: 0, y: 0, width: 200, height: 200, alpha: 1, delay: 5.});

    }

    Download:

    mySwf1.dispose (true);

    Unload after 10 seconds:

    setTimeout (function () {mySwf1.dispose (true)}; 10000);

  • Problem with loading external swf files

    Hello

    I am currently working on a project which is an interactive and dynamic elemtry school presentation to the Denmark. I finished my project and it works perfectly, but only locally on my computer.

    The final draft should be implemented on the site and public work. I tried to implement the project on the site and unfortunately, it does not work as expected.

    When all the files where transferred to the ftp server, only a single files are responding and appear correctly.

    Interactivity of the project is based on a structure of Action script, which is based on the smooth transition between swf files (load another swf file after the action is triggered by clicking on a button) do any work.

    After days of trying to figure out the solution, I'm totally lost. One thing is to publish the project so that all action script will work and answer between swf files, and the other thing is to make it user-friendly for the Android and apple products.

    The presentation is quite heavy because of its loading external swf content files, which are images and movies.

    I really hope you can help me with my problem. I will gladly share the files and codes if it would help solve the problem.

    Best regards

    Agata

    It could be a problem of location of file from loading.  When you place a swf file in an HTML base for targeting anything that the SWF load becomes the folder of the html page.  You may need to adjust the target so that the target of swf files, load it as if it were in the same folder as the html page.

  • AS3 external swf close self

    Hello

    After looking through the forums online and video tutorials...

    I am always facing errors of loading an external swf into my main swf (full step width).

    In my main.swf... i have several scenes.

    On one of these scenes, I have an external SWF that loads my main.swf step size.

    Which works very well...

    BUT

    I now want to close the external swf on a button (in my external swf) and to return to one of my scenes in my hand. SWF

    I read many forums that talk about dispatchEvent

    I tried these methods and I am still facing errors.

    I want just one button on my external.swf that is farm/unloads/deletes itself... so that the user can continue by HAND. SWF after that they played OUTSIDE. SWF.

    in actionscript 2, it was a breeze.

    in as3, it's a useless pain in my rectum

    Sorry if I've missed a lot

    any help would be appreciated

    jayquery

    Try to change the code of loader main file for more like the following (blue nine):

    var defaultSWF:URLRequest = new URLRequest ("gametestG.swf");

    var loader: Loader = new Loader();
    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, loaderCompleteHandler);
    Loader.Load (defaultSWF);

    function loaderCompleteHandler(evt:Event):void {}
    MovieClip (evt.target.content) .addEventListener ("closeChild", onChildClose);
    addChild (loader);
    }

    function onChildClose(event:Event):void {}
    loader.unloadAndStop ();
    removeChild (loader);
    }

Maybe you are looking for