The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development

Reply
 
Thread Tools Display Modes
Old 07-29-2002, 12:47 PM   #1
Registered User
 
Join Date: Dec 2001
Location: Paignton, Devon, UK
Posts: 315
My Photos: (0)
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!
Andrew Chappell is offline   Reply With Quote
Sponsored Links
Old 07-29-2002, 06:18 PM   #2
FLAC
 
Join Date: Apr 2001
Location: Here, There, Everywhere
Vehicle: None
Posts: 1,437
My Photos: (0)
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 :(
magnetik is offline   Reply With Quote
Old 07-30-2002, 12:08 AM   #3
Registered User
 
Join Date: Dec 2001
Location: Paignton, Devon, UK
Posts: 315
My Photos: (0)
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!
Andrew Chappell is offline   Reply With Quote
Old 07-30-2002, 10:48 AM   #4
FLAC
 
Gutter's Avatar
 
Join Date: Dec 1999
Location: Casina, Italy
Vehicle: 2001 Hundai Elantra
Posts: 901
My Photos: (0)
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.
__________________
Don't Click

Last edited by Gutter : 07-30-2002 at 10:51 AM.
Gutter is offline   Reply With Quote
Old 07-30-2002, 06:17 PM   #5
FLAC
 
Join Date: Apr 2001
Location: Here, There, Everywhere
Vehicle: None
Posts: 1,437
My Photos: (0)
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 :(
magnetik is offline   Reply With Quote
Old 08-01-2002, 06:19 PM   #6
Registered User
 
Join Date: Dec 2001
Location: Paignton, Devon, UK
Posts: 315
My Photos: (0)
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!
Andrew Chappell is offline   Reply With Quote
Old 08-01-2002, 07:49 PM   #7
Maximum Bitrate
Jarrod's CarPC Specs
 
Jarrod's Avatar
 
Join Date: Jan 2002
Location: Melb, Australia.
Vehicle: 2001 Holden VX S Commodore
Posts: 474
My Photos: (0)
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!
Jarrod is offline   Reply With Quote
Old 08-02-2002, 03:34 AM   #8
Registered User
 
Join Date: Dec 2001
Location: Paignton, Devon, UK
Posts: 315
My Photos: (0)
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!
Andrew Chappell is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT -5. The time now is 07:42 PM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics