ActionScript 2.0 :: Song Starts From Beginning On Home Section

Jan 20, 2010

In my flash video I got music playing. The song needs to play on all sections on my site if you hit the play button. If you have stopped the music nothing need to happen in any of the sections. The problem is right now, that if you are browsing around with the music played and click on the home section the song starts from the beginning. Furthermore, if you hit the play button twice two songs are started, hit it thrice 3 songs are started, etc.

The code I use in the home section is:
stopAllSounds();
var sndMusic = new Sound();
sndMusic.attachSound("mySound");
sndMusic.start();

And for the play button:
ActionScript Code:
on (release){
sndMusic.start();
}

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Why Movie Starts Over In Middle Of Song

Feb 16, 2002

If you wonder why the movie starts over in the middel of the song, don't worry it's not finished :-)download the movie here: [code]

View 1 Replies

ActionScript 2.0 :: Window Pops Out, Starts Over From The Beginning And Pops In?

Mar 12, 2010

I'm working on this flash site This is my first time using the loadVars command, so I'm guessing I'm doing something wrong with it.I have a movie clip that acts as a window, it has an animation of popping up, once it does it has a text box in it thats set up to display html. It then loads the html from a txt file, which works fine. The problem is, when the user clicks on another page, the window pops out, starts over from the beginning and pops in, this time loading a different txt file for the html. This also works, however, if you select the text or click on it at all and then switch the page, anywhere you click next will make all the text in the box vanish. You can click and hold onto the scroll bar and scroll down, but the second you let go it vanishes.

Here is the loading code on the frame in _root:

[code]...

I can't think of any reason why this is happening, and all of my debugging attempts have failed.

View 3 Replies

ActionScript 3.0 :: Mp3 Title List - Stop Button Should Move From Song To Song When Playing?

Aug 19, 2009

I have a list of mp3-songs, when song 1 is clicked it gets streamed, a stop-button appears, if this Btn is clicked, this Btn disappears as it should - but if user forgets to click for stopping sound and clicks song 2, stopBtn 1 remains and the new stopBtn 2 also appears. there should be only one stopBtn, the one next to the song is playing.

I would like to move the stopBtn and I have tried several approaches move; graphics.moveTo; if(stopButton !=null) {removeChild (stopButton)}; I packed the var stopButton:Sprite in the header and so on.

Code:
SoundMixer.stopAll();
import flash.display.Sprite;[code]..........

View 0 Replies

ActionScript 3.0 :: ID3 Tag - Getting The Song Length Before The Entire Song Has Been Loaded?

Feb 15, 2010

I am writing a mp3 player and having some issue getting the song length before the entire song has been loaded - which messes with my position indicator, as it needs to know the track length. I thought I could get the length from an ID3 tag, problem is ID3.TLEN returns undefined, though if I right click the track and show properties, the summary tab shows song duration, bitrate, etc... how I can retrieve the song length before the entire thing has been downloaded?

View 4 Replies

ActionScript 1/2 :: Home.swf That Is Inside Home.html?

Jul 27, 2009

I have a home.swf that is inside home.html.inside home.swf there is a btn with the following
 
cinema_btn.onRelease = function() {loadMovieNum("video_main.swf", 0); 
inside video_main.swf  is the following 
loadMovieNum("video1/reels.swf",1);
 
the idea is to load reels.swf in level1 on top of video_main.swf in level 0 why reels.swf size looks much larger even though all swf's are 900 x 800?

[Code]...

View 2 Replies

ActionScript 2.0 :: Play A Section On The Timeline And Then Move Onto Another Section Or Scene

Mar 9, 2009

I have a button that I would like to use with the basic actionscript as follows:

on (release) {
this.gotoAndPlay("15");
}

What I would like it to do is play a section on the timeline and then move onto another section or scene.

[Code]....

I know this is incorrect, so would anyone know how to write an actionscript button that plays a section then goes somewhere else?

View 4 Replies

ActionScript 2.0 :: What Is The Word 'section' In _root.section

Dec 17, 2003

on [URL] what is the word 'section' in _root.section? I assume it is a movie clip instance, but can't seem to find it on the timeline.

View 2 Replies

ActionScript 2.0 :: LoadSound Starts Fine, Then A Second Starts Replaying Again?

Apr 8, 2006

I've got a site that is using loadSound to play some mp3s and it works fine. however, the sound starts to stream, and then replays itself like a second later. my guess is that its playing faster than the load is going and when it gets to the point where it hasn't loaded enough, it starts to replay it, but i'm not sure that that is the exact problem. my code:

[Code]...

now, i tried making a playTrack function that i can call with setTimeout and i put that in the onLoad in place of track.start(), but that didn't work either (i was hoping to not start playing the track for 3 seconds to give it some time to buffer).

View 1 Replies

Raised Cap At Beginning Of Paragraph?

Sep 11, 2009

I got some scrollable text in flash and want the first letter of the paragraph to be a largeer pt.

View 1 Replies

ActionScript 3.0 :: Mute In The Beginning Of A Flv?

Sep 23, 2010

I have an flv file that i am loading externally and want to start the video of with no sound and let the user click the mute_btn to turn the sound on. I am having problems with the code. the video starts with sound on and i want it to start silent. what do i have to add to my code to make this happen?

[Code]...

View 0 Replies

Sound At Beginning Of 2 Scenes And Optimizing

Nov 10, 2009

I have created a X-mas card for my company. When the card opens, the 3 circles are buttons to different scenes within Flash. The text in the bottom left is a button to the final scene.

The card can be viewed here: [URL]

1) When I click on the circle button that has the red garland and tree ornaments in it, if you listen close at the very beginning of the scene, a squeek sound plays. I use this squek sound in the hamster wheel movie symbol used in other scenes, but not in this scene. I don't even have the sound in this scene of the Flash project anywhere. I can not figure out where it is coming from.

2) Does anyone have some optimization tips? My project file is huge and a lot of the people we will be sending this out to probably don't have the most up-to-date processers. Should I split each scene into it's own Flash movie that is only loaded when the button for that scene is selected instead of the whole thing loading?

Here is a link to view the .FLA file: [URL]

View 1 Replies

Button1_btn On A Frame In The Beginning Of This Animation?

Jun 22, 2009

I have button1_btn on a frame in the beginning of this animation, and on that frame I script it:
 
button1_btn.addEventListener(MouseEvent.CLICK, showimage1);
function showimage1(event:MouseEvent):void {
gotoAndPlay("image1");
}

I also have other buttons that eventually take a different frame where that button isn't on.So I add it to the stage in that frame and assume it will gotoAndPlay("image1") again when clicked, but when I test the movie, and click it on the later frame, nothing happens.I tried maybe adding the original script to that frame as well, but then I test and it says I have duplicated script and doesn't work.Why does the original script work for that button, no matter where and when it shows up?It's the same button essentially, no?

View 3 Replies

How To Cross Dissolve End Of Loop To Beginning

Nov 23, 2009

I have four photos which dissolve into one another in Flash CS3. I would like this to loop continuously with the last photo dissolving back into the first photo. I have searched extensively for a solution with no results. Does anyone know how to do this? Here's what I've done so far: [URL].

View 10 Replies

ActionScript 2.0 :: Play Animation From Beginning Only Once A Day

Sep 23, 2009

I've bought a website template, and im trying to change a few things in the flash. this is the site at the moment:[url]..

i want the menu+header to be played only once a day from the beginning, because its pretty annoying at the moment.

View 2 Replies

Actionscript 3.0 :: PlayerText Is Declared At The Beginning?

Jun 24, 2010

I've got two (possibly three) logic errors going on... Well, I say logic errors as the compiler and output windows are clear from any error reports.Error 1: Dynamic Text Field*~EDIT~* PlayerText is declared at the beginning of the as and if statement now tests its text not the object*~END EDIT~*

Code: Select allif (PlayerText == null && !this.contains(PlayerText)) {
PlayerFormat.font = PlayerFont.fontName;
PlayerFormat.size = 21;

[code].....

View 2 Replies

ActionScript 2.0 :: Remove Mid Array Only Beginning And End

Jan 18, 2004

I have a box with 5 pieces of paper inside
myArray1 = new Array ("1","2", "3", "4", "5");

I am going to chose a piece at random from the box
$i = random(5);
trace(myArray1[$i]);

That piece has now been removed from the box, therefor it has to be removed from the array, now how to remove from mid-array only beginning and end, so I thought of this:
Code:
for (var $loop = 0; $loop < myArray1.length(); $loop++) {
if ($loop <> $i) {
myArray2 = new Array();
myArray2.push(myArray1[$loop]);
}}
trace(myArray2);

How I have set this up, but I am thinking if the loop index of the random piece is equal to the random number, then skip that, else, put all the other pieces in a new box. But when I trace the 2nd array, it displays the random value. Is there any way to move everything from an array into a new array WITHOUT a certain element? I mean I know you can move a certain element via its array position, any form of array.pushNOT($n, ($n+1))

View 14 Replies

ActionScript 2.0 :: [F8] Adding Numbers To The Beginning Of A Variable

Feb 18, 2009

Basically, I have an input box on a widget that sends information via PHP.

One of the input boxes is phone number. Everyone inputs number as normal, but without the country code.

Is there a way of me taking their normal number from the input box, removing the '0' and adding the country code before sending it (i.e. within a calculation/function/formula).

View 1 Replies

Professional :: Enter Puts Text And Beginning?

Jan 8, 2011

When I'm typing and press enter I expect a new line to be created, but instead the text goes to the very beginning and writes over what I've already typed. Does anyone know what setting is causing this?

View 2 Replies

Actionscript 3 :: Trimming Bit Of The Beginning Off A Recorder Waveform?

May 14, 2010

I've got a flash 10.1 app that lets me record microphone input to a wav without a media server, which I am saving to an Amazon S3 bucket.I have another process running on a server which gets wavs from this bucket, converts to mp3 using LAME and puts them into another bucket. This all works fine, but in converting wav > mp3, about 0.1sec or so of silence is added to my sound.In the application this are being used in, perfect sync is critical, so I need to trim off that little bit. If I have to trim it off the original waveform that is okay, I don't expect anything important to happen in that first fraction of a second.

What is the best way to go about this? I am using Adobe's WavWriter to convert by ByteArray into a proper waveform. Is there a way I can easily trim off the first few samples from my ByteArray without invalidating the structure?Alternatively, is there a good server-side tool I can use to trim the wav before running it through LAME, or an argument I can give LAME? Or, could I even trim that sound off the mp3 after it has been converted?

View 2 Replies

ActionScript 3.0 :: Click Outside Of Flash And Return To Beginning?

Sep 21, 2009

Is there any as3 code that says if a user clicks outside of the flash movie, the movie will return to the beginning/frame 1?

View 2 Replies

ActionScript 2.0 :: Implement One Preloader At The Very Beginning Of The Slideshow?

Oct 3, 2009

Here is a very simple xml slide show. What I want is to implement one preloader at the very beginning of the slideshow so the user do not see any blank page at the beginning.

I also want to implement the preloader before loading each image by clicking the next and previous buttons.

Attaching herewith the fla and other files for your kind look.

View 9 Replies

ActionScript 3.0 :: Prevent Video From Playing At Beginning Of Swf?

Apr 11, 2011

I have a small game that plays a short instruction video and then has the player select a button which then takes them to the next level. The game has 4 levels with video. The problem is that when the swf plays all the video plays at the same time. When you get to the level you can play the play button on the skin and the video will play again and the level functions appropriately. How can I get the videos to only play when the play button on the skin is clicked? [code]...

View 2 Replies

IDE :: Play / Pause And Return To Beginning - Streaming MP3

Apr 20, 2009

I have just a play and pause button on a website I'm creating for a client that streams one mp3 song. It works great with the code below, but the problem is that when it reaches the end, it doesn't loop back to the beginning. I would like for the user to be able to press the play button at the end to hear the song again, or include another button that rewinds back to the beginning.

Code:
this.createEmptyMovieClip("sound_mc", 10);
music = new Sound(sound_mc);
music.loadSound("[URL]", true);
music.start();
active_button = "play";
[Code] .....

View 1 Replies

ActionScript 2.0 :: Activating Keypad At Beginning Of Website

Dec 14, 2009

I'm building a website that has the option of using the keypad to navigate the menu. If I test in flash I can use the keypad right at the beginning (if I press the right arrow it expands the first menu). However once I upload the sight, I have to click on the screen before I can activate the event listener. I use a seperate swf to preload it but even that when I test in flash works off the bat when the right arrow key is pressed.

View 4 Replies

ActionScript 2.0 :: Looping Photo Gallery To The Beginning?

Feb 12, 2010

I used this tutorial to create an xml photo gallery:

[URL]

I would like to add the functionality of having the next button return to the beginning of the xml when you reach the end and have the previous button return to the end if you are navigating the other way.

View 1 Replies

ActionScript 2.0 :: Line Becomes Alpha From Very Beginning Of Movie

Oct 22, 2002

I have one line that is going down 500 pixels with the instance called 'vertical'. I also have a line set next to it with aplha = 0. When the vertical line going down reaches 300 pixels, I want the line which is set to 0 to set the alpha = 100. The code I am trying does not work.. Here is what I am putting in
onClipEvent (enterFrame) {
if (vertical._height = 300) {
this._alpha = 100}
}
Seems simple enough, but the line becomes 100% alpha from the very beginning of the movie. Do I have to do anything with _root or what?

View 4 Replies

C# :: Play Mp3 Song Using Asp.net?

Aug 29, 2011

I am developing an online listen music website, on that I want to play song based on the user selection from gridview.right now I am using flash object for playing mp3 and video file this is running fine but its static path.how I can dynamically pass file URL of selected song on flash object.

View 3 Replies

ActionScript 3.0 :: Check If The Beginning Of A String Match Request?

Apr 14, 2009

How would I write if I want to check if the beginning of a string match my request? Something like this but with real code
 
if(myString doesn't start with "http://"){
doSomething;
}

View 2 Replies

ActionScript 3.0 :: Bring The Text Prompt To The Beginning Of TextArea?

Nov 3, 2009

I have an input_txt which is an instance of TextArea When I type into it and press enter it captures. I need to set the textarea empty. So its done as input_txt.text = ""; But doing like that the prompt stays at the second line since we press enter key. Is there a way to bring the prompt back to the beginning of the TextArea?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved