Flash CS5 AS3 Preloader Issues

Hi.
I'm a complete novice with Flash and at risk at looking like 'Dumbest Poster of the Year', I'm requesting help/advic over a couple of issues.
My first concern is with a very simple preloader I've made for a movie. Here is the code (posted in first frame of movie; nothing else is in the frame except for the preloader itself):
import flash.events.Event;
stop();
addEventListener(Event.ENTER_FRAME, loaderF);
function loaderF(e:Event):void{
var toLoad:Number = loaderInfo.bytesTotal;
var loaded:Number = loaderInfo.bytesLoaded;
var total:Number = loaded/toLoad;
if(loaded == toLoad) {
  removeEventListener(Event.ENTER_FRAME, loaderF);
  gotoAndPlay(2);
} else {
  PreLoader.PreLoaderFill.scaleX = total;
  PreLoader.PercentLoaded.text = Math.floor(total*100) + "%";
When I simulate a download, the preloader works fine in all the settings except for 'T1'. On this setting, the movie loads to about 20% then the preloader stops, the movie begins and I receive the following error message in the output panel:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at FlashFront1_fla::MainTimeline/loaderF() .
The movie itself plays fine on all settings, including 'T1'. Debug doesn't report any issues on preloader or movie.
Can anybody give me any idea what the source of the issue is? Should I even be concerned about it givne that the movie plays without a problem?
My second question relates to the 'Simulate Download' pre-settings in Flash. I know their are people out there still on 56K dial-up, or with 'broadband' running at 500 KBS (in the UK at least), but nevertheless, the download simulation settings seem like they are all geared to internet as it was in 1997 and are hardly reflective of the capacity of modern connections. Why is this?
My movie is not large (about 320KB). Should I even be bothering with a preloader or am I wasting my time for a small minority audience (much like the web designers who still produce sites for the 12 people in the world still browsing in 800 x 600 res)?
Thanks for any help/advice.

Flash movies stream down and finish "loading" when the first frame and content that loads on the first frame is available, though frame 1001 might not be downloaded yet. You would think you'd be kinda safe with frame 2 on a T1, but I think the issue is things aren't updating in the right order  rather than things not really being downloaded. Heck, it could even just be the T1 simulation that's causing problems.
Debug Movie probably isn't showing issues because it slows the timing enough to make everything ok. You could try trace statements too to see how far the code gets.
Also, you might try a full scale AS3 loader like this one http://www.republicofcode.com/tutorials/flash/as3loader/
I've found the Event.COMPLETE listener for the loader like this:
my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
to be pretty accurate so far in regards to content truly being loaded where as previous methods gave false positives for loading.

Similar Messages

  • How link from html page to a specific frame in flash cs5 as3

    Hi!
    I'm kinda new around here. I am interested in knowing how to link from a specific html page to a specific frame in flash cs5 as3.
    I have a website that I originally began to design in flash but later started developing new pages for it in html. The flash part of it has several pages on different frames and I have created links from the flash part to the other html pages, but, I can only link the html pages back to the main flash home page, and not the other pages in the flash part of the website.
    I have read that in cs3 it was possible using the flashvars skip variable, but I don't know how to do it. I have not yet seen any working examples and I could not find any instructions / tutorials online for cs5.
    Can someone help here?

    add a query string, to the swf's embedding html, with variable/value indicating the frame you want to display in your swf.  add a javascript function to return the query string (or entire url), call the javascript function from flash using the externalinterface class.  and finally add code to your swf to parse the returned url or query string, parse it and then direct your timeline to the appropriate frame.

  • Does Flash CS5 (AS3) come with more components than CS4 (AS3)?

    Hi all.
    Bit of a background to my question- I started learning AS3 around June last year (with no prior Flash experience). I was mainly interested in learning Flash for my own knowledge and personal projects I had in mind. Lately though I've been considering getting employed as a Flash developer, but most companies seem to be asking for AS2 experience, as well as AS3. So I fired up CS4 this morning and took a look at AS2. Probably the most surprising thing I found was that CS4 has a whole bunch more components for AS2 than it does for AS3, making me want to drop AS3 and work with AS2 permanently lol (the built in components make my life so much easier, and offer me more than faster execution does). I'm assuming the reason for this is because AS2 has been around for while, and Adobe has had more time to build more components for it, whereas AS3 is only relatively new.
    So to conclude, does CS5 have more AS3 components (perhaps equal to AS2), or do we only have the same components as we had in CS4?
    <3 components lol.
    Thanks guys.

    Flash CS5:
         ActionScript 3 - 3 categories (Flex, User Interface, Video). 33 components in total.
         ActionScript 2 - 3 categories (Media, User Interface, Video). 36 components in total.
    Flash CS4:
         ActionScript 3 - 2 categories (User Interface, Video) 31 components in total.
         ActionScript 2 - 4 categories (Data, Media, User Interface, Video) 25+ components in total.
    Sorry that I don't know how exactly how many components are in Flash CS4 AS2. Couldn't find enough images (I don't have CS4, I use CS5).
    Anyway, I think that Flash CS4 AS2 has the most components, with the most categories. However, whether you should use CS5 or CS4 and AS3 or AS2/AS1 really depends on, not how many components are available, but what you need. Chances are some components you will never touch. Also, sometimes you will need a new feature only in Flash CS5, or be asked by your future employer to write an application in the other scripting language.
    So really, it depends what you think. If I were you, I would download a trial of both CS4 and CS5, and play around, see which option you like the most. Oh, and be prepared to be forced to use another option by your employer at some stage.
    Hope it helps
    dikuno <><

  • Flash CS5.5 freeze issue when testing movie.

    So I've been working on a new animation for several months and I've encountered a problem.
    Details: After exporting the swf by testing the full movie, it plays the first four scenes, and then after that it crashes.
    The symbols keep going but the movie does not progress past that scene.
    I've cut the scene out, removed filters from my vcam and even tried to run it on an older version of Flash.
    I read a few forums of people with similar problems and the general answer is that they have corrupt files in their library.
    Apparently corrupt files in the library have a 'Preview not available' sign when you click them in the library.
    After going through all my library items (It's over 2000) I do not have any with that sign.
    I really need help as I've worked real hard on this project.
    PLEASE HELP! I use Flash cs5.5
    Thanks, Flip.

    The number of frames in each scene doesn't look like a problem.
    I would suggest you to Keep one scene and split your elements in Movie Clips instead of creating different scenes.
    Your explanation suggests that your scenes run continuously and there is no interaction by the user. So you can easily use 6 movie Clips in the timeline instead of Six Scenes.
    Let me know if this solution resolves your issue.

  • Flash CS5 AS3 and image uploading

    hay guys and girls, i am making a fully flash website and have come across a few problems.
    I need to make a way for a loged in user to upload pictures straight to my site. Currently im using a simple xml doc to load my pictures into my photo gallery. so i need 2 things, a way to load images straight into the folder with all the other pictures, secondly a way to automaticly edit the xml to include the new images added, (also i would need to set the weight and hight of the image, n ofcourse of to pic to reject is - but thats not as important)
    Thanks for all advice
    Steve

    To upload images to a folder on the server you need to look into using the FileReference class.  You should be able to find a tutorial via Google using terms like "AS3 FileReference upload tutorial".

  • CS5, AS3 - Preloader

    I've been searching for guides/tutorials, basically any sort of help in making a preloader for a game. Also looked through previous posts on this forum.
    Whenever I have a preloader made without any errors and I click test movie (ctrl-enter), it skips the preloader and goes straight to my game's menuscreen. Fair enough, so I click simulate download, the window turns white, after that it turns grey with 3 or 4 dots blinking, as if it were a preloader, except not mine, after a while it goes into my games menuscreen again, completely bypassing the preloader.
    A walkthrough for a simple preloader (just a percentage going from 0 to 100), some code I can copy-paste, anything to make it work, I've tried all I can think of.
    /beg for help.

    that code's in frame 1 of your main timeline, correct?  if yes, copy the trace output using the following and paste it here:
    stop();
    trace(this.currentFrame,this);
    import flash.events.ProgressEvent;
    import flash.events.Event;
    this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoading);
    this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
    function onLoading(evt:ProgressEvent):void {
        var loaded:Number = evt.bytesLoaded / evt.bytesTotal;
        loadbarText.text = "LOADING: " + (loaded*100).toFixed(0) + "%";
    trace(loadbarText.text);
    function onComplete(event:Event):void {
        this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onLoading);
        this.loaderInfo.removeEventListener(Event.COMPLETE, onComplete);
        loadbarText.visible = false;
        gotoAndPlay(2);

  • A BUG in Flash CS5 AS3

    I have got the answer for the problem of my previous post!
    This bug is very annoying:
    First check your version, mine is 11.0.0485. If yours are not, it could fixed. Anyway you can try:
    1 create a new as3 file
    2 create a MC
    3 put one instance on frame 1 on the maintimeline, leave the name empty
    4 put another instance on frame 2, name it "dog", whatever
    5 on the frame2, write as followings:
    trace(dog)
    stop()
    6 alt+enter
    Oops! You got a "null" on output window!
    Do we supposed to name every instance on the stage?
    7 name or delete the instance on the first frame, see if the null turned into [Object MovieClip]!

    I get a bug
    I wright some code in minetimeline
    then edit a MovieClip
    back timeline,the code intimeline is miss
    my English is poor . sorry.

  • Error Help: Flash CS5 Error initializing Java Runtime Environment...

    Hi im on a Win 7 64bit system  (Clean install),  I just downloaded the Flash Pro CS5 trial today - however when I start the program I get the following message as soon as the UI pops up and prevents me from running AS3 code when compiling files:
    Error initializing Java Runtime Environment.  You may need to reinstall Flash.
    All I did was run the program. I tired updating it (update worked but still got the message at start up), I tired installing and uninstalling it, I tried uninstalling and installing different versions of Java and various existing solutions.
    Also I used Adobe's clean up Script for CS5.
    Does anyone know the answer to eliminating the error message?

    Well this is a very old post but this error appear again in CS5.5, then I think is helpful retake this post
    In Flash CS5.5 the issue is solved editing the file:
    "c:\Users\current user\AppData\Local\Adobe\Flash CS5.5\en_US\Configuration\ActionScript 3.0\jvm.ini"
    and lowering the Xmx128m to 128, some times this must be rised to compile large applications with a huge amount of AS3, or to use some Flex 4.5 libs from Flash Professional
    I hope this help to CS5.5 users.

  • Flash cs5 gallery problem...

    Hello I have made a website and a gallery both in seperate files. I made the gallery in fireworks cs 4 (as2), and the website in flash cs5 (as3).  When I imported the gallery.swf to the library it just shows the outline of the gallery (picture1) with no pictures or even the menu just the outline. Could anyone please help me out in this matter?

    You need to specify the correct path/name for the swf file...
    fl_Loader_2.load(new URLRequest("player_black"));
    does not do that.  As a minimum it should have an ".swf" at the end of the file name, as in "player_back.swf".
    Any time you get error messages, you should include both the complete error messages and the relevant code in your initial posting.   It can help get to solving think more readily.

  • Adobe Flash CS5 Preloader Taking Too Long

    Using Adobe Flash CS5.
    Created a 1mb (.swf) presentation (images, transitions, voice-over, etc).
    Used the Preloader for SWF template from Flash CS5 library.
    Copied the code into its own layer called "AS3" into frame 1.
    Copied the little text box with instance name percent_txt into frame 1.
    Everything else starts in frame 2.
    The profiler still reads about 300kb in the first frame and it takes until about 50% (about 20 seconds at 56kb dl) until the simple image I put on frame 1 appears.
    I read on this forum something about "exporting about 1mb of assets in your first frame", but I don't understand what that means...

    Ok, I found the Flash Settings...
    In Publish Settings, Flash Tab... next to the Script: ActionScript 3.0, I clicked the "settings" button and changed the "Export classes in frame:" option to "2"
    What I still don't understand is why the preloader doesn't show until about 450kb of my 900kb file is downloaded!
    I don't have anything else in frame 1, yet it's still got that spike at about 500kb. How do I get rid of that so my preloader starts showing almost immediately?

  • CS5.5 AS3 FLVPlayback issue adding to stage or library

    I am unable to add the Action Script 3 FLVPlayback component to my stage or library in Flash CS5.5 when working with an action script 3 document.
    Under components in the video folder i click and drag anyone of the FLVPlayback components (FLVPlayback, FLVPlayback 2.5 or FLVPlaybackCaptioning) to the stage and nothing happens. I am unable to add it to my library as well. All the other actionscript 3 components under the Video folder work. (BackButton, BufferingBar, CaptionButton, etc...)
    If I create an actionscript 2 document the FLVPlayback component drags to the stage and adds to the library just fine. So this appears to be an actionscript 3 issue only.
    I have 2 other employees in my office using the same product and none of them have this issue. Only me.
    I have tried to uninstall the product and reinstall but nothing helps.
    I have Flash CS3 installed on my PC and the product has the same symptoms as the Flash CS5.5 trial version that I am running.
    I did not try this with Flash CS3 before I installed the CS5 trial. So I do not know if it worked prior to my CS5 evaluation.

    Microsoft Windows XP
    Professional
    Service Pack 3
    Video component
    Date Created: 3/17/2011
    Date Modified: 3/17/2011
    User folder
    Not sure what you are asking for here.
    Thanks for your assistance,
    Message was edited by: jimder

  • Flash CS5 locks settings for new AS3 document

    New install of Flash CS5.5, and I just opened it up after three weeks and the latest update.  I create a new AS3 document, 940 X 226 with a black background, and work on several animations. I close the document, and click File>New, and choose a new AS3 doc. Now I go to the Properties window and it's all greyed out. It says 940 X 226 with a black background again, but the document on the stage is the default 550 X 440 with a white background.
    The ONLY way to open a new document that I can change properties on is to close Flash and reopen it.
    Any ideas?

    Looks like you got a solution on the other thread.

  • Print in A4 size paper through AS3 using Flash CS5

    Hi all,
    Is any idea to print a job in A4 paper size by defult through AS3 using Flash CS5?

    Hi Shakeel,
    I am already having customised page format .
    It works fine when I choose Standard Device type EPLQ550
          But EPLQ550 is probably not supporting Arabic text.   It Gives ########
    Thats why I changed to Standard Device type ARSWIN
        Now Arabic text looks ok..... but Printer is not getting initialised after the first check. it skps.
    Pl suggest
    Thanks
    SK

  • Successfully using a Native Extension with Flash CS5.5 Pro, having issues

    Hey all,
    I'm trying to use a native extension due to an app rejection about the new storage guidelines. I'm hoping someone can help me figure out how to use a native extension from Flash CS5.5 and the adt command line utility (I've never used before).
    Apples storage guidelines in 5.0.1 require files saved to Documents (and other places) to be marked with the icloud "do not back up" bit. I'm trying to use Adobe's IOS 5.0.1 data storage native extension to do that as I have file sharing enabled and my app downloads files I want the user to be able to copy to their desktop.
    From the bits and fragments I'm reading all over, getting it to compile means using the command line adt tool (I've never used it before) because Flash Pro CS5.5 doesn't support native extensions. Also, this native extension requires a v14 SWF published (11.1) and CS5.5 only goes up to 10.2 (or higher if you install the players).
    I edited the AiriPhone.xml file and pointed it to an AIR 3.1 airglobal.swc and I have AIR 3.1 overlayed in flash. I can't test AIR for iOS anymore after that change but I can get it to compile a SWF. The adt command line adt utility stopped complaining that my SWF version was 13 when it needed 14, so I assume this worked?
    I am trying to compile a debug version so I can see trace statements to see if the native extension reports success on changing the bit. Here is my command line cobbled together from scraps of info on adobe.com and the -help data:
    adt -package -target ipa-debug -connect 192.168.1.80 -provisioning-profile myApp.mobileprovision -storetype pkcs12 -keystore myApp.p12 myApp.ipa myApp-app.xml myApp.swf dat AppIconsForPublish Default-Landscape.png Default-LandscapeRight.png -extdir extensionDir
    Before this iCloud change this app published directly from Flash Pro CS5.5 without any issues. I am only running into issues getting this app to work with this native extension and/or published correctly.
    I am including the folders "dat" and "AppIconsForPublish" as well as splash screens (this app is landscape-only) as well as that extension in the folder extensionDir.
    After putting in my password my app compiles into an IPA which I can drop into iTunes. It has the same general size as the IPA generated from Flash Pro. The icon is correct, etc.
    When I sync this file, the progress bar goes across, I see it loading on my iPad and then once it goes to install I get a popup saying "iTunes Sync: 'myApp' failed to install."
    Is there anything obvious wrong with my adt line? Has anyone else used this native extension? Ideas on what I can do to fix this?
    No, unfortunately I did not build this with Flash Builder. I am an avid user of it now and this would be a moot point as it uses ANEs and changes SWF versions trivially. I have to get this to compile using Flash Pro CS5.5 though.
    Any help is greatly appreciated!
    edit:
    Just FWIW, after I updated the .xml to use the latest AIR and such (so the version is 14) I removed the extension, exported purely from Flash Pro CS5.5 and the app works fine. As soon as I enable the <extension> in the XML I can no longer install the app. This just appears to be a noob adt publish issue.

    My app downloads PDFs, movies and other information-esque files and saves them to the apps Documents folder so they can be retrieved via file sharing. These files not being in something purgable like /Library/Caches and not having the "do not back up" bit is why I was rejected.
    update: It's definitely my command line building.. I took out the native extension completely and published from flash to an IPA and it works. I then run adt on the same SWF that just worked and it fails to install. So the install failing is my command line. I see this article and my command line is very similar. I'm really uncertain why it's failing.

  • Flash CS5 has a serious speed and crash issue.

    Hi,
    Works PC.
    Dell dual core 3.5Gb ram PC. 1 yr old
    Launch time CS5 1 minute.
    Opening a file is 1min 10sec, saving a file ditto, copying from lib takes 50 secs, pasting to another library 1min, replace existing item, go yes and it crashes.
    Install CS5 trial on home very powerful purpose built CAD and video workstation, expect it to fly, but get same times, at least it doesnt crash first attempt but still terribly slow at everything.
    Second time I try this routine it also crashes upon replace existing item.
    Try saving files as CS4, they open into CS4 in seconds, wow what a difference !!!!, CS5 obviously at fault as a program, but text on buttons is a mess. so thats no good. Thats text created in CS5 not displaying when saved as CS4. Is this program in fact any good ?
    File size of source file is 26Mb, of destination is 21Mb. Source has about 14 movie clips, select these and make a movieclip of them, copy/paste it to library of destination and it crashes.
    Works PC reinstall Flash twice trying to resolve this, assuming its the prog, still its got these speeds and it crashes when accepting movieClip into Library. Remove the busy layer and try again and it accepts it, still damn slow. The home PC survived the busy layer paste first time round, suggesting the Office PC is at fault. But now its also crashing.
    Has Flash CS5 a complexity limit ? These are map layers with many vector shapes on one of the layers, quite a few on three others. That layer seems to be the straw that breaks the camels back. Is 26Mb beyond the limit. I even upped the preferences for memory to 3000kb but no better.
    I see on the forums complaints of CS5 speed on saving, users reverting to CS4.  I wanted CS4 but was forced to have CS5 as it had just come out. New progs are not the best move but Adobe bully you.
    The speed and crashes are prohibitive for business work, 3 days trying to do a mornings work.
    I thought it was the PC but others are finding CS5 slow and crashing. What have we here as a prog...useless !  Adobe. you need to fix this. I would go back to CS4, I have it on home PC, but CS5 into 4 has text issues, unless the Office PC used a font not on the home one.
    Envirographics

    I still cant realize how this buggy piece of **** could make to the market! After I switched to Flash CS5 it became true headache working on Flash projects:
    - in constantly crashes on saving, working with library, exiting;
    - trying to create file with FLVPlayback throws dozens of errors with references to the classes that even do not exist in configuration folder nor in preinstalled SWC files that I HAD to reference manually;
    - publishing in CS4 files that are published properly in CS5 throws tons of errors even though both reference existing classes and are for the same FP10 version.
    - saving FLA for CS4 creates huge source file and compiling this file in CS4 creates SWF with 10x size (~280kb in CS5 and ~2800kb in CS4).
    Even though Flash CS5 has some nice improvements in interface and ActionScrip editor which I do like, in general it is a complete DISASTER and huge TIME WASTER!

Maybe you are looking for

  • How can I get my mail (on Mountain Lion) not to store filed emails that are already stored on the server

    I am having issues with my Mail.  I am trying to find out how to keep my computer from storing mail that I have put into the servers folders.  Many of my messages have large attachments, and to me, it seems to be eating up ALOT of space on my compute

  • "Evaluatio​n Copy" still displayed

    I used the demonstration version of the 3D graph control to do some programming. We have now purchased the full version of Measurement Studio. Before installing the full version, I uninstalled the demo version. The next time I opened my project, I wa

  • Process Payment Manager pause status

    Dear All We are facing problems, in our one of our concurrent manager request related to "payment", this results in error, and following are the output, also process payment manager remain in the pause status, please help to resolve this issue. prod

  • Dynamic Selections in Standard SAP program

    There is an Icon which enables dynamic selection in the Standard SAP Transaction 'FBL3N'. How can I add or fields from this dynamic selection? Any help would be appeciated. Thanks, ALAM.

  • User Exit Validation for CAT2 using CATS0003

    Hi all, I am using the user exit CATS0003 to validate the receiver cost center, receiver fund, receiver order and the receiver functional area.That is if any one of this fields are initial it will give an error message. But when I try to change an ex