Function to change mp3 and frame (video)

I am currently working on a music site that has a custom built mp3 player, where the action script calls to an external xml. It works beautifully. It is all on one frame.... in the background of the music player is edited video that I manipulate in final cut. I have next  and pre buttons that call the xml. What I am trying to do is change the video when the song is changed. Im not sure if I call a fuction to the button next frame + or - 1 or if I can call the video to the xml. I am a graphic designer learning code and am not sure how to tackle this. This site is my senior project..Please help!!!

remove the video code from that movieclip, assign that movieclip an instance name (eg, flv) and use:
<?xml version="1.0" encoding="ISO-8859-1"?>
<dren>
<song>
<title>Namasta</title>
<artist>Dren A.D.</artist>
<album>No Love Lost</album>
<url>songs/namasta.mp3</url>
<flv>whatever.f4v</flv>
</song>
<song>
<title>Hoooorn</title>
<artist>Dren A.D.</artist>
<album>No Love Lost</album>
<url>songs/hoooorn.mp3</url>
<flv>whateverelse.f4v</flv>
</song>
</dren>
/*-----------------Basic Variables-------------------*/
/* Request a URL */
/* lets you create a new Sound object, and load and play an external MP3 file into that object,  */
/* The sound Channel controls the sound in the application  */
/* This variable hold the  */
/* used to calculate the current position of the song, for instance if you were to pause the song  */
/* Used to Establish what song we are at, used for skipping songs  */
/* When a song is playing its set to true when the song isnt playing its = false  */
/* Creates Xml object so we can work with XML  */
/* XML list that contains methods so we can work with one or more XML elements  */
var getMusic:URLRequest;
var music:Sound = new Sound();
var soundChannel:SoundChannel;
var currentSound:Sound = music;
var pos:Number;
var currentIndex:Number = 0;
var songPlaying:Boolean = false;
var xml:XML;
var songlist:XMLList;
/*--------Simple preloader----------------------------------------*/
function loadProgress(event:ProgressEvent):void {
    var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
    percentLoaded = Math.round(percentLoaded * 100);
if(percentLoaded > 20){
trace("loading");
} else{
function completeHandler(event):void {
    trace("DONE");
/*-------------------Load in Our XML ------------------------*/
var loader:URLLoader = new URLLoader(); //create a new URLLoader Object
loader.addEventListener(Event.COMPLETE, whenLoaded); //add an event listener to that object
loader.load(new URLRequest("songs.xml")); //Requests our xml file that contains our song data
function whenLoaded(e:Event):void //WhenLoaded function(see line 50) runs when line 50 is complete
xml = new XML(e.target.data);
songlist = xml.song; //accesses our song tag in our xml file
getMusic = new URLRequest(songlist[0].url);//get music from songlist
music.load(getMusic);//load music
soundChannel = music.play();//plays the music
songTXT.text = songlist[0].title; //gets song name from xml
artistTXT.text = songlist[0].artist; //gets artist name
albumTXT.text = songlist[0].album;  //gets album name
flv.drenVid.source=songlist[0].flv
soundChannel.addEventListener(Event.SOUND_COMPLETE, nextSong);//runs the next song function when a song completes
/*--------ads some mouse events to our buttons----------------------------------------*/
next_btn.addEventListener(MouseEvent.CLICK, nextSong);
prev_btn.addEventListener(MouseEvent.CLICK, prevSong);
pause_btn.addEventListener(MouseEvent.CLICK,pauseSong);
/*--------Skips Songs----------------------------------------*/
/*-most of below the vars is explained above---------*/
function nextSong(e:Event):void
if (currentIndex < (songlist.length() - 1))
currentIndex++;
else
currentIndex = 0;
var nextReq:URLRequest = new URLRequest(songlist[currentIndex].url);
var nextTitle:Sound = new Sound(nextReq);
soundChannel.stop();
songTXT.text = songlist[currentIndex].title;
artistTXT.text = songlist[currentIndex].artist;
albumTXT.text = songlist[currentIndex].album;
soundChannel = nextTitle.play();
flv.drenVid.source = songlist[currentIndex].flv
songPlaying = true;
currentSound = nextTitle;
soundChannel.addEventListener(Event.SOUND_COMPLETE, nextSong);
/*--------Previous song and acceses the information in the xml File--------------------------*/
/*--------most of below the vars is explained above-------------------------*/
function prevSong(e:Event):void
if (currentIndex > 0)
currentIndex--;
else
currentIndex = songlist.length() - 1;
var nextReq:URLRequest = new URLRequest(songlist[currentIndex].url);
var prevTitle:Sound = new Sound(nextReq);
soundChannel.stop();
songTXT.text = songlist[currentIndex].title;
artistTXT.text = songlist[currentIndex].artist;
albumTXT.text = songlist[currentIndex].album;
soundChannel = prevTitle.play();
flv.drenVid.source = songlist[currentIndex].flv
songPlaying = true;
currentSound = prevTitle;
soundChannel.addEventListener(Event.SOUND_COMPLETE, nextSong);
function pauseSong(e:Event):void
pos = soundChannel.position; //pause song at current position
soundChannel.stop(); //stop sound
songPlaying = false; // songPlaying is now equal to false
play_btn.addEventListener(MouseEvent.CLICK,playSong);
function playSong(e:Event):void
if(songPlaying == false) //if songplaying is equal to false run function below
soundChannel = currentSound.play(pos); //play from current position(used if it was paused)
soundChannel.addEventListener(Event.SOUND_COMPLETE, nextSong);//run nextSong function if current song is complete
songPlaying = true; //songPlaying is now true
play_btn.removeEventListener(MouseEvent.CLICK,playSong);

Similar Messages

  • Stalling downloads: MP3s and youtube videos, etc

    I have a persistent problem with both my G4 Powerbook and my G5 iMac using Airport Extreme cards on a wi-fi network ... when I download large files like youtube clips or MP3s or software they typically stall after 4-6 MB has downloaded. I called support for the wireless Ativa router and we changed the MTU (max transmission unit) on the router.... things are working fine for downloads on the desktop that the router is connected to, but I haven't solved the problem for my wireless yet.... Any advice?
    Cliff

    Technically, this isn't a problem with Leopard but I did find this page with an instruction for fixing the problem:
    http://forums.techguy.org/networking/665395-ativa-wireless-router-help-please.ht ml
    Apparently, the router has a firewall and the typical NAT layer protection and the person is saying to turn off the firewall.
    YMMV

  • Sync mp3 and/or video from iTunes to WM 5

    I have a T-Mobile Dash with Windows Mobile 5.
    I have about 85 mp3's and a few .wmv video files I'd like to load onto my handheld (I have a memory chip installed)— from my Mac (which is 0S 10.3.9).
    Missing Sync will not link Windows Mobile 5 to OS 10.3.9.
    I don't want to sinc calendar or e-mail. I just want to music and, if possible, video from my Mac. Any way to do this directly form my Mac to my Dash? Thx

    My digital camera records video in AVI format.
    AVI is a container, not a format.
    I just tried the "Add to Library" in iTunes and nothing happened. Maybe iTunes does not support AVI?
    You need to use a tool such as MPEG Streamclip to convert them to MPEG-4 first.
    (53864)

  • Can I use iMovie to create a video for youtube using an MP3  and a video?

    I have some music I've recorded on Logic Pro that I'd like to post on youtube and am trying to figure the easiest way to link it with either still photos or a video so it'd be OK for youtube. What's the best way to go about this please?

    just drag 'n drop your jpg and your mp3 into the timeline of your Project - done.
    Depending on what version of iM you're using, you can directly upload from within iMovie, or you have to export first, then use YT's upload web interface ...
    in case you own a licence of Quicktime Pro,  open a jpg with it, open in a 2nd window your mp3, select all, copy, paste to picture - done .. no 'fullsize editor' needed.

  • Automatically switching between Visualization and Music Video modes

    While playing back a mixture of both music (mp3s) and music videos is it possible to automatically have the video output switch between the visualizer for mp3s and the music videos themselves?
    Any help would be appreciated.
    Eric.

    I see about 30-80 MB memory usage increase while switching to fullscreen and it is falling back while switching back to normal mode.
    I think the "freeing" of the memory is to agressive and produces such "lags."
    @Adobe: This should be optimized with the next versions.
    Update:
    With the Plash Player plugin (Firefox Nightly/Opera Next) it is worse and with Active-X (IE9) it seems to be ok.

  • GarageBand 11 - my track won't let me select, as I did with GB '08. Also unable to change tempo and pitch of imported MP3 songs.

    I have a Mac desk top. I think my operating system is IOSx 6. Snow leopard.  II used to have GarageBand 08 and was able to select my imported MP3 audio, as well as change the tempo and pitch of a song. GarageBand 11 is not allowing me to do any of that. I am at my wits and end and thinking about buying an expensive editing program since I have spent hours researching, to no avail.  I used to use the AU pitch option in '08 version but I can't even see options to edit MASTER TRACK, in order to select AU PITCH from the drop down menu.

    Susie Alverson wrote:
    GarageBand 11 is not allowing me to [change pitch and tempo]
    http://www.bulletsandbones.com/GB/GBFAQ.html#changeimporttempogb6
    This FAQ entry also offers a Minute GarageBand video tutorial
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • When I use the selection tool to move vector points and bend edges, I only see the change in wire frame.

    When I use the selection tool to move vector points and bend edges, I only see the change in wire frame.  Once I commit by letting go of the mouse button, the object does change.  It just previews with a wire frame. I would like to see the preview change on the solid object.  Is there a setting somewhere?
    I sure hope I am explaining this for people to understand .
    Thanks
    Ed

    Hi Ed,
    What do you mean by wire frame??And are you using selection or sub-selection tool since you have mentioned about vector point I doubt if it is sub-selection tool.Could you please attach a video demonstrating the issue where we see the mismatch in the preview and the output, so that we can understand the problem better and try to resolve it.
    Thanks,
    Sangeeta

  • Downloading mp3s and videos with Safari?

    I tried searching through the topics and what-not and came up with nothing...
    I buy a lot of fitness products online and a lot of them include videos, mp3 interviews, etc.
    When I click the links for the mp3s it just opens the page to play it but I cannot download it. Same thing with videos. Just opens a new frame and plays it there. No way to download.
    Is there a way to get Safari to download these files? Or do I need to just download firefox again and do it that way?
    Thanks

    How to download Flash videos and play them in Quicktime using Perian is explained here:
    http://perian.org/#watch
    It's the video at the bottom of the page.
    Also, there is the Free iTube Grabber which can capture almost any audio and/or video stream (it says here:)
    http://www.versiontracker.com/dyn/moreinfo/macosx/10972178
    Firefox Download Helper is also supposed to work, you have to be logged into YouTube first.
    and the RealPlayer Downloader that comes with RealPlayer 11 for Mac from:
    http://www.versiontracker.com/dyn/moreinfo/macosx/15540
    which also downloads videos from YouTube.

  • When I apply smoothing to a clip, it does nothing and the video frame remains static! Please Help!

    When I apply smoothing to a clip, it does nothing and the video frame remains static. As opposed to moving around in order to compensate for my movement, which exposes black edges. That is what I am trying to get. Please help
    These are the steps I follow. Import clip > Library > Behaviours > Motion > Stabilize. I then add the stabilize > go to inspector and change method to smooth and finally, analyze. However, it is not doing anything. My Macbook Pro was recently replaced and this is what I recall doing on my previous one, but it doesnt seem to be working for me. Is there a step im missing or something?
    Thanks for any help!

    Smooth is just going to smooth out a little "jitter" or jerkiness in the footage. Unless there is a lot of camera movement, you won't notice much. If you really want to see Motion go to work, change the Method to Stabilize.
    BTW, once the footage is analyzed, you can make any changes you want to any of the other parameters - you don't have to re-analyze. I recommend Stabilize with Adjust: Position Scale and Rotation and Borders set to Zoom (depending on the quality of the video) — or you might consider adding a mask to the group the stabilized video is in

  • MP3 AND VIDEO FILES FREEZE/SKI

    Hi,
    Just recently my sound for my Creative Inspire 4. 4400 has been messed up. I will listen to MP3s or watch video files and my sound/video just starts to freeze/skip. I have reinstalled drivers 3 times and no go .. someone please help !!

    The Inspire 4. 4400 is a speakerset, it doesn't use any drivers and doesn't produce any sound, the soundcard does.
    Do you know which soundcard you have? Which drivers did you download?
    Cat

  • Ever since I downloaded the version 6.0, my youtube video's and other video's won't play and are halted. Is their a setting I need to change now ?

    When going to youtube.com in it's own tab, every video comes on to play for a few seconds and is halted with no way to play the entire video again. I can watch a youtube video in facebook but it too is kept from streaming smoothly. When editing my photos and video's offline for my camera. The software performs flawlessly on my computer as always. I run Norton 360 premium edition. no bells or whistles. I run the add on for you tube as i always have from firefox. Is there some setting i need to change now with this version 6.0? 5.0 worked fine also. When I watch a video I uploaded to weather.com now, I get flawless audio without the video to see. My 4GB Ram is peaking out running firefox now. Not sure if having many tabs left open is affecting the performance and the videos. it did not do so with 5.0 as it does with 6.0. Thanks

    Shockwave Flash 11.5 r502
    Shockwave Flash 16.0 r0
    Having more than one version of a program may cause issues.
    Grab the uninstaller from here:
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html Uninstall Flash Player | Windows]'''
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html Uninstall Flash Player | Mac]'''
    Then reinstall the latest version.
    Separate Issue; Update your
    Flash Player '''v16.0.0.235 http://get.adobe.com/flashplayer/'''

  • I just put Facetime on my MacBook and Ipad. I can connect and recieve video but no sound. The other person can hear me. If I use Skype everything works fine. I can't find any where in Facetime to change settings for the audio. Any suggestions

    I just put Facetime on my MacBook and Ipad. I can connect and recieve video but no sound. The other person can hear me. If I use Skype everything works fine. I can't find any where in Facetime to change settings for the audio. Any suggestions

    Options for when an iOS device gets locked because of forgotten passcode:
    Restore (and reset passcode) on your device by connecting it to the last computer to which it was connected:
    iTunes: Backing up, updating, and restoring iOS software - http://support.apple.com/kb/HT1414
    If you cannot connect it to the computer to which the device was last connected (or the device was never connected to a computer) you will have to use recovery mode to completely reset the device, losing all data:
    iOS: Unable to update or restore - http://support.apple.com/kb/HT1808 - recovery mode (e.g., cannot connect to computer last used to sync device, iTunes still asks for a password)
    If recovery does not work there's:
    DFU mode: http://osxdaily.com/2010/12/04/ipad-dfu-mode/
    How to put iPod touch / iPhone into DFU mode - http://geekindisguise.wordpress.com/2009/07/16/how-to-put-ipod-touch-iphone-into -dfu-mode/

  • How can I download music files (MP3) and video files (AVI) to iPod Nano?

    I just want to download music files (MP3) and video files (AVI) to my son's iPod Nano and iTunes has all menus grayed out, can't get on Apple support site to upload diagnostics file. Driving me mad - should be simple...  Please help!!! Dump of diagnostics below:
    Microsoft Windows XP Professional Service Pack 3 (Build 2600)
    INTEL_ DG41RQ__
    iTunes 11.1.3.8
    QuickTime 7.2
    FairPlay 2.5.16
    Apple Application Support 2.3.6
    iPod Updater Library 11.1f5
    CD Driver 2.2.3.0
    CD Driver DLL 2.1.3.1
    Apple Mobile Device 7.0.0.117
    Apple Mobile Device Driver 1.64.0.0
    Bonjour 3.0.0.10 (333.10)
    Gracenote SDK 1.9.6.502
    Gracenote MusicID 1.9.6.115
    Gracenote Submit 1.9.6.143
    Gracenote DSP 1.9.6.45
    iTunes Serial Number 0012B9B00CB27BC0
    Current user is an administrator.
    The current local date and time is 2013-12-22 23:15:54.
    iTunes is not running in safe mode.
    WebKit accelerated compositing is disabled.
    HDCP is not supported.
    Core Media is not supported. (16002)
    Video Display Information
    ATI RADEON XPRESS 200 Series
    Intel(R) G41 Express Chipset
    **** External Plug-ins Information ****
    No external plug-ins installed.
    **** Network Connectivity Tests ****
    Network Adapter Information
    Adapter Name:        {E4F794BB-151F-490C-8AC0-1EDB6DA3718A}
    Description:             D-Link DWA-125 Wireless N 150 USB Adapter(rev.A2) - Packet Scheduler Miniport
    IP Address:              192.168.5.104
    Subnet Mask:          255.255.255.0
    Default Gateway:     192.168.5.1
    DHCP Enabled:       Yes
    DHCP Server:          192.168.5.1
    Lease Obtained:      Sun Dec 22 21:35:11 2013
    Lease Expires:         Mon Dec 23 21:35:11 2013
    DNS Servers:          91.216.105.75
                                    216.93.191.228
    Active Connection:  LAN Connection
    Connected:              Yes
    Online:                     Yes
    Using Modem:         No
    Using LAN:              Yes
    Using Proxy:            No
    Firewall Information
    Windows Firewall is on.
    iTunes is enabled in Windows Firewall.
    Connection attempt to Apple web site was successful.
    Connection attempt to browsing iTunes Store was successful.
    Connection attempt to purchasing from iTunes Store was successful.
    Connection attempt to iPhone activation server was successful.
    Connection attempt to firmware update server was unsuccessful.
    The network connection timed out.
    Connection attempt to Gracenote server was successful.
    iTunes has never successfully accessed the iTunes Store.
    **** CD/DVD Drive Tests ****
    No drivers in LowerFilters.
    UpperFilters: GEARAspiWDM (2.2.3.0),
    D: LITE-ON DVDRW SHW-160P6S, Rev PRS2
    Drive is empty.
    **** Device Connectivity Tests ****
    iPodService 11.1.3.8 is currently running.
    iTunesHelper 11.1.3.8 is currently running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    Universal Serial Bus Controllers:
    Standard Enhanced PCI to USB Host Controller
    Standard OpenHCD USB Host Controller
    Standard OpenHCD USB Host Controller
    Standard OpenHCD USB Host Controller
    Standard OpenHCD USB Host Controller
    Standard OpenHCD USB Host Controller
    Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27C8.  Device is working properly.
    Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27C9.  Device is working properly.
    Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27CA.  Device is working properly.
    Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27CB.  Device is working properly.
    Intel(R) 82801G (ICH7 Family) USB2 Enhanced Host Controller - 27CC.  Device is working properly.
    FireWire (IEEE 1394) Host Controllers:
    Texas Instruments OHCI Compliant IEEE 1394 Host Controller
    Connected Device Information:
    IPOD (K:\), iPod nano (7th Generation) running firmware version 1.0.2
    Serial Number:         DCYK27TGF0GT
    Bus Speed:              61440
    **** Device Sync Tests ****
    No iPod, iPhone, or iPad found.

    Hi fkerrin!
    In case you haven’t already tried this process before, here is an article for you about syncing media to the iPod:
    iTunes: Syncing media content to iPod
    http://support.apple.com/kb/ht1351
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • How can i change the last frame in a trailer i have converted.  everything else is fine but the wording is wrong on the final "credits" and don't know how to edit after converting it to a project.  Thanks to All.

    looking to edit the final frame which is the the "credits" section.  I have already  converted the trailer.  Is it too late to correct some nserts in the credits?
    Thanks to all.

    If by "converted" you mean that you've converted the trailer to a normal project using the menu option File>Convert to Project, then YES it is still possible to edit the Credits Title.
    In the converted project, double-click on the blue Title bar that sits above the background clip. In the Viewer, double-click on the text you wish to change (or highlight text by dragging over it). Now you can replace the highlighted text by typing in the new text. You can also change fonts and font colours.
    It's always good practice to duplicate the Trailer before converting it. To do this, while in Project Library view, click on the Trailer name in the Library then select File>Duplicate Project. A copy will appear in the Library with the same name as the Trailer, but with the number 1 appended. You can rename this copy as desired. Now, convert the duplicate to a standard project and continue with your editing as required. You now have the original Trailer in template form (which can be further edited), and can duplicate it again if required.
    John
    EDIT: Regarding my first sentence - just noticed that you did mention "converting it to a project" in you topic header. Sorry!
    Message was edited by: John Cogdell

  • Changed TV out to off but ipod still only plays audio and no video

    Just recently my ipod decided not to play video. All the videos in the video folders are gone and now appear in the music folder. Even the video podcasts no longer appear in the video podcast folder. I have changed the TV to out to off and still it continues to do the same thing. I am not sure what happened, I don't believe I changed any settings or anything. I would hate to reset the ipod and lose everything. Need help, thanks.
    Compaq Presario 1500   Windows XP   2 ghz 256 mb ram laptop

    It plays fine on my other pc, but I only get audio and no video when I open it on this pc. It shows up like static lines on a tv that has bad reception.
    Open your QuickTime control panel (either via the Control panels, or by going "Edit > Preferences > QuickTime Preferences" in the Quicktime Player). In the Advanced tab, uncheck Enable Direct3D video acceleration:
    ... and click OK. Quit and restart the QuickTime Player prior to checking to see if the settings change has had any effect.

Maybe you are looking for

  • Energy System Preferences NOT SAVING...

    I'm trying to set my computer to wake at a certain time. i've checked the box and entered the time/date i want the computer to start up in system settings, then LOCK the changes. when i go back to system settings a few seconds later, my settings are

  • Solution is not reflecting from SMSY to SMD

    Hello Experts, I have finished configuring SMD and now I am adding SMD agents in remote systems so that they can be seen in my SMD. The problem which I am facing is that when I create a solution in Solution manager I cannot see that solution in my SM

  • HT1661 I am trying to migrate using firewire to a new mac.

    When cables are connected and the old mac is rebooted as target disc the new mac cannot see the old mac to start migration. I have update all software. (old mac 10.6.8 and new mac is 10.7) any ideas. The new mac asks: 'make sure both computers are co

  • How to... Integrate BI Document Store and SAP Analytics Applications

    Currently we are trying to implement the how to document mentioned above. What we are trying to realize is to implement a textbox functionality in a SAP BI dashboard. The how to is written in 2006 for SAP EP SP8. We are using now SP16 and the whole p

  • Need to purchase a Director 11.5 license

    Greetings. It's a long story, but I need to purchase a 11.5 license.  I don't want a 12 license because I don't want to update the 11.5 legacy stuff that we have. Couldn't purchase via the store so I'm hoping there is another way. Thanks.