A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: Displaying Variables in Loaded Movie?

  1. #1
    Member
    Join Date
    Jul 2003
    Posts
    34

    Displaying Variables in Loaded Movie?

    Hello,

    I just upgraded to version 4, and am having some difficulty accomplishing what I wish to do. Can some one help?

    I have a pre-existing SWF file NOT made with Kool Moves. It is called song1.swf This file has 3 variables within it, Artist, Song, Album.

    I would like to make something in Kool Moves that loads the song1.swf and then reads the variables and displays them as text in my new movie.

    If someone can help me how to do this, I think I can get the rest on my own.

    Thanks !

  2. #2
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    You have to use the loadMovie command or "Import Flash Movie as an Object".
    After that,create a dynamic-text (or 3,as you wish).
    Use these lines for the root:

    a = _root.song1.Artist;
    txt1 = "Artist: " + a;
    ...
    c = _root.song1.Album;
    txt3 = "Album: " + c;

    that's all.


  3. #3
    Member
    Join Date
    Jul 2003
    Posts
    34

    Still not working

    Hello,

    I tried your advice, but I am still not getting anything. The text box does show "Artist:" but does not appear to be reading the variables into it.

    The file song1.swf was made with Swideo, and the settings were set for Flash 5.

    Any advice?

  4. #4
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890

    Re: Still not working

    Originally posted by btchwaxfan
    I tried your advice, but I am still not getting anything. The text box does show "Artist:" but does not appear to be reading the variables into it.
    The file song1.swf was made with Swideo, and the settings were set for Flash 5.

    Any advice?
    1) Be sure that the loaded movie is called "song1" (rename it !)
    2) Goto "Export Settings" and validate the "Backward Compatibility".
    3) Are you sure about the variables name ???

  5. #5
    Member
    Join Date
    Jul 2003
    Posts
    34

    my file

    Hello,

    I am still having no success. Here is my file. I believe the Variables are as I stated, but I have no way to look inside the file and be sure. Maybe Swideo made the file wrong?

    Thank you !
    Attached Files Attached Files

  6. #6
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    OK.
    Because you're a new KM user,I'll take a look at your file and you'll get (probably tomorrow) the "working" FUN file.

  7. #7
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    There're 2 "variables" inside that movie (song1.swf):
    Song = "FortyFive"
    Artist = "Atomic *****wax"
    Unfortunately,there're INVALID variables (I don't know the reason).
    For future developments,download and study this file:
    SoundTracks

  8. #8
    Member
    Join Date
    Jul 2003
    Posts
    34
    Hello,

    Thanks for looking into this for me. I looked at your example, very cool. I think it might actually solve my problem, by a different direction. I was considering making a MusList file as you had, but keep a list of Artists, Songs, and Albums in it. I'm not sure exactly how yet, but I think it should work.

    Cool site by the way. I liked your Load HTML. It raised a new question in my mind. Can I do something like that, where the links could LoadMovie?

    Thanks again!

  9. #9
    Junior Member
    Join Date
    Mar 2001
    Posts
    18

    reading the variables

    You must wait for the first frame to be loaded before trying to read the variables which are set in the first frame.

    -- SWIDEO

    http://www.swideo.com

  10. #10
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    As I promissed,here's the solution for your file (song1.swf).
    I don't like it,but you must live with that.
    Use KoolMoves and my method (SoundTracks) for future !
    cheers

  11. #11
    Member
    Join Date
    Jul 2003
    Posts
    34
    Hello,

    Thanks, again, for looking into this.

    But I think you zipped the wrong file. The fun included appears, and I could be wrong, to be the Load HTML file from your site.

    If you could, kindly, give me the fun file for Load Song, I think it will provide the answers I need. It sure appears to do exactly what I want it to.

    Thanks !!!

  12. #12
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    Ha ha ha ...
    Sorry !
    again:

  13. #13
    Member
    Join Date
    Jul 2003
    Posts
    34
    Thank you

    I've looked at the code, its straight forward. I see you saw what Swideo wrote, and implemented it, and I think I should be good to go.

    I'll post a link in a couple days to my completed project.

    Thanks

    (and thanks to Swideo for the last clue that made it work)

  14. #14
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    Originally posted by btchwaxfan
    I see you saw what Swideo wrote, and implemented it, and I think I should be good to go.
    The solution had nothing to do with that.
    (of course that the first keyframe must be loaded until you do anything).
    My SCANNER were unable to find the variables !
    I had to find another scanner to solve the problem.
    Anyhow,there's a third variable there (INVALID for sure !)
    cheers

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