A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: [RESOLVED] [F7,F8 actionscript1] Preloader

  1. #1
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160

    resolved [RESOLVED] [F7,F8 actionscript1] Preloader

    i have tried this many times but i dont know why? problem i face is that when my swf file starts preloading the html page does not show this swf file untill the progress percentage is 60%. after that it shows my preloader.. i am 101% sure that my preloader is working FINE. just want to know if this is an issue with the browser or may be some other

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    are you using components ?
    or have items in the Library with Linkage Identifiers (sounds, fonts, mc's ) ?

    all items with Linkage will load before the preloader, hence your 60% lag

    this link might help -

    Advanced Flash Preloader
    Learn how to properly preload Flash movies that use components.
    http://www.gotoandlearn.com/download.php

  3. #3
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    Thanks
    Yes, i am using linkage identifier from the library as you said BUT the linkage is brought on stage ONLY after the preloading is complete. The preloading starts in the very first frame. once it is 100% done it starts to play with the next frame.. so its only "after the preloading" that my linkage happens. i am sure of that.
    to be more specific. the first frame is just a normal preloading and then as soon as it is 100 % the next frame has the Linkage script wher i have attached a movie clip. so this frame is executed only when the "IF condition for 100%" is true.
    Last edited by deepakflash; 08-19-2007 at 07:13 AM.

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    Flash considers that any item with a Linkage identifier in the Library
    does not occupy any physical space on a timeline, so it loads
    it before frame#1 to ensure that it is ready for use when required.

    hence your preloader lag

  5. #5
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    thanks for ur very valuable information.. actually i had been using library linkage in the same file but in scene NO:6... but then i did not get this problem.. only now when i am using it in my scene 1, i have this problem.. "Is ther any solution for this".. 'cos i really can not avoid using attachmovie from library as ther are instances wher i remove these movieclips when specific buttons are clicked ( in the later part of the file).

  6. #6
    Noob who tries to make a game
    Join Date
    Aug 2006
    Location
    look behind you...
    Posts
    75
    why not make the preloader linkage so it too loads before everything else? or is that not possible?
    if ever there was someone dragging along behind a pickup truck it'd probably be me

  7. #7
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    simplest method -- remove all Linkage
    place movieclip content on frame#2 of movieclip
    make frame#1 blank with stop action

    when you need the clip -
    clipInstanceName.gotoAndPlay(2);

    to hide the clip -
    clipInstanceName.gotoAndStop(1);

    to completely remove the clip -
    clipInstanceName.swapDepths(1000);
    clipInstanceName.removeMovieClip();

  8. #8
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    thanks Its Working !!!! I also made use of loadmovieNum in two other places... my work is now 85% done.. i need to fix this now.
    I want to pass a variable from my main swf file to a tiny external swf file that is just 2 KB .
    I loaded this swf using my loadMovieNum.. its like this,
    1) In my main swf ........
    PHP Code:
        loadMovieNum("dreamer.swf"6);
        
    _level6.getstrngImg="http://images.google.co.in/images?gbv=2&svnum=10&hl=en&q="
    2) I want this getstrngImg to be sent to dreamer.swf so that i can use this string for my further manipulation.

  9. #9
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    Code:
    loadMovieNum("dreamer.swf", 6);
    
    this.onEnterFrame = function(){ // loop at FPS
    if(_level6){ // content in level = true
    _level6.getstrngImg="http://blah";
    this.onEnterFrame = null; // end loop
    }
    };

  10. #10
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    i dont think i can use OnEnterFrame just becos i trigger my LoadMovieNum for the purpose of my Right click function... infact i tried this OnEnterFrame to trace the number of bytes loaded in my external swf through my main swf. but it shows Undefined

  11. #11
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    I tried ur code buddy.. its not working still i cant figure out why? is ther really a way to pass a variable from one swf to another when i use loadMovieNum?

  12. #12
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    its working when it is a number
    PHP Code:
    _level6.getstrngImg=20
    it gives undefined if its some string,
    eg:
    PHP Code:
    _level6.getstrngImg="blablastring"
    Last edited by deepakflash; 08-20-2007 at 12:33 PM.

  13. #13
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    Its workng fine.. i just tried out this way... the string i passed as a function containing the string as the parameter.. it worked Neat .. thanks a lot for helping

    PHP Code:
    loadMovieNum("dreamer.swf"6);
    this.onEnterFrame = function(){ 
    if(
    _level6){ 
    _level6.ask("Video URL");// this string is passed to the function of my loaded swf
    this.onEnterFrame null// end loop
    }
    }; 
    Last edited by deepakflash; 08-20-2007 at 01:31 PM.

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