Results 1 to 8 of 8

Thread: Flash <-> VB List Box and Playlists

  1. #1
    Variable Bitrate
    Join Date
    Dec 2001
    Location
    Paignton, Devon, UK
    Posts
    315

    Flash <-> VB List Box and Playlists

    Hi everyone! I have just sat down to some serious coding in flash / vb. Most of the audio and playlist side is finished, but I just wanted to know if anyone has any experience in listboxes in flash - the flash documentation said that there was a limit to the number of items that could be displayed in one per frame (I think it was about 400) which kinda rules them out for mp3 lists. So, I get the feeling I'm gonna be overlaying a vb list box over the top of the flash<->vb interface like Gutter did. If anyone thinks differently, or has any ideas let me know. Also, how do you guys prefer to deal with playlists? At the moment, my MP3 Car app can load a playlist but can't preview the tracks in it. This is likely to change as of a few days time but I'm not sure how I'm gonna lay the settings out - it may be an explorer drive style thing (can't remember what the component's called) where you click a playlist and see a summary of the files in it.

    Cheers for any help / ideas

    Andrew
    Mediabox Hardware Project
    Current Stage: A complete redesign, although not much happening right now!

    Mediabox Software Project
    Status: Writing Sync Software (still) and playing around with interface
    To do: Far too much!

  2. #2
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436

    Re: Flash <-> VB List Box and Playlists

    how are u passing the mp3 track titles back to flash?

    I am still reading a few flash books to get upto speed.... but I think I will stick with a pure VB solution for some time yet due to lack of time at the moment.... just need to finish off DivX playback support and tweak a few bugz.....
    Project - GAME OVER :(

  3. #3
    Variable Bitrate
    Join Date
    Dec 2001
    Location
    Paignton, Devon, UK
    Posts
    315
    I'm playing with this at the moment. Sending a single song title back is easy, but I'm not sure if flash can support reading a variable as an array - if it can then that would definitly make things easier!

    Good luck with the pure vb interface - it definitly makes some things easier!

    Cheers

    Andrew
    Mediabox Hardware Project
    Current Stage: A complete redesign, although not much happening right now!

    Mediabox Software Project
    Status: Writing Sync Software (still) and playing around with interface
    To do: Far too much!

  4. #4
    FLAC Gutter's Avatar
    Join Date
    Dec 1999
    Location
    Casina, Italy
    Posts
    901
    Using a VB listbox is the easiest way. When the flash animation signals that it's going to the playlist page, the listbox becomes visible. When you leave that page, the listbox hides. Not only that, but you can't tell it's a VB listbox. It blends in quite nicely.

  5. #5
    FLAC
    Join Date
    Apr 2001
    Location
    Here, There, Everywhere
    Posts
    1,436
    arrays would seem the logical thing to have.... alto I havent found anything to do with em...

    but since u set variables in actionscript using a string... maybe u can ref variables that way..... ? am I right in claiming this?

    "myarrray_1" / "myarray_2" / etc.... the '1' and '2' could be the element number?
    Project - GAME OVER :(

  6. #6
    Variable Bitrate
    Join Date
    Dec 2001
    Location
    Paignton, Devon, UK
    Posts
    315
    Just to report back on this one. I have tried to pass an array of values straight on from vb to flash in one operation - this would be the most efficient I feel. This isn't working though so I think I'll have to use a next statement to read each value out of the array in vb and pass it on to flash. I've been a bit busy to try this - partly stuck with another problem which is gonna be stupidly simple!

    I am an actionscript newbie. When a button is clicked I set a variable to menu1, menu2, menu3 or menu4 depending on which button was clicked. However when I come to read the value of the variable I use an if statement, but I can't seem to use an equals statement without it setting the value of the variable rather than reading it. I have to use a >= statement! This is driving me mad as although it works I can't seem to get it to work the better way!

    I've included some code - any help would be welcome!

    This is the actionscript on a button:
    on (release) {
    _global.menuchoice3="menu1";
    gotoAndPlay(55);
    }

    where frame 55 is the start of the fading out menu transition.

    This is the actionscript at the end of the animation, where it sorts out where it's going next!

    stop();
    if (_global.menuchoice3>="menu1") {
    gotoAndStop("turnoffmenu", 111);
    }
    if (_global.menuchoice3>="menu2") {
    gotoAndStop("turnoffmenu", 112);
    }
    if (_global.menuchoice3>="menu3") {
    gotoAndStop("turnoffmenu", 113);
    }
    if (_global.menuchoice3>="menu4") {
    gotoAndPlay("mainmenu", 1);
    }

    Now in VB if I wanted to read the value of the variable _global.menuchoice3 I would put if _global.menuchoice3="menu1" then whatever, but whenever I use just an = in the if statement in flash it just sets the variable value to it! Grrrr.

    Cheers

    Andrew Chappell
    Mediabox Hardware Project
    Current Stage: A complete redesign, although not much happening right now!

    Mediabox Software Project
    Status: Writing Sync Software (still) and playing around with interface
    To do: Far too much!

  7. #7
    Maximum Bitrate Jarrod's Avatar
    Join Date
    Jan 2002
    Location
    Melb, Australia.
    Posts
    475

    Attn: Andrew

    Use a double equals sign to use a conditional statement:

    if (_global.menuchoice3=="menu1") {
    gotoAndStop("turnoffmenu", 111);
    }
    if (_global.menuchoice3=="menu2") {
    gotoAndStop("turnoffmenu", 112);
    }
    if (_global.menuchoice3=="menu3") {
    gotoAndStop("turnoffmenu", 113);
    }
    if (_global.menuchoice3=="menu4") {
    gotoAndPlay("mainmenu", 1);
    }

    Otherwise you would be assigning the "menu#" variable to the menuchoice3 variable...like you have noticed.
    Jarrod - Holden VX S!

  8. #8
    Variable Bitrate
    Join Date
    Dec 2001
    Location
    Paignton, Devon, UK
    Posts
    315
    Cheers! I feel so stupid right now...

    Andrew
    Mediabox Hardware Project
    Current Stage: A complete redesign, although not much happening right now!

    Mediabox Software Project
    Status: Writing Sync Software (still) and playing around with interface
    To do: Far too much!

Bookmarks

Posting Permissions

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