Results 1 to 3 of 3

Thread: Song position in swishscript

  1. #1
    Maximum Bitrate DiNASTY's Avatar
    Join Date
    Mar 2005
    Location
    Concord, California
    Posts
    598

    Song position in swishscript

    Hello all,

    I figured out how to get a custom song position bar in flash using the CURRENTTRACKTIME and TRACKTIME labels.

    First parse and split the varibles in flash:

    totalmin = parseInt (TRACKTIME); //returns minutes
    totalsec = TRACKTIME.slice(3,6); //returns seconds
    currentmin = parseInt (CURRENTTRACKTIME);
    currentsec = CURRENTTRACKTIME.slice(3,6);


    Then do some math and use the return value in your movie!!!

    frame = int((((currentmin*60) plus currentsec)/((totalmin*60) plus totalsec))*100);
    songpos.gotoAndStop(frame);


    Here is a screenshot of a "purchased" skin that I'm doing for someone with a 12.5 LCD. note the dark grey songpos bar UNDER the track information.


  2. #2
    Maximum Bitrate DiNASTY's Avatar
    Join Date
    Mar 2005
    Location
    Concord, California
    Posts
    598
    Just to reiterate, the last bit that says: songpos.gotoAndStop(frame);

    That is just telling the sprite which is named "songpos" to go to frame 1 - 100 based on the position of the song. For example, the songpos sprite could contain a bar that is squished to 1 pixel wide at frame 1 and stretched out to full 100% at frame 100.
    Beer is proof that God loves us and wants us to be happy Benjamin Franklin

  3. #3
    Maximum Bitrate tundra2000's Avatar
    Join Date
    Mar 2006
    Location
    Houston, TX
    Posts
    551
    sry to thread ressurect, but i want to do somethin like this. i put all the

    totalmin = parseInt (TRACKTIME); //returns minutes
    totalsec = TRACKTIME.slice(3,6); //returns seconds
    currentmin = parseInt (CURRENTTRACKTIME);
    currentsec = CURRENTTRACKTIME.slice(3,6);

    in the onload section. what do i do with the rest of that stuff? it all makes sense when i look at it, but im just a noobie to this flash stuff and im not sure where everything goes. i have a sprite called songpos, and under that is a picture of a bar which is 1% of its length at frame 1 and 100% of its length at frame 100. that part works i just dont know how to make my song position control the frame. do i need some RR labels other than TRACKTIME and CURRENTTRACKTIME in my RR skin? thanks

Similar Threads

  1. Occasional Song List Hickup with XM
    By chuckster in forum Road Runner
    Replies: 5
    Last Post: 11-25-2005, 12:09 PM
  2. Replies: 2
    Last Post: 08-31-2005, 11:38 PM
  3. Requests..... Please
    By camsgs3 in forum Centrafuse
    Replies: 299
    Last Post: 07-28-2005, 02:22 AM
  4. Rescaling skin an song position slider problem
    By Passe in forum RR Bug Tracker
    Replies: 3
    Last Post: 02-23-2005, 11:34 PM
  5. X-MP3Pad: Beta testers needed... Please read!
    By PorscheMP3 in forum Software & Software Development
    Replies: 0
    Last Post: 08-22-2002, 11:55 AM

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
  •