dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Symbol linkage + preloading problems solved

  1. #1
    Junior Member
    Join Date
    Jul 2000
    Posts
    27

    Symbol linkage + preloading problems solved

    I had trouble when trying to display preloading information on movies that had exported symbols from their libraries, in my case sound clips if you are trying to control that sound using ActionScript.

    My solution was to create a seperate 30x30 movie with the sound clip imported. Export that sound as you would in the main movie and in frame one place the following script:

    sSound = new Sound(_root);
    sSound.attachSound("LinkedSound");

    In frame two place the following script:

    stop();
    _level0._root.sSound_loaded = true;

    These scripts allow the sound object "sSound" to be controlled externally by the host movie. Because the linked symbol must load before even the first frame, the variable _root.sSound_loaded wil be set to "true" in the main movie only when its done loading.

    In the host movie simply use the following command to load the sound movie into level1 (above the current layer):

    loadMovieNum ("sSound.swf", 1);

    From the host movie you can issue commands such as "_level1.sSound.setVolume(x);" to control the volume of the clip, "_level1.sSound.start(0,1);" to start it, or use any other Sound object commands you desire.

    Additionally you can query the preload status of the movie whilst it's loading in a similar manner by using the command "_level1.getBytesLoaded();", but for complete peace of mind ensure to check the variable "_root.sSound_loaded"

    Once again this gives the flash developer ultimate control over exported symbols in your movie's libraries.

  2. #2
    Junior Member
    Join Date
    Jun 2001
    Posts
    8

    thanx

    Thanx for this post, it helped me a lot with my project! It works great! Leos

  3. #3
    Member
    Join Date
    Jan 2003
    Location
    berlin
    Posts
    88
    i tried same thing with embeded fonts
    and it simply don't works.

    my fla's r attached, in a case i made some stupid mistake.

    if u test main movie u wont see anything, but if u uncomment
    this line:
    _root.my_txt.embedFonts=true;

    u will see the text but the only a standard font, not the embeded one

  4. #4
    Member
    Join Date
    Jan 2003
    Location
    berlin
    Posts
    88
    sorry here r the fla's
    Attached Files Attached Files

  5. #5
    Member
    Join Date
    Jan 2003
    Location
    berlin
    Posts
    88
    there is bug in mx and that is: as soon as u say Export for Actionscript u r automaticly saying Export in First frame
    even if u DO NOT check it.
    and without Export for Actionscript u can't say someting like this
    my_fmt.font="s1";//where si is linkage of my font in lib.

    all i wont is to prevent "Export in First frame" be turned on but to have the "Export for Actionscript" so i can us the linkage id of the embeded-font like:
    my_fmt.font="s1";


    anybody knows the solution?

  6. #6
    Junior Member
    Join Date
    Sep 2003
    Location
    Azerbaijan
    Posts
    12
    Mediaholic, this seems to be a major problem. And this is the main problem I'm trying to solve right now...

    Any help anyone?
    Your protection needs a little more protection...

  7. #7
    Member
    Join Date
    Jan 2003
    Location
    berlin
    Posts
    88
    see this link
    http://www.kirupaforum.com/forums/sh...threadid=32004

    there is a solution.

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