ActionScript 2.0 :: OnSoundComplete() - Make It Work?
Jun 30, 2008
I don't have the cash right now to get Flash CS3, so I'm limited to using Actionscript 2 and that's what I have here. What I'm trying to do is use the onSoundComplete(); function, or something similar but not getting any results.
I'm doing a basic sort of mp3 player, though it only rotates between 3 songs. I have a character walking on stage as a movie clip, he's carrying a radio which is a nested movie clip within the first, and within the radio movie clip is where I have it set that you can manually advance from one song to the other by hitting a forward button, and there's also a volume slider. The first default song playing is "letsDance", The second song playing is "outtasite" and the third song playing is "please". They all work perfectly, the forward button to advance works, and the volume slider works.What doesn't work is when one song finishes, I want the next song to start. For now, I only included code for going from song 1 to song 2, but that's not working so I decided to stop there.
Unfortunately, with the three .mp3s included even at 20 seconds each, my compressed .zip file is 1.2mb, bigger than the allowed 146kb .zip on the kirupa forum. Therefore, I cannot post it on the forum, but have it hosted on a web server. Anyone willing to look at the file, you can find it at:
http:[url]...
What's in this .fla file right now is just the radio button and the volume slider, nothing else. I didn't want to include any unnecessary extras so even the three songs that are included are even shortened down to about 20 seconds each. Each of these songs are located externally from the .swf file and are called in through the "loadSound" command.Anyone who could shine some light or advice on why this isn't working or a better way to follow on what's going on here. I've read other things online about onSoundComplete(); like being used with music in arrays which I guess I could do, but I want to be sure I have control of advancing one song to the next and also adjusting the volume. Other things I've read about onSoundComplete(); is that it just doesn't work.
View 8 Replies
Similar Posts:
Dec 7, 2009
I have this script in a movie clip. It should go to the keyframe shown after sound completes, but it doesn't and I'm wasting too much time trying to figure it out.
FYI - the sound does play and the trace does appear. It just won't go to the frame I want.
//script***********************************************
applause= new Sound();
applause.attachSound("applause2.mp3");
[Code]...
View 1 Replies
Sep 28, 2010
like at the object, i have a class like that:
class myClass
{
var sound:Sound;
var num:Number;
public function MyClass()
[Code]...
View 2 Replies
Jan 6, 2007
I have a problem with flash player versions. When I use onSoundComplete event it normally works at Flash Player 6 but it's broken at Flash Player 8. How can I call a function when my sound is finished?
Code:
s.onSoundComplete = playSong;
s.onSoundComplete = songName;
View 4 Replies
Nov 8, 2004
I am trying to have a streamed mp3 loaded from xml, randomly play a new song on complete. I already have it play randomly onload. Here is what I have, and it doesnt work .
Code:
tickerLength = 52;
for (i=0; i<tickerLength; i++) {
leading += " ";[code].........
View 1 Replies
May 3, 2009
I have created a simple flash movie which I use to stream MP3 files into HTML documents using the JavaScript Flash integration Kit. When an audio file has finished streaming it fires the onSoundComplete function; using the integration Kit as a proxy allows me to fire JavaScript events within the HTML document. The event fires correctly when I am streaming from the Internet, however, it fails to fire when the movie and the files are on the same, local, machine.The problem lies, I think, in the following lines of code:
[Code]...
View 13 Replies
Feb 7, 2010
I am trying to get an equalizer animation to redirect to a url AFTER the called on MP3 track has finished playing. But I am pulling my hair out in trying to figure out how to do this... Based on some help and more research, I think i need this following action script inserted somewhere into the original action script, but i'm not sure. Am I even on the right track?
[Code]....
View 3 Replies
Apr 21, 2010
I have a button object that I need to scale to align with the variable width of an array of images.However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen.. it's off.
I've proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.
Code:
navigatorDown_btn.width = 410;
navigatorDown_btn.x = (stage.stageWidth/2)-(navigatorDown_btn.width/2);
trace(navigatorDown_btn.width); // output: 410
View 4 Replies
Aug 22, 2011
* I have a flash project called contact
* The document class is ContactClass
I am trying to make a sprite button with graphics and can't make it work. I have successfully added text fields so I know the path is correct. I suspected my code was correct and confirmed it should be, after reading several tutorials showing the process for creating sprite buttons with graphics. Anyway, I imported nearly every class on Earth, but certainly everything which needs to be. Stage is gray and 800x600.The graphics code by itself with appear, but not when linked to the sprite. Also, the sprite won't appear no matter what. Another interesting piece of the puzzle: nothing will trace, not even objects such as textfields which actually appear and function on the stage when I text the code.
public class ContactClass extends Sprite {
public function ContactClass() {
var home_btn:Sprite = new Sprite();[code]....
View 3 Replies
Dec 16, 2009
I am a new comer to flash and I have been teaching myself actionscript 2.0 and I am now trying to move to action script 3.0 this seems a dumb question but for the life of me i can't figure out how to make my buttons work.i am trying to have the user click at button that connects to a movie clips and plays the movie, the movie stops then goes to the next frame of animation.
View 1 Replies
Mar 31, 2010
I have been going nuts all day trying to figure out why my 'drag and drop onto a target' movie doesn't work. I have a movie clip to drag onto another movie clip which is the target.when the first clip is dragged onto the target clip i want the target clip to gotoandplay(2);
the clicking and dragging and stopdrag() etc works, but when I drop the piece over the target, it just does nothing.here is my code on the MC that is being dragged:
on(press){
startDrag (this, true, 135, 95, 700, 440);
}
on(release){
[code]....
btw, I am using actionscript 2.0
View 2 Replies
Nov 30, 2010
I cant find any conflicting assignments in keyboard preferences.
View 6 Replies
Nov 29, 2009
I have a 3 screen project and there are two buttons on each screen that have to be able to enable the user to jump to the appropriate screens when clicked on. I am totally new to flash and I have tried off and on for a couple weeks to figure this out in various books and online. I just can't figure out what I'm doing wrong.
View 1 Replies
Nov 10, 2010
When I test the movie my hyperlink works fine, but when I publish it, doesn't work. I'm not experienced with ActionScript. Here are some screen shots of what I got...
View 3 Replies
Dec 3, 2009
It works perfectly when pulled within labels like in the demo.[code]note: (id="slidesbigtext") loads text from javascript without any issues, just can't find a way to make sIFR work in this situation..
View 1 Replies
Mar 27, 2012
I'm using PhantomJS 1.4.1 (support for plugins like Flash was removed in 1.5) complied with --qt-4.8.I cannot get Flash to be enabled inside PhantomJS. I use the --load-plugins=yes option. I set up QTWEBKIT_PLUGIN_PATH to all the paths that contain libflashplayer.so:
QTWEBKIT_PLUGIN_PATH=/usr/lib/browser-plugins:/usr/lib/flash-plugin:/usr/lib/mozilla/plugin:/usr/lib64/flash-plugin:/usr/lib64/mozilla/plugins:/usr/lib64/opera/plugins
[code].....
View 1 Replies
Sep 8, 2009
I have three sliders and they are generating numbers. What I am trying to do is, liderOne.value is divided by sliderTwo.value. And that gives me a number named density... Everything is okay for now...ActionScript Code:var density:Number = sliderOne.value / sliderTwo.value ;But I want the third slider to change the alue density by itself. I mean, in the purpose of doing that, I tried;ActionScript Code:sliderThree.value = density;but by this way, sliderThree is showing me the values of density. Everytime I change the values of sliderOne or sliderTwo, sliderThree is changed as density changes. But when I test the movie and try to change the sliderThree , it was like a big rock and not even moving
View 2 Replies
May 18, 2010
Recently I found Tweener And I followed the instruction of installment, but I got a compiler error:Desc: The class or interface 'caurina.transitions.Equations' could not be loaded.Sour: import caurina.transitions.Equations;Even I run the samples downloaded from the website, I got the errors, could someone tell me why is that?
View 1 Replies
Jun 1, 2004
I was reading Kirupa Chinnathambi's function tutorial and I was trying to make my own function, but it's not working! Here it is:[code]
View 9 Replies
Aug 2, 2004
i am trying to to do the following. I have 2 buttons on a page.when i click the first button it should just display the image i want it to.when i click the second button it should display the other image i want to display.
View 2 Replies
Oct 3, 2009
I've used CDATA tags many times, but I am writing the XML slightly differently then usual. Where do I put the cdata tags within this example so i can control the href links in the last section:
Code:
<item number="04" name="WE SELL ART" />
<item number="05" name="CONTACT" action="gotoFrame" variables="vitals" sectionNumber="05" sectionContent="POST. 123 Street Address, City, Country
PHONE. 123-456-7890
ELECTRIC. <a href="mailTo:info@test.com">info@test.com</a>"/>
View 8 Replies
Feb 24, 2011
Can you help me figure this out how to make the objet work? It should flip when it moves from Right to Left.
View 2 Replies
Dec 22, 2009
I'm using CS4/AS3 and am swapping out swf files in a single holder from different buttons. The problem is that the child isn't getting removed when switching from button to button.Here's my code:
var Xpos:Number=0;
var Ypos:Number=150;
var swf:MovieClip;
var loader:Loader=new Loader();
[code]...
View 6 Replies
Jan 9, 2010
I have 3 movieclips, and I want them to work like buttons. It's for a website, so they need to redirect the user to a URL.
The entire flash file has 7 layers, and one of these layers is called "AS3", and is ment for all my actionscript. So, i figured if I gave the MC's an instance name, then I could write the AS3 in the "AS3"-layer. But I can't seem to get any code to work.
View 10 Replies
May 29, 2010
A loading bar for my portfolio website is not working at all. Although the same loading bar will work on other Flash projects.After doing some research I have found that loading in MovieClips from the library may be the cause of this. So instead of loading them in from the library, i am now loading them in externally but the problem still persists. how can i un-embed the font? [URL]
View 1 Replies
May 24, 2009
I have an example that I copied out of a book "Actionscript 3.0 Cookbook"here's the error message:TypeError: Error #1009: Cannot access a property or method of a null object reference. at jim.bitmap::Clouds()[C:AS3projectsclassesjimitmapClouds.as:13] at clouds_fla::MainTimeline/frame1()[clouds_fla.MainTimeline::frame1:2]
[Code]...
View 11 Replies
Jun 16, 2009
How to make flash contact form to work? The form is under contacts, how do i get it to send to an email address?
View 7 Replies
Jul 24, 2009
The main class shown below is showing a blank screen and is NOT navigating to [URL].
package {
import flash.display.Sprite;
import flash.net.navigateToURL;
import flash.net.URLRequest;
import flash.net.URLVariables;
public class NavigateToURL extends Sprite {
public function NavigateToURL() {
var url:String = "[URL]";
var request:URLRequest = new URLRequest(url);
navigateToURL(request); }}}
View 1 Replies
Jul 26, 2009
I have a flash that I am trying to make the buttons/links towork on and no matter what I do they just do not work. I have many hours into it so far and just had no success weather using my CS3 how to book of the forums information.I not sure what I am missing. Never had this much trouble before. the first one I tried is HOME, have not gone farther since I can make the 1st one work.[URL]..
View 1 Replies
Oct 4, 2010
how to make Xml work with <![CDATA[null]]>? Now if to deal with something like <node><![CDATA[null]]></node> an exception will be thrown.
View 1 Replies