Problem with loading new movie.

Hallo!
I like to play external preloader before it's load original movie index.swf.
But I have a problem on resizing index movie.
Sample files on link http://www.uusrand.eu/galerii/proov/Sample.zip
Thanks
Here is preload AS3 code:
package
    import flash.display.*
    import flash.display.MovieClip;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.net.navigateToURL;
    import flash.net.URLVariables;
    import flash.events.*;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.display.StageScaleMode;
    import flash.display.StageAlign;
    import flash.display.Sprite;
    public class Preload extends MovieClip
        private var LOADED_CONTENT:Loader = new Loader();
        public function Preload()
            LOADED_CONTENT.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, INDEX_LOADING);
            LOADED_CONTENT.contentLoaderInfo.addEventListener(Event.COMPLETE, INDEX_LOAD_COMPLETE);
            LOADED_CONTENT.load(new URLRequest("index.swf"));
        private function INDEX_LOADING(e:ProgressEvent):void
            mc1.text = int(e.bytesLoaded  / e.bytesTotal * 100) + "%";
        private function INDEX_LOAD_COMPLETE(e:Event):void
            LOADED_CONTENT.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, INDEX_LOADING);
            LOADED_CONTENT.contentLoaderInfo.removeEventListener(Event.COMPLETE, INDEX_LOAD_COMPLETE);
            removeChildAt(0);
            addChild(LOADED_CONTENT);
And here is index AS3 code:
package
    import flash.display.*
    import flash.display.MovieClip;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.net.navigateToURL;
    import flash.net.URLVariables;
    import flash.events.*;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import fl.motion.easing.*;
    import flash.display.StageScaleMode;
    import flash.display.StageAlign;
    import flash.display.Sprite;
    public class Index extends MovieClip
        public static var SCREEN_SIZE_W:Number;
        public static var SCREEN_SIZE_H:Number;
        public function Index()
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            STAGE_RESIZE(null);
            stage.addEventListener(Event.RESIZE, STAGE_RESIZE);
            stage.dispatchEvent(new Event(Event.RESIZE));
        private function STAGE_RESIZE(e:Event):void
            if (stage.stageWidth < 500)
                SCREEN_SIZE_W = 500;
            else
                SCREEN_SIZE_W = stage.stageWidth;
            if (stage.stageHeight < 400)
                SCREEN_SIZE_H = 400;
            else
                SCREEN_SIZE_H = stage.stageHeight;
            mc2.width = SCREEN_SIZE_W - 100;
            mc2.height = SCREEN_SIZE_H - 100;
            mc2.x = SCREEN_SIZE_W / 2;
            mc2.y = SCREEN_SIZE_H;

Thanks. I don't know is this correct sollution, but this works.
Here is my change:
package
    import flash.display.*
    import flash.display.MovieClip;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.net.navigateToURL;
    import flash.net.URLVariables;
    import flash.events.*;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import fl.motion.easing.*;
    import flash.display.StageScaleMode;
    import flash.display.StageAlign;
    import flash.display.Sprite;
    public class Index extends MovieClip
        public static var SCREEN_SIZE_W:Number;
        public static var SCREEN_SIZE_H:Number;
        public function Index()
            stop();
            addEventListener(Event.ADDED_TO_STAGE, INDEX_ADDED_TO_STAGE);
        public function INDEX_ADDED_TO_STAGE(e:Event):void
            play();
            INDEX_ON();
            removeEventListener(Event.ADDED_TO_STAGE, INDEX_ADDED_TO_STAGE);
        private function INDEX_ON():void
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            stage.addEventListener(Event.RESIZE, STAGE_RESIZE);
            STAGE_RESIZE(null);
        private function STAGE_RESIZE(e:Event):void
            if (stage.stageWidth < 500)
                SCREEN_SIZE_W = 500;
            else
                SCREEN_SIZE_W = stage.stageWidth;
            if (stage.stageHeight < 400)
                SCREEN_SIZE_H = 400;
            else
                SCREEN_SIZE_H = stage.stageHeight;
            mc2.width = SCREEN_SIZE_W - 100;
            mc2.height = SCREEN_SIZE_H - 100;
            mc2.x = SCREEN_SIZE_W / 2;
            mc2.y = SCREEN_SIZE_H;

Similar Messages

  • Is anyone else having problems with the new software update for macbook? I get random clicking and flicker an movement of the pointer!

    Is anyone else having problems with the new software update for macbook? I get random clicking and flicker an movement of the pointer!

    OS X 10.7 Lion, 10.8 Mountain Lion & 10.9 Mavericks
    Reset Password starting from Recovery HD
    Start the computer,then press and hold down command and R keys to start into recovery partition.
    When you see the Apple logo, release the keys.
    Wait until  OS X Utilities window shows up.
    Move the mouse to the menubar at the top and click "Utilities", then select "Terminal"
    from the drop down.
    Terminal window will appear.
    Type in   resetpassword   and press enter on the keyboard.
    Leave the Terminal window open.
    Reset Password Utility window will open with Macintosh HD selected.
    Select the user account from the popup menu box.
    Enter a new password.
    Reenter the new password for the user.
    Enter a hint.
    Click the "Save" button.
    Click  in the menubar and select Restart.
    Log in.
    If Keychain dialog box appears, select “Create New Keychain”.

  • Memory leak problems with loading videos over and over.

    I'm having memory leak problems with loading videos into a VideoPlayer aswell as FLVPlayback.
    What the flash should do:
    - Should be running for 7 days without having to restart the projector.
    - Interface that shows people around a 360 3D model with 5 different parts and at the stops it makes during the rotation you can click to zoom in on a location which plays a movie for that aswell.
    - Shows a video out of 5 parts for a 360 rotation in 3D in mp4 video (added each time and cleaned up, see code below).
    - Still images are used when the video clips are done playing (MovieClip in stage).
    - Should run automatically when there is no user interaction for X minutes.
    What the problem is:
    - The flash (as a exe and swf i guess) starts to consume memory over time (say 10 hours) until the projector crashes. This usually at around 1.75 GB of memory.
    I cannot see why the Flash cannot garbage collect this and free up the memory. Mabye there is something I don't understand about the garbage collection in flash?
    Here is some code from the video loading and playing:
    var fVideo:VideoPlayer;
    VideoCreate();
    function VideoReady(pEvent:VideoEvent):void
    trace("VideoReady()");
         // start playing video
    fVideo.play();
    function VideoLoad(pUrl:String):void
         trace("VideoLoad(" + pUrl +
         VideoCreate();
         if (pUrl != "")
              if (fVideoFolder + pUrl == fVideo.source)
                   fVideo.seek(0);
    VideoReady(null);
              } else {
    trace(fVideo.state);
                   if (fVideo.state !=
    VideoState.DISCONNECTED) fVideo.stop();
    fVideo.close();                                
    fVideo.load(fVideoFolder + pUrl);
         } else {
    // error no url
    function VideoCreate():void
         trace("VideoCreate()");
         // remove old one
         if (getChildAt(0) == fVideo)
              removeChildAt(0);
         fVideo = new
    VideoPlayer(1024, 768);
         addChildAt(fVideo, 0);
         fVideo.autoRewind = false;
    fVideo.addEventListener(VideoEvent.COMPLETE, VideoDonePlaying);
    fVideo.addEventListener(VideoEvent.READY, VideoReady);

    Hmm. It's in connection with Dropbox. Så apparantly you can only use one of the two at the same time if you want the programs integrated in Finder.

  • Is Anyone Having Problems with the newer version of Firefox?

    I still have my older Mac OsXv10.4 Tiger software. I wasn't exactly happy with Safari browser as it would block many sites and were considered incompatible so I downloaded the free Firefox browser (the 2.0 version) of which I STILL have. I'm aware that there is a much newer version and would like to download that, but I've heard a lot of people saying they have been having severe problems with it, but then they have PCs and not Macs.
    So my question is for you Mac users that use Firefox, have you had major problems with the newer version? I'm real hesitant to download if I'm going to have the same problem PC users are having...like constantly crashing. Also would my old Tiger software be compatible? I don't want to upgrade to Leopard.

    Yes. I had problems with Firefox 3.5. The primary problem was very slow or never-ending loading of certain websites (particularly secure sites and sites with many features). I also have had similar, but not as bad, problems with Safari 4. I never had these problems with Safari 2 or Firefox 2. It just seems that with each update, the problems increased for me. I have read the Safari and Firefox forums and tried many fixes with little improvement. I have come to the conclusion that there is some kind of compatibility problem between the latest versions of Safari and Firefox and Shockwave Flash and/or Javascript and OS 10.4, particularly on PPC Macs. I expect there are many who will disagree and I cannot argue or prove the point. This is just my opinion. And I recognize that my problems could be caused by my setup and not by the browsers. By the way, I do not use any add-ons with any of my browsers. Anyway, I got tired of dealing with it and installed the latest version of Camino about 2 weeks ago. I also did a clean install of Firefox 3.0.13. Camino is working out great for me. It is simple and it works. No problems at all. So currently I am using Camino as my primary browser and Firefox 3.0.13 as my backup. I hope this helps.

  • Problems with a new IP phone 7906 after factory reset

    Hi Guys
    I am currently having problems with my new IP phone 7906 after doing factory reset and here is a video of it:
    http://www.youtube.com/watch?v=vvCLtwIAwVw
    I used this command I found on the net:
    Hold down
    while plugging in the phone and keep holding it until the message waiting indicator (red light) starts blinking.  Then
    release # and type 123456789*0# in sequence.
    I was trying to switch my phone to sip and it also dont want to take tftp setup either.

    Tim,
    Found this on the net
    http://www.cisco.com/en/US/ts/fn/620/fn62949.html
    Might be woth giving it a go
    6.Pull power on the phone (even if power is PoE).
    7.Hold down the # key on the phone.
    8.Continue holding down the # key and re-apply power.
    9.While still holding the # key wait for the Message Waiting Indicator (MWI) light on the handset to start flashing.
    10.Once the MWI light is flashing, release the # key and enter the following sequence exactly on the keypad:
    3491672850*#
    Once this sequence has been entered on the IP Phone, if all the network criteria above have been met, it should begin its recovery process. This process can take up to 15 minutes to finish. The phone may appear to be doing nothing during this time. However, if the phone does not recover after 20 minutes then it is possible that the recovery is stuck. In this case, re-examine your network and verify that steps 1-4 are in place, then re-issue the factory reset sequence.
    * Note: The factory reset sequence is a way for a phone to clear flash and still upload to a valid firmware image. This is facilitated by the termxx.default.loads file, but requires that the image files listed in the termxx.default.loads file are available in TFTP for the phone to download. Open the termxx.default.loads file in any text editor. This loads file is essentially just a packing list showing all the OS and application files the phone needs to function. The files include a cnu, cvm, dsp, app and jar files. Please make sure that these files as listed in the termxx.default.loads file are in TFTP. ("xx" will be either "06" for the CP-7906G model, or "11" for the CP-7911G model.)
    Additional Diagnostic Steps:
    - Try a hard-coded IP address as a test to see if this resolves the upgrade failures. If it does, and the number of failing IP Phones is relatively few, this procedure may be the most expedient. After the IP Phone upgrades successfully, reconfigure the IP Phone to use DHCP.
    - Try putting the phone on a hub or a different switch and see if this helps change the startup timing enough so that the upgrade completes successfully.
    Regards
    Alex

  • Problem with a new iDVD08 Theme - please help

    Here is my problem with a new iDVD08 Theme:
    When I used a new iDVD08's theme (a first from the top, from the new 07 - the Revolution one) for my iMovie06 imported to iDVD08 with the project's chapters made in iMovie, all works fine, B U T: when I click the Scene Selections button and go to my chapters menu - there is a revolving, spinning wheel with a word: CHAPTERS REVOLUTION.
    The word "CHAPTERS" is fine with me B U T the word: "REVOLUTION" is really not welcome in a context of my movie (actually, it's quite annoying).
    Basically: HOW TO GET RID OF IT? or - is there a way to replace it with a title of my movie (like the Theme did in the main Menu), or just make it to disappear...?

    I'm going to show my wife that I was right about something.
    Have fun! It's a cool theme that I used for our Alaska cruise.

  • Problem with Loading Images?

    <pre><i>Locking duplicate thread.
    Please continue here: [[/questions/982030]]
    </i></pre>
    Hi,
    I'm using Firefox 26.0 and I'm kinda new user to Firefox.
    I'm having this random issue with facebook (sometimes with other websites too),
    Sometimes when I open a page, the Images doesn't show as usual.
    Sometimes it takes up to 10sec - 2 mnts to finish loading all the images.
    My internet is 8Mbps so I don't think its due to that?
    Here is a screenshot of the exact issue: http://i.imgur.com/I3eOQaI.jpg
    But it get fixed for a while (say 1-2 days) if I clear the cookies and caches. I visits a lot of webpages so clearing cookies and caches all the times is kinda not pretty possible.
    I also tried disabling all my add-ons, and ran a full scan with McAfee.
    Can anyone tells me what exactly could be the issue? It gets pretty annoying sometimes!
    Thanks in advance!
    Regards,
    Abey

    '''Hi, Thanks for Visiting this Question. But it was a duplicate of https://support.mozilla.org/en-US/questions/982030 (The Same question) Accidentally posted twice''' and I couldn't find an option to delete it, so please '''ignore''' this :-)
    Original thread: [[https://support.mozilla.org/en-US/questions/982030|"Problem with Loading Images"]]
    Warm Regards,
    Abey

  • Problems with Itunes New Version?

    Problems with Itunes New Version?
    Here is a copy of the error message. Every Time I listen to a song and it end and I go to listen to a new song the Itunes Freeze up. This is on the New Version of Itunes. I have a Windows 7 32bit 3GB Ram 1TB harddrrive Space
    <edited by host>
    Thanks,
    <edited by host>
    Fault bucket 1279649891, type 5
    Event Name: AppHangB1
    Response: Not available
    Cab Id: 0
    Problem signature:
    P1: iTunes.exe
    P2: 9.2.1.5
    P3: 4c47745b
    P4: e36b
    P5: 2048
    P6:
    P7:
    P8:
    P9:
    P10:
    Analysis symbol:
    Rechecking for solution: 1
    Report Id: 46dfdb3e-99a7-11df-8064-00038a000015
    Report Status: 0
    Fault bucket 1279649891, type 5
    Event Name: AppHangB1
    Response: Not available
    Cab Id: 0
    Problem signature:
    P1: iTunes.exe
    P2: 9.2.1.5
    P3: 4c47745b
    P4: e36b
    P5: 2048
    P6:
    P7:
    P8:
    P9:
    P10:
    Analysis symbol:
    Rechecking for solution: 0
    Report Id: 46dfdb3e-99a7-11df-8064-00038a000015
    Report Status: 0

    There certainly is a problem with itunes. I downloaded 9.2 and now it won't open. It won't recognize my iphone, either. I uninstalled it in the order recommended by the site, no joy. Deleted a configuration file, no joy. System Restore, no joy. All other software and hardware on the machine is working fine. I call AppleCare AND a local store, either they are completely clueless (which I doubt), or they have no idea how to fix it. I can't even back up my phone, or use the ipod. And since no one at Apple seems to care enough, I'll have to wait until the clamor is loud enough for them to even admit to a problem before I can use the ipod again.

  • I just upgraded my iMac to Lion, and a few seconds ago, I upgraded the iWork package and now I'm having some problems with the new version of Pages (4.1) When I try to change something in a document, a message says "the program is not responding"

    I just upgraded my iMac to Lion, and a few seconds ago, I upgraded the iWork package and now I'm having some problems with the new version of Pages (4.1) When I try to change something in a document, a message says "the program is not responding", so I have to force it to close. By the way, the SAVE botton stays the same even I change erverything in my document. Please, a have a work to finish, **** me. What I can do abou it?

    I just upgraded my iMac to Lion, and a few seconds ago, I upgraded the iWork package and now I'm having some problems with the new version of Pages (4.1) When I try to change something in a document, a message says "the program is not responding", so I have to force it to close. By the way, the SAVE botton stays the same even I change erverything in my document. Please, a have a work to finish, **** me. What I can do abou it?

  • Problems with the new Pages.

    Hi everyone.
    I wonder if i am the only one experiencing a little problem with the new Pages?
    My problem is that every other time i want to correct the font lets say trying to underline or make the font fatter using the hotkeys "Command+B" or "Command+U" or "Command+I", or even changing it manually in "formats" my font gets stuck, and i have to copy-paste text from another pages-file into my old one to get et back to normal.
    Anyone else tried this?
    Martin.

    VladRO wrote:
    These are the problems that I am encountering for the moment! If there will come up some new once, I will write them here!
    Instead of starting a new list, go to
    https://discussions.apple.com/thread/5468056?tstart=0

  • Problems with the new iPad and Joikuspot premium after iOS 6

    Hi,
    I'm experiencing serious problems with my new iPad after last iOS update. Usually I was connecting to the internet through Joikuspot premium on Nokia mobile phone (E6). I was able to do everything, https sites surfing, absolutely everything with no exceptions.
    Now, after iOS 6 update, I can't connect to https sites, google+, sync calendar etc.
    I've tried to change connection criteria on joikuspot but nothing. The fact is also that other devices as laptop or other smartphones are still working perfectly, in any case, sharing the wi-fi connection created by joikuspot.
    Finally the problem is 100% due to the iPad and the new iOS.
    disappointing, amateur for such a device... (iPad I mean).
    Any help?
    Many many thanks
    Vittorio

    Ho lo stesso problema, dopo l'aggiornamento a IOS 6 l'ipad non riconosce più il mio nokia N8. Con IOS 5 andava una cannonata...
    vorrei ritornare a IOS 5

  • Problem with the new server UCS C220 for set IP to CIMC

    Hi
    We’ve a problem with the new server UCS C220.
    We bought two servers UCS C220 M3 for CallManager 8.6 with High Availability.
    When we turn on the server during the boot and when it tells us, oppress F8 to enter at the CIMC and set the IP. But it never enters at the CIMC.
    Then, we configure our DHCP server and our switch, we connect the three gigabyte ports to our switch to give him an IP to the CIMC, so and then can enter via browser, but neither works.
    Note. The dedicated management NIC does not link, the other two ports do make link.
    What do you suggest to put an IP to CIMC and start installing our applications?
    regards

    You may have noticed that there is no DVD rom on the c220. What you need to do is:
    Login into the CIMC from your browser
    Luanch the KVM
    Insert the VMware DVD in your machines drive
    On the KVM pop up there should be a tab to mount the drive, after mounting it click on Macros and choose ctrl_alt+delete to restart.
    After the VMware OS installs press F2 to enter IP.
    Browse to the VMware ip to download the Vsphere client
    Open the Vsphere client, enter the ip of the vmware and the username will be root and no password if you did not set one.
    You can now upload OVA templates or manually create virtua machine from this enviroment.
    Hope this help

  • I am having email problems with the new Lion.  stmp, imap, etc. I have looked up google info and It is confusing when it comes to TS, SSL also, please explain how to set it up so my email goes out and comes in securely.  Help

    I am having email problems with the new Mountain Lion.  stmp, imap, etc. I have looked up google info and It is confusing when it comes to TS, SSL also, please explain how to set it up so my email goes out and comes in securely.  Help
    Incoming Mail (IMAP) Server - requires SSL:
    imap.gmail.com
    Use SSL: Yes
    Port: 993
    Outgoing Mail (SMTP) Server - requires TLS:
    smtp.gmail.com (use authentication)
    Use Authentication: Yes
    Use STARTTLS: Yes (some clients call this SSL)
    Port: 465 or 587
    Account Name:
    your full email address (including @gmail.com) Google Apps users, please enter username@your_domain.com
    Email Address:
    your full Gmail email address ([email protected]) Google Apps users, please enter username@your_domain.com
    Password:
    your Gmail password
    The Quick Answer
    Follow the instructions below to set up IMAP1 access in most email clients.
    Google Apps users, please follow the default instructions unless otherwise noted, replacing 'your_domain.com' with your actual domain2 name.
    this is all greek to me. WHAT IS STARTTLS? On the first page of Apple set up there is a TLS certificate and it is marked NONE- should I change it to the long APPLE CERT option?  The next page under ADVANCED: THERE IS A BOX SSL MARKED.  Then IMAP Path Prefix - I put stmp.gmail.com.. is that right?  Port 993 can  use this one? as 456 doesn't work and 587 said it wasn't safe.  Under AUTHENTICATION I used PASSWORD.  Should I have used external client cert TLS?
    Please help me set this up securely. Thanks

    Apple - Support - Mail Setup Assistant

  • Having big problems with my new Mac Pro, when I launch Photoshop CC, I get an error message, can carry on but after a few tasks it starts going gar... menus go blank, when you try to save it shows a blank box.... can anybody help?

    Having big problems with my new Mac Pro, when I launch Photoshop CC, I get an error message, can carry on but after a few tasks it starts going gar... menus go blank, when you try to save it shows a blank box.... can anybody help?

    when I launch Photoshop CC, I get an error message
    and what exactly is the text of that error message?

  • Since the most recent Firefox update 3.6.8 by banking institution no longer shows as having a secure encrypted connection, however, my bank assures me all is well with their certificates and that is a problem with the new Firefox browser update, can you g

    Since the most recent Firefox update 3.6.8 my banking institution no longer shows as having a secure encrypted connection, however, my bank assures me all is well with their certificates and that is a problem with the new Firefox browser update, can you give me some idea why it is doing this?
    == This happened ==
    Every time Firefox opened
    == Right after the new Firefox update

    Hello Anne.
    Can you please try it in a new (temporary) Firefox profile and see if the issue is still present? See [http://support.mozilla.com/en-US/kb/Managing+profiles this article] to know how to create a new Firefox profile. Please report back the results.

Maybe you are looking for