Preloader in CS4/AS3

I need help.  I'm trying to create a preloader using CS4/AS3, and so far I've accomplished what I consider to be "one step forward - two steps back".  I've found plenty of guidance for creating/manipulating in AS2, but..... next to nothing for AS3. Everything that I have found tells me what to do with the .swf movie that I've created.  The problem..... creating the .swf.  Can someone guide me in the right direction. 
So far one of the best resources (most thorough anyway) is www.gotoandlearn.com.  The problem is each tutorial that I've seen still begins with a pre-created .swf movie.
Thanks in advance.

Well, kind of..... and not.  The preloader appears to come up when I do a "Publish Preview", but it's instantaneous, then the movie loads.  Ironically, without the preloader, the redirect works great... with the preloader, the movie simply loops.....
New screencaps attached...

Similar Messages

  • (Help) Using Input text in Flash CS4 AS3

    I am trying to take a user's input (His Name) and then greet the user on the next frame using the name he previously entered. I googled for 2days and was unable to find a way to do this on flash CS4 AS3, i guess because im very new to flash (only 2-3weeks )
    Any help would be greatly appreciated, and i am sorry if this was already answered in the forums.
    thanks for reading.

    If your interested... here's some general "rules of the road" that are basically courtesies...
    Don't post the same question in different forums (crossposting).  Folks that help don't like that because they can waste their time providing the same response someone else already offered elsewhere, or their helpful info gets no attention because the OP (original poster) got wrapped up in the discussion elsewhere and never went back to the other forums.  I saw one time where the OP suffered from doing this... the first person to respond in one forum said what they wanted couldn't be done, while my response in another forum showed them how to do it... but they accepted that it couldn't be done and never returned.
    Don't post in someone else's posting unless the exact same situation applies to you and it is a current posting.  It is a bit rude to step into someone else's posting just to get attention, which some people do... some with totally unrelated problems.  Or if your problem is even slightly different, it can end up confusing matters for all involved... trying to juggle helping two people where different solutions are needed.
    If you get one problem resolved and have another you want help with that does not involve the first, start a new posting.  People search these forums so it helps to have topics match the postings, which will not apply if mutliple topics get resolved under one title.  I recently saw one person tell someone to start a new posting even though they were following up to clarify something of the solution they received... that's wrong and is more likely someone with a case of points greed... as useless as points are, it happens.

  • How can I NOT let collision happen in Flash CS4(AS3)?

    I have been playing with collisions for quite a while, but cannot seem to get it just the way i want it to be.
    I made a new rectangle into a Movie Clip, with an instance name : "block_mc"
    I made a sphere into a Movie Clip, with an instance name : "ball_mc"
    I made the sphere(ball_mc) movable with the arrow keys.(see post:http://forums.adobe.com/thread/491457?tstart=0 )
    Now I wanted to try and make the sphere(ball_mc) stop moving so it wont hit the rectangle(block_mc), so that the rectangle(block_mc) would act like a solid object.
    Meaning the sphere(ball_mc) would not be able to touch the rectangle(block_mc). It would act like a wall.
    Now my problem is I don't know if there is a way of not letting objects collide?
    I tried the ".hitTestObject()" but that did not work for me.
    ~ Thanks for Help and Advice~

    I apologize, for this confusing long question, I simply ment to ask:
    Is there a way Flash CS4(AS3.0) will not let Objects on stage collide?
    ~Thank you for any Tips, Advice and Help~

  • Need help in screen capturing for flash CS4 AS3

    Hi, i need help!!!!!!!!!!!!!!!!!!!!!! URGENT!
    I am currently doing Augmented Reality.
    I got my marker to detect my model but my problem now is how to screen capture the content that is in swf.
    (As in capture the dae model shown in the comp not from webcam.)
    & also i just want to capture the swf window not the whole desktop.
    I read online, they say its impossible?
    Or is it possible to call screen capture function in javascript to flash CS4? (LIke external data)
    (Moreover, does anyone know how to detect multiple dae models with different markers?)
    Anyone can help??? Thanks in adv!!

    My current program (Flash CS4, AS3) only can capture what the webcam sees.
    How do i change it to screen capture (something like print screen) with my .DAE models?
    In the case, when i click on the capture button, it print screen.
    Here's part of the code that capture what the webcam sees.
    private function captureImage(e:MouseEvent):void
       bmd.draw(stage);
       bmp = new Bitmap(bmd);
       bmp.x = 140;
       bmp.y = 40;
       addChild(bmp);
       capture.visible = false;
       saveButton.visible = true;
       discardButton.visible = true;
    Really really need help! URGENT!
    Thanks!

  • Cs4 as3 preloader

    Hi,
    Is there a surestarter preloader in AS3 with CS4? Meaning here, showing a progress bar or percentage value before loading the main swf, right away at the start of the  loading.
    I tried 3 different versions:
    1- I used the code from a video (and accompanying files), and simply changed the content.swf to my own swf file (rename my swf content.swf), so that the original code would load my swf instead of the original content.swf. (original content.swf was too small to see anything before loading, because my loading speed is too fast).
    Here is the code from the original preloader (loads a small swf which then loads the main swf file):
    var l:Loader = new Loader();
    l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
    l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
    l.load(new URLRequest("content.swf"));
    function loop(e:ProgressEvent):void
    var perc:Number = e.bytesLoaded / e.bytesTotal;
    percent.text = Math.ceil(perc*100).toString();
    function done(e:Event):void
    removeChildAt(0);
    percent = null;
    addChild(l);
    and here is the link to the file:
    http://www.raidcanada.com/preloader-org-test.html
    2- used the code suggested, which does the preloading directly in the main swf file:
    stop(); 
    //Import the required assets
    import flash.display.*;
    //Stop the playhead while loading occurs
    this.stop();
    //Create a listener to call the loading function as the movie loads
    this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, PL_LOADING);
    /*This is the main function, basically it grabs the total and loaded bytes,
    calculates a percentage, and displays it by stretching the bar and adjusting
    the textfield display. If your bar/textbox instancenames are NOT lbar/lpc,
    you'll need to adjust this code to match your instance names*/
    function PL_LOADING(event:ProgressEvent):void {
    var pcent:Number=event.bytesLoaded/event.bytesTotal*100;
    //Stretch the bar
    lbar.scaleX=pcent/100;
    //Display the % loaded in textfield
    lpc.text=int(pcent)+"%";
    //If the movie is fully loaded, kick to the next frame on the main timeline
    //You may wish to change the gotoAndStop(2) to a gotoAndPlay(2)
    if(pcent==100){
    this.gotoAndPlay(2);
    This one doesn't work either, and if you refresh the page, you get only the bar, instead of refreshing the main swf.
    http://www.raidcanada.com/test/test-2.html
    3- use the code suggested to replace the preceding version:
    stop();
    addEventListener(Event.ENTER_FRAME,checkLoad);
    function checkLoad(e:Event):void {
    var pcent:Number=this.loaderInfo.bytesLoaded /this.loaderInfo.bytesTotal*100;
    lbar.scaleX=pcent/100;
    lpc.text=int(pcent)+"%";
    if (pcent==100) {
    removeEventListener(Event.ENTER_FRAME,checkLoad);
    this.gotoAndPlay(2);
    This one loads correctly (without the percentage or progress bar) and the refresh is OK.
    http://www.raidcanada.com/test/test-1.html
    The idea is to have this page load correctly showing a percentage sign and a progress bar until the loading is complete for this page:
    http://www.raidcanada.com/entete-multi-hiver-1-test.html
    Every time I test the swf directly in Flash CS4 with the simulated download, I get the progress bar and percentage correctly.
    I also tried with Firefox and get the same results.
    FLAs are at:
    http://www.raidcanada.com/test/test-1.fla
    http://www.raidcanada.com/test/test-2.fla
    and screenshots of FLASH (showing the progress bar in "test movie" with simulated download):
    http://www.raidcanada.com/test/screenshot-test-1.jpg
    http://www.raidcanada.com/test/screenshot-test-2.jpg
    Am I missing something?
    THank you in advance

    Hi,
    I am using Internet Explorer 8, version 8.0.7600.16385 with Windows 7 Ultimate or Firefox 3 version 3.5.9
    If I flush the cache and load the page:
    http://www.raidcanada.com/entete-multi-hiver-1-test.html
    It takes about 5 seconds with a blank screen before I get the main swf displayed.
    If I load the page: http://www.raidcanada.com/test/test-1.html
    It takes about 1 second with a blank screen before I get the main swf displayed. The main swf file is much smaller.
    I also did a lot of tests, and still the same problem. Temporarely, on the production site, I ended up installing a static Image saying "Loading", without the code, which then loads the large swf. But some customers are seeing the "Loading" for 14 sec to 24 seconds, depending of the swf file.
    I know the code suggested is probably working with CS3 and AS2, but I need to make it work with CS4 and AS3, because my other code is all in AS3, built with CS4. As I said before, if I make a simulation, the simulation is perfect.
    Thanks

  • Flash CS4/AS3 - How to use a preloader with FLVs?

    Somehow I've had a really hard time finding a straightforward forum answer or tutorial for this--maybe someone can help?
    I have an SWF file that references/loads an external FLV file (www.44designs.com/promo_video.php), but since the FLV file is about 9MB and can take time to load on a slower connection, I think a preloader (something simple like "LOADING...100%") would be a good idea as the FLV loads.
    Anyone have a simple way to do this??  I've had no success in finding what I need--just scripts for loading SWFs.  You can see an example of this on www.44designs.com where a preloader script I've got seems to be referencing the SWF (thus loading almost immediately) instead of the much larger external FLV.  Make sense?  I'm not super AS3 savvy, but I can follow logic and cut and paste

    Great info, thanks for the post!

  • Hellllllllllp!  preloader in cs4 - flash newbie

    Hi all,  Please forgive me if this question has been raised in the past as I am a complete newbie when it comes to flash and I am having to edit someone else's preloader - eeeeeeeek.
    Anyway, I need to create  or edit which ever is easier the preloader for a flash banner which someone else created.  I have searched for days (well hours) for an answer to my requirement on line and have gotten exactly nowhere.  I mean if I just wanted a black box with a 100% loading rectangle I'd be sorted by now but that's NOT what I need so I'm pining my hopes on the expertise within this forum.
    What I need is a preloader with a single static graphic and 100% counter which stops running and displays a black rectangle before the main fla file kicks in.  I have tried every which way to achieve this and the closest I got was a single static graphic with a static loading sign which was viewable at every transition in  my main fla file as the graphics were changing????
    Please help me before I lose the will to live or this laptop goes out the window of the two storey building I'm in at the moment.  As I said before I am totally new to flash cs4 and have no concept of code or frames etc so in other words a complete newbie - sorry

    Your best bet might be to find a good tutorial that explains everything step by step.  Here's one you can try
    AS3 Preloader
    http://www.gotoandlearn.com/play.php?id=85

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

  • Create preloader in CS4 AS 2.0

    Looking for an easy way to create a preloader using ActionScripting 2.0 in Flash CS4. Thank you!

    use google to search for a tutorial:  flash as2 preloader tutorial

  • HELP: Preloader and Button AS3

    Hi guys!
    I used to work on AS2 to make my animations, buttons and portfolios, but now I needed to use AS3 to make some forms interact with some PHP script.
    TextInputs and Buttons on COMPONENTS are working and interacting normally with PHP. My PreLoader is working great too. But what should the easiest is not working: MY SIMPLE BUTTONS! It used to be so easy in AS1 and 2, but now on AS3 it's not working. I am putting all my action and codes in a ACTIONS FRAME in the top of my animation, but it is not working!
    I have my Preloader on my frame 1 working, calling my animation on frame 2. The code is here (it's working):
    stop();
    addEventListener(Event.ENTER_FRAME, loading);
    function loading(event:Event) {
    var bytestotal = stage.loaderInfo.bytesTotal;
    var bytesloaded = stage.loaderInfo.bytesLoaded;
    var sclbar = Math.round(bytesloaded*100/bytestotal);
    custom_animation.gotoAndPlay(sclbar);
    if (bytesloaded >= bytestotal) {
    removeEventListener(Event.ENTER_FRAME, loading);
    removeChild(custom_animation);
    gotoAndPlay(2);
    Then I placed my buttons actions on the frame 2.
    If I use the action:
    home_btn.addEventListener(MouseEvent.CLICK,clickHome);
    function clickHome(evt:MouseEvent):void {
    gotoAndPlay(2);}
    release_btn.addEventListener(MouseEvent.CLICK,clickRelease);
    function clickRelease(evt:MouseEvent):void {
    gotoAndPlay(2690);}
    My movie pauses and no action is added to my buttons.
    I get this error: TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at index_Scene1_fla::MainTimeline/frame2()
    If I use the action:
    addEventListener("addedToStage", oas);
    function oas(ev){
    init();
    home_btn.addEventListener(MouseEvent.CLICK,clickHome);
    function clickHome(evt:MouseEvent):void {
    gotoAndPlay(2);}
    release_btn.addEventListener(MouseEvent.CLICK,clickRelease);
    function clickRelease(evt:MouseEvent):void {
    gotoAndPlay(2690);}
    The movie plays complete, but I get no actions in buttons and a error in my components textinput and button (they look like shaking).
    I get this error: 1180: Call to a possibly undefined method init.
    I tried to use the import flash.display.SimpleButton too, but it doesn't work too.
    Anyone could help me????
    Thanks,
    Pedro

    If you can provide a clear explanation of where the buttons are and where the code for them is located that might help lead to a solution.  From what you have described already it is not clear where the code is and where the buttons are.  You should not have to use an init function if you are doing so to wait for the buttons to be loaded... they are already loaded when you get wherever they are.
    For the 1009 error, it is indicative of the object targeted by your code does not exist in theframe where that code is.  SO if you have your code on frame 1 and your buttons are in frame 2, that would account for that error, as well as a few other possible scenarios.

  • How do I create a simple loading scene in CS4 AS3?

    Hi All,
    I have tried using the following to no effect:
    ifFrameLoaded ("Main", 80) {
    gotoAndPlay("Main", 1);
    CS4 says this has been replaced by
    flash.display.MovieClip.framesLoaded but this doesnt seem to work
    the same, i keep getting errors.
    Basically I have scene called "Loading" and I want AS3 i this
    scene to wait until my scene called "Main" has loaded before
    proceeding to it. I have an animation in the Loading scene to show
    its loading.
    I must be missing something simple but cant figure it out.
    Please help

    Ok I now have
    trace("framesLoaded:" + framesLoaded + " currentFrame:" +
    currentFrame);
    if(framesLoaded == totalFrames) {
    gotoAndPlay(2);
    } else {
    gotoAndPlay(1);
    Which appears to work, i shows my loading frame then moves
    onto Frame 2. The only problem is it hasnt finshed loading! The
    output in CS4 is "framesLoaded:1 currentFrame:1". framesLoaded
    should be 80 before it moves to the next frame. Any Ideas?

  • Captivate CS4 - As3: Close Project problem

    I've just built a project with some As3 animations. Hence I saved the project as an As3 project. The problem is that at the end of the last slide, the project freezes rather than shuts down. I have taken care to select the "Close Project " option rather than the Stop option. But the project does not close automatically. Also the Exit button does not work (as intended).
    More details:
    Captivate CS4
    IE7 browser
    I've looked at some previous queries too on this forum but none seem to have an answer to the problem.

    Withdraw the question.
    It seems to run fine on my LMS but the issue is with IE, I guess.

  • CS4 AS3 components

    I am using CS4. I have created a number of CS3 components in
    the past without problems. Now I wanted to create a CS4 component,
    because there are some Player 10 specific scripts. The component
    works well if I don't set any parameters. However, when I try to
    set parameters
    1. they are not listed in the parameter panel,
    2. when i place an instance of the component on the timeline,
    I get a huge number of errors referring to the component as an AS2
    component.
    I never experienced that before. Does anybody know what is
    different now?

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

  • Getting Information from ID3 tags from streamed mp3 files in Flash CS4 AS3.0

    Hi everyone:
    I have spend my whole day trying to find a good way to access ID3 tags in AS3.0; but didn't find anything helpful.
    In my project I am making a sound object and assigning it a URL:
    Then I stream the sound into a sound channel:
    var s:Sound = new Sound(new URLRequest('URL here"));
    var sc:SoundChannel;
    My problem:
          I want to read the ID3 tag somehow and display the artist name or anything in the ID3 tag, onto the screen.
    Complication:
         I Have the URL change through user input, and naturally I want to update all the information with the new ID3 tags information.
    var s:Sound = new Sound(new URLRequest('NEW URL here"));
    Thank you for any help!

    I know I took it out because it didn't work. I had something like this:
    var soundLoaderContext:SoundLoaderContext = new SoundLoaderContext();
    soundLoaderContext.checkPolicyFile = true;
    var music:Sound = new Sound(new URLRequest("URL #1 (from my server)"));
    var sc:SoundChannel;//sound channel
    var isPlaying:Boolean = false;//checks f music is playing or not
    var pausePoint:Number = 0.00;//this variable is for the pause function
    music.addEventListener(Event.ID3, id3Handler);
    stop_btn.addEventListener(MouseEvent.CLICK, stopMusic);//stop function call
    function stopMusic(e:Event):void//stop function
         if(sc != null)//if music is playing
              sc.stop();//stops the music from playing
              isPlaying = false;//sets it to false(off)
              playPause_mc.gotoAndStop(1);//modifies graphic item on stage
         pausePoint = 0.00;//resets pause value
    play_btn.addEventListener(MouseEvent.CLICK, playMusic);//pause / play function call
    function playMusic(e:Event):void//pause / play function
         if (isPlaying) {// if it is playing
              pausePoint = sc.position;pausePoint get curreny value (position of song)
              sc.stop();//stops the music from playing
              isPlaying = false;//sets it to false(off)
              playPause_mc.gotoAndStop(1);//modifies graphic item on stage
         } else if (!isPlaying){// if it is not playing
              sc = music.play(pausePoint);//starts the music from the pausePoint value.
              isPlaying = true;//sets it to true(on)
              playPause_mc.gotoAndStop(2);//modifies graphic item on stage
    music2_btn.addEventListener(MouseEvent.CLICK, music2);//function call (if music is clicked)
    function music2(e:Event):void{//this function stops current playing music and resets graphics, assigns a new URL and starts playing it.
         if(isPlaying || pausePoint != 0)
              sc.stop();
              playPause_mc.gotoAndStop(1);
         music = new Sound(new URLRequest("URL #2 (from my server)"));
         music.addEventListener(Event.ID3, id3Handler);
         sc = music.play();
         isPlaying = true;
         playPause_mc.gotoAndStop(2);
    music1_btn.addEventListener(MouseEvent.CLICK, music1);
    function music1(e:Event):void{//this function stops current playing music and resets graphics, assigns a new URL and starts playing it. just like above only a different song.
         if(isPlaying || pausePoint != 0)
              sc.stop();
              playPause_mc.gotoAndStop(1);
         music = new Sound(new URLRequest("URL #1 (from my server)"));
         music.addEventListener(Event.ID3, id3Handler);
         sc = music.play();
         isPlaying = true;
         playPause_mc.gotoAndStop(2);
    function id3Handler(evt:Event):void {
          var id3:ID3Info = evt.target.id3;
          trace(id3.artist + ' - ' + id3.songName);
          name_txt = id3.songName;
          album_txt = id3.album;
          artist_txt = id3.artist;
    This is mostly just taking the exact code from the website I mentioned earlier.
    When I run this it outputs the trace command 1 time and nothing more. Only the trace(trace(id3.artist + ' - ' + id3.songName);) gets triggered once.
    No errors. No warning. Not working.
    Thank you for helping me!

  • Is it possible to change fps during runtime? in Flash CS4 (AS3)

    hi,
    I was wondering if there is a way to change fps(Frames Per Second) during run time using AS3.
    is there? if so is it recommended? or is there a way to slow down the execution of the code(like adding a pause?)
    Thank you for attributing anything related!

    You can use the stage.frameRate property to eadr or set the fps rate during run time.  The only way to really pause code from executing is to build the paused code into a function and delay calling that function using some form of a timer (like setTimeout).

Maybe you are looking for

  • Customer Exit Variable and Condition in a Query (Sequence of Execution)

    Hi,   For a query i defined a Customer exit variable and a condition.... Which will first execute...wether it is a  Variable and then Condition or vise versa Is there any way we can control sequence of execution My requirment is first to execute the

  • How can I edit several lines to cut or replace one word

    I am trying to import a CD of an opera. When I put my CD in the reader, I get this (screen copy): I wish to erase all the ocurrences of "Wagner: Parsifal - Act 1:" and keep the rest of the line (the part written in German). How can I do this in one p

  • Matching quiz score doesn't work

    Hi, I have created a matching quiz question, after doing the quiz. in the results section the score is always zero and also it displayed you didn't completely finish this question!

  • Mobile Me galleries in iphoto

    How do I delete any trace of my mobile me galleries from my iphoto application? I have signed out of MM, but the online albums still appear in the side bar. I do not host any photos from this computer. Thanks

  • Printing with specific atributes

    Hello, We have a java application that prints out some forms. We need these forms to be printed as double-sided. The approach that we are using is to call printerJob.printDialog ()then we check if the selected printService supports double sided print