Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

A very odd idea

Explorer ,
Jun 10, 2013 Jun 10, 2013

So I've been working on a little flash media player (only plays music) and I want to add an option where you can click the name of a song and it'd play it.

Doesn't seem too complex, corrent? Well I'm stuck.

What I have added:

Play, Pause, Reverse (goes back 1 song), and fast forward (goes forward 1 song)

Song data display (shows title and artist of each song)

Scrollbar (To scroll through the songs (Broken temporarly, idk why))

Array to place all the Movie clips (1 per song) in a box so you can click them.

and some other stuff.

The issue:

I can't pinpoint a good way to figure out what song is clicked for the player to know which song to switch to.

It loads via xml and plays using an int. The current_song int can only go as high as there are songs within the xml. If it goes further it resets to 0 and starts the list over.

So what I need it to do is set each song item within the array of movie clips to a number. When clicked the current_song int would change to that number, and then play the selected song.

I'm sorry if I'm confusing you. I'll try and explain better if you can't understand.

TOPICS
ActionScript
610
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 10, 2013 Jun 10, 2013

Whatever list/combobox you are presenting for making the choices should carry the number as a piece of data... show the song title as the label but assign the number as the data for that entry.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 10, 2013 Jun 10, 2013

I got everything working correctly.

But as soon as I upload it to my web host, it doesn't work.

It works locally if I run the .swf natively, and if I run the html locally.

But online it won't work.

What could be causing this?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 10, 2013 Jun 10, 2013

It could be missing a file or more.  Make sure your xml and sound files are all where they need to be relative to the html/swf.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 10, 2013 Jun 10, 2013
LATEST

It's not missing anything from what I see. I re-uploaded everything that I was using locally. Still got the same bug.

I think it's something to do with my webhost.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines