A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Preloader

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    3

    Preloader

    Dear Friends,
    I am working on a project in flash CS3 and I made a preloader and when I simulate the preloader it works but when I link any file from the library for actionscript (linkage) I cant see the preloader anymore so please if you can help me I will be much appreciated
    Thank you

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    At first thinking I'm not sure you can preload something already in the library, but you could fake it by using a setInterval for a couple of seconds and then make the clip visible, however I might be wrong about being able to preload something already in the library

  3. #3
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    You could make your own fake style loader for internal clips like so,
    PHP Code:
    import mx.transitions.Tween;
    import mx.transitions.easing.*;

    this.attachMovie("Internal","onStage",1);
    onStage._alpha 0;
    onStage._x 100;
    onStage._y 100;
    new 
    Tween(onStage"_alpha"None.easeNone01005true);

    function 
    ShowLoad()
    {
        
    myText.text Math.floor(onStage._alpha);
        if (
    onStage._alpha == 100)
        {
            
    myText.text "";
            
    clearInterval(FadeIn);
            
    trace("Clear");
        }
    }
    FadeIn setInterval(ShowLoad1); 
    just swapping any names to your relevant names

  4. #4
    Junior Member
    Join Date
    Aug 2013
    Posts
    3
    Dear All,
    I think you didn't get my problem well and I will explain it one more time,
    I made the preloader and it is working well when I test the movie and goto (view-Simulate download) there I can see the preloader working properly but the problem is when I goto my library and link any of my movie clips to the action script(linkage) and test my movie again and goto (view - Simulate Download) my preloader disappear and I cant see it, so this is my problem if you can help I just want to know why when I link a movie clip from the library such thing happens

  5. #5
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    I'm still not sure what you mean by from the library, do you mean within the same swf library?
    If you do mean the internal library then the preloader will not show, as it's already loaded.
    Maybe make a link to your *.fla file, so we can see!

  6. #6
    Junior Member
    Join Date
    Aug 2013
    Posts
    3
    Dear friends,
    _I made a preloader and after the preloader I made a movie, so when I test the movie and goto in the SWF movie player (View_simulate download) I can see the preloader working properly and after the movie works, this is pont one.

    _the problem is I have more Movie clips in my library and I want to link them to the action script to be able to attach them one by one with action script, so I need to link them for action script, the main problem is when I link for example a movie clip to action script and test the movie again and going in the SWF to (View_simulate download I cannot see the loading bar anymore this is accure only when I link the movie clips in the library to action script and if I remove the link for action script from any movie I can be able to see the loading bar again in the SWF movie(View_Simulate Download I hope you understand me and thank you.

  7. #7
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    What code do you have for your preloader?
    How are you loading your clips from the LIBRARY?
    Is it attachMovie()?
    Is it movieClipLoader()?

    Make a downloadable link to your *.fla file !!

  8. #8
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    This is a common problem, and it occurs because your library item is exported to the first frame of your SWF file (you can't see it, but it is exported to the first frame so that you may use it later with actionscript). Flash actually has to load the first frame of your SWF file BEFORE you can actually see it, and since your movieclip is being exported to the first frame, it's taking longer to load the first frame of your SWF file because Flash needs to not only load your preloader, but also your movieclip. But, the preloader should be visible after a few seconds after the first frame has been fully loaded, so I'm not sure if that's the case in your case. But, just to see if it works, go to Properties of your movieclip, where you set the Linkage ID to your movieclip, and UNCHECK/UNTICK Export in first frame - and press OK. Then, make a blank keyframe at Frame 2, and manually drag and drop your movieclip there. Then, simulate download again, and see it works. Also, have you tried your SWF file in a browser, instead of simulating the download in Flash?
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center