[Flashcoders] Will Flash cache streaming mp3s?
Hiya, just a quick question I can't seem to find in the documentation. I am making an online flash app that streams mp3s. Once the user has listened to a song play once and then the function to loadSound is triggered again to play the streaming mp3 again, will Flash download the mp3 again from the server (thus using more bandwidth!) or will it play from a cached version? if so, how much is the default cache? Thanks! Dan ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Class to loop sound objects in order
Hi there, thanks for checking my post. I am trying to create a class that will play a number of mp3 loops each a specified number of times and in the specified order. I have tried to find an existing class but cant find one anywhere. My solution (which may not be that efficient), is to create all of the sound objects in the fla then load the mp3s into them. When they are all loaded each sound object is added to a new object that holds it as well as a 'loops' property that says how many times the sound object must play. These objects are then put into an array in the order they are to be heard. This array is passed to my LoopSound class that controls the playback. I can also pass a 'loopForever' property that will make the series repeat indefinitely. The problem I am having is re-triggering the play() function from within my LoopSound Class to move onto the next sound in the array. I am sure that there will be a much neater way of achieving what I want, and maybe even a pre-written class! Any direction / suggestions / encouragement much appreciated :) Thanks! Danny //this code would create an instance of the class in the FLA var mySound:Sound = new Sound(); mySound.loadSound("sounds/gas.mp3", false); //once sound is loaded: var my_ar:Array = new Array(); //create object to add to array var myOb:Object = new Object(); myOb.sound = mySound; //is to play 3 time myOb.loops = 3; my_ar.push(myOb); var myLooper:LoopSound = new LoopSound(my_ar) Here is the class: //this class is designed to play a number of already loaded sound objects sequentially, each sound object can be looped for a specified number of times then the whole series can be repeated infinitely. Th constructor is passed an array of objects that have sound and loop properties that contain a sound object and the number of times the sound object is to be looped. class LoopSound { private var sounds_ar:Array; //sound playing currently var currSound:Sound; //which stage of the array we are currently up to private var mp3Count:Number = 0; //if this series of loops is meant to keep playing until they are stopped private var loopForever:Boolean; //receives array that holds objects that have the key sound & loops public function LoopSound(a:Array, lF:Boolean) { trace("loopsound created:"+a); mp3Count = 0; sounds_ar = new Array(); sounds_ar = a; loopForever = lF; this.play(); } private function play() { trace("Loopsound started playing"); trace("mp3 count:"+this.mp3Count+":"+sounds_ar); currSound = sounds_ar[mp3Count]["sound"]; //creating local vars for targetting from currSound complete var mp3C:Number = mp3Count; var snds_ar:Array = sounds_ar; //calculate number of times mp3 is to loop var currLoops:Number = sounds_ar[mp3Count]["loops"]; currSound.start(0,currLoops); currSound.onSoundComplete = function() { //if there are more sound objects to play iterate thru array and retrigger play() if (mp3Counthttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Can I load AS2 swfs into an AS3 swf?
Hiya, the title sums up my question pretty well. I have a bunch of old swfs that are published to version 6 and are AS2. I want to load these into a movie published to v9 and in AS3 or maybe a flex app. Is this possible or do I have to converrt alll of my code? Cheers guys, Dan ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Lots of compiler errors after copying custom component
Hi there, I've made a compiled component with custom actions (a scrollbar). I have beeen using it fine in one movie but then found when I loaded this movie into another movie which had the old version of the component in it's library, the custom component wouldn't work in the other movie. To rectify this problem I copied the new component to the main movie and now I am getting lots and lots of compiler errors for the Tween class, BroadcasterMX class and onEnterFrame class saying 'Attribute outside of class' or 'The staement is not permitted in a class definition'. I'm not really sure what I've done wrong as the targetting of my classes seems correct and I haven't altered any of the class files that contain the errors. If anyone could guide me on this I would be really really grateful I am stumped! Thanks, Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] How to dynamically assign onRollOver events
Hiya, I am dynamically creating movie clips that I load external swfs into and want these movie clips to fire onRollOver events though I'm not sure of the syntax to do this. As you can see from my code i am loading the info from an XML file. If anyone knows how to do this I would be really grateful. Here's where I am at the mo (which does not work) var headTarget:MovieClip = race_mc["cage_mc"]["pic"+(i+1)+"_mc"]; race_mc["cage_mc"]["pic"+(i+1)+"_mc"].myName = xml.firstChild.childNodes[(courseNo-1)].firstChild.childNodes[i].nodeName; race_mc["cage_mc"]["pic"+(i+1)+"_mc"].onRollOver = function(){ trace("I AM A HEAD:"+this.myName) } Thanks everyone ! :) Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Controllingt he volume of multiple sound objects at the same time
That is just what i am lookig for eka thanks so much :) Enjoy yr weekend! Danny Hello :) in my opensource framework (VEGAS) i use a SoundLibrary class to manage my sounds... http://svn.riaforge.org/vegas/AS2/trunk/src/andromeda/media/SoundLibrary.as Exemple : {{{ import andromeda.media.SoundLibrary ; var lib:SoundLibrary = new SoundLibrary() ; lib.addSound( "sound_1" ) ; // sound in the library with the link "sound_1" lib.addSound( "sound_2" ) ; // sound in the library with the link "sound_2" lib.addSounds( ["sound_3", "sound_4"] ) ; // add an Array of sounds in the library lib.loadSound( "my_sound.mp3", "sound5" ) ; lib.loadSound( "sound6.mp3" ) ; // add the external sound and auto create the 'sound6' id of the sound in the library lib.setVolume( 50 ) ; // all sounds in the library changes the volume. lib.getSound("sound2").setVolume( 40 ) ; // change the volume of the 'sound2' Sound reference in the library. }}} This class inherit the SoundModel class : http://svn.riaforge.org/vegas/AS2/trunk/src/andromeda/media/SoundModel.as You can use an MVC pattern with this library with a global event flow etc.. This class is really easy to use :) Use the addSound or the addSounds ou the loadSound methods to register your local or external sounds.. You can find the VEGAS project page in Google Code : http://code.google.com/p/vegas/ You can find the tutorial to install VEGAS : http://code.google.com/p/vegas/wiki/InstallVEGASwithSVN You can find the documentation of my framework : http://vegas.ekameleon.net/docs You can find the SoundLibrary reference : http://vegas.ekameleon.net/docs/andromeda/media/SoundLibrary.html You can find the SoundModel reference : http://vegas.ekameleon.net/docs/andromeda/media/SoundModel.html You can see my AS2 opensource template AST'r .. in the sources of the project you can see my personal usage of my Framework.. in this context i use an external file of config to defines all sounds and i load an external sound to shared the sounds of the the application http://code.google.com/p/astr/ EKA+ :) 2007/7/6, Rákos Attila <[EMAIL PROTECTED]>: Sound objects associated with the same movie clip share their properties (volume, etc.), so if you change the volume through one of them, the change will be reflected by others, too. That is because in fact sound properties belong to movie clips and not the Sound objects, and Sound objects only reflect the sound settings of the associated movie clip. Attila =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From:[EMAIL PROTECTED] <[EMAIL PROTECTED]> To: flashcoders@chattyfig.figleaf.com < flashcoders@chattyfig.figleaf.com> Date:Friday, July 6, 2007, 4:44:25 PM Subject: [Flashcoders] Controllingt he volume of multiple sound objects at the same time --===-- Hey there. I am trying to control the volume of a number of sound objects that have their own individual volume levels. I want to be able to mute them or allow them to play at the volume that has been set for them. I was thinking that I could do this by storing the values in arrays and then looping through these each time the sound is muted/unmuted but I am sure there must be an easier way. Any suggestsions v gratefully received :) Here is what I have so far: var sound1:Sound = new Sound(this); sound1.setVolume(60); var sound2:Sound = new Sound(this); sound2.setVolume(20); sound1.loadSound('an.mp3', false); sound2.loadSound('another.mp3', false); ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Controllingt he volume of multiple sound objects at the same time
Hey there. I am trying to control the volume of a number of sound objects that have their own individual volume levels. I want to be able to mute them or allow them to play at the volume that has been set for them. I was thinking that I could do this by storing the values in arrays and then looping through these each time the sound is muted/unmuted but I am sure there must be an easier way. Any suggestsions v gratefully received :) Here is what I have so far: var sound1:Sound = new Sound(this); sound1.setVolume(60); var sound2:Sound = new Sound(this); sound2.setVolume(20); sound1.loadSound('an.mp3', false); sound2.loadSound('another.mp3', false); ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Seamless Player Upgrade
Hey everyone, I want to set up a process so users who don't have the correct version of Flash Player to view my app can upgrade seamlessly without leaving the swf. If anyone could point me in the direction of any useful articles I would be v v grateful. Thanks guys :) Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com