I am working through an audio player demonstration in the book "Foundation Actionscript 3.0". When I try to publish my AudioDemo_final.FLA file I get the following error, "Adobe Flash CS3 - Error creating flash movie file. Destination directory does not exist. Change your publish settings."
The following is displayed in my output panel >> Error opening URL 'file:///C|/Sites/flashcoder.net/FAS3/Audio/AudioDemo%5Ffinal.swf'
My file directory is set up like this: AudioDemo_final.fla song1.mp3 com.fas3.smc (folder) Main.as Sounds.as
//com.fas3.smc/Main.as
package com.fas3.smc {
import flash.display.MovieClip;
import com.fas3.smc.Sounds;
import com.fas3.smc.ButtonManager;
import flash.text.TextField;
import flash.display.SimpleButton;
public class Main extends MovieClip {
private var soundManager:Sounds;
private var buts:ButtonManager;
public function Main() {
soundManager=new Sounds(movScrubber, txtStatus, txtHeadPosition, txtTrackLength, txtArtist, txtTitle, volumeSlider, panSlider);
soundManager.loadSong( song1.mp3 );
addChild(soundManager);
}
}
}
//com.fas3.smc/Sounds.as
package com.fas3.smc {
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundLoaderContext;
import flash.media.SoundTransform;
import flash.media.ID3Info;
import flash.events.Event;
import flash.display.MovieClip;
import flash.net.URLRequest;
import flash.text.TextField;
import flash.utils.Timer;
import flash.events.TimerEvent;
import fl.controls.Slider;
import fl.events.SliderEvent;
public class Sounds extends MovieClip {
private var snd1:Sound;
private var sc:SoundChannel;
private var buffer:SoundLoaderContext;
private var timerLoading:Timer;
private var timerPlayHead:Timer;
private var timerFF:Timer;
private var timerRW:Timer;
private var timerSpectrum:Timer;
private var barWid:int = 200;
private var barHi:int = 5;
private var bytLoaded:int;
private var bytTotal:int;
private var pctLoaded:int;
private var trueChronoLength:Number;
private var txtStatus:TextField;
private var txtTrackLength:TextField;
private var txtHeadPosition:TextField;
private var txtArtist:TextField;
private var txtTitle:TextField;
private var movScreen:MovieClip;
private var movScrubber:MovieClip;
private var multiplier:Number;
private var nsMinutes:Number;
private var nsSeconds:Number;
private var pauseStatus:Boolean;
private var playHeadPosition:Number;
private var volumeSlider:Slider;
private var panSlider:Slider;
private var stVolume:SoundTransform;
private var tempVol:Number=0.5;
private var tempPan:Number=0;
private var trackEnd:Boolean;
private var trackStart:Boolean;
public function Sounds(movScrubber:MovieClip, txtStatus:TextField, txtHeadPosition:TextField, txtTrackLength:TextField, txtArtist:TextField, txtTitle:TextField, volumeSlider:Slider, panSlider:Slider) {
//Set movies and text fields to local references and to start positions and contents
this.movScreen=movScreen;
this.movScrubber=movScrubber;
this.txtStatus=txtStatus;
this.txtHeadPosition=txtHeadPosition;
this.txtTrackLength=txtTrackLength;
this.txtArtist=txtArtist;
this.txtTitle=txtTitle;
this.volumeSlider=volumeSlider;
this.panSlider=panSlider;
timerLoading=new Timer(100, 0);
timerLoading.addEventListener(TimerEvent.TIMER, onLoading);
timerLoading.start();
}
public function loadSong(song:String):void {
snd1=new Sound(new URLRequest(song))
snd1.addEventListener(Event.ID3, id3Handler)
}
public function onLoading(event.TimerEvent):void {
bytLoaded = snd1.bytesLoaded;
bytTotal = snd1.bytesTotal;
if((bytTotal >= bytLoaded)&&(bytLoaded > 0)) {
if(txtStatus.text!= Playing ) {
txtStatus.text= Loading ;
}
movScrubber.movLoaderBar.width=((bytLoaded/bytTotal) * 400);
if(bytLoaded == bytTotal) {
if(txtStatus.text= Loading ) {
txtStatus.text= Load Complete ;
}
timerLoading.stop()
}
}
}
}
}