ActionScript 3.0 :: Sound Autoplay Overlap When Navigate Back To Main Page

Feb 20, 2010

I have this script (below) and I'm using the next/prev button script to navigate back and forth. When I navigate back to the first page which has the actionscript code to load the music, it begins to load the song again and they overlap. How do I stop loading when song is already on?

var audio:Sound = new Sound();
var req:URLRequest = new URLRequest("MenuBackground.mp3");
audio.load(req);
var channel:SoundChannel = audio.play(0,1000);
var xForm:SoundTransform = new SoundTransform();
musicOn_btn.addEventListener(MouseEvent.CLICK, playSound);
[Code] .....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Navigate From Nested Movie Clip Back To The Main TimeLine?

Nov 24, 2009

I have an action script code for playing a nested movie clip from the main timeline. I want to come back to the frame2 of the main time line when the nested movie clip goes to the last frame. Which code I have to add at the last frame of the nested movie clip to come back to the frame2 of the main timeline..

View 1 Replies

IDE :: Preloader And GetNextHighestDepth - Duplicates Every Time When Navigate Back To The Page

Aug 2, 2009

I have a problem with a preloader on a slideshow. The preloader works perfectly the first time the slideshow is loaded but if you move to another frame and then return the loader bar loads in the top left hand corner of the stage and does not function, it just duplicates every time you navigate back to the page.

[Code]...

View 1 Replies

On Button Click Page Flashes Back To Main Page

Oct 23, 2009

I have a movie clip that loads in the main timeline, when i click on any of my buttons theres a quick flash of the main page. Im loading my movies on level 1 so i guess my question is, how do i get rid of the movie on the main time line?

View 2 Replies

ActionScript 3.0 :: How To Go Back To Main Page?

Sep 27, 2009

I have a main swf file called index.swf and 3 games files called game1.swf game2.swf and game3.swf respectively.The main.swf is done is AS2 while the games are in AS3.I have 3 buttons on the main.swf,each will load the game out on a new layer...this is the code I used...
btn1.onRelease = function(){

loadMovie("subcontent/game1.swf", 0)
btn1.enabled = false
}

But when I added a back button on the game1.swf using the script...

back_button.onRelease = function(){
loadMovie("index2.swf" , 0)
}
...

it didn't work. Apparently this code doesn't function in AS3.All the games are in a subcontent folder.Index file will call them out on a new layer...and the back button in those games must be able to go back to the index.swf.

View 1 Replies

ActionScript 3.0 :: Go Back To Main Page?

Dec 9, 2009

I have a main swf file called index.swf and 3 games files called game1.swf game2.swf and game3.swf respectively.The main.swf is done is AS2 while the games are in AS3.I have 3 buttons on the main.swf,each will load the game out on a new layer...
this is the code I used...

btn1.onRelease = function(){
loadMovie("subcontent/game1.swf", 0)
btn1.enabled = false
}

But when I added a back button on the game1.swf using the script...

back_button.onRelease = function(){
loadMovie("index2.swf" , 0)
}
...

it didn't work. Apparently this code doesn't function in AS3.Index file will call them out on a new layer..and the back button in those games must be able to go back to the index.swf.

View 2 Replies

Actionscript 3.0 :: Calling Back To Main Page Through UILoader?

Mar 24, 2010

I am using AS3 and the UILoader Component to bring in external .swf files into my main (index) page, works fine.

Here is the problem: From inside an external swf, I have a button that I want to communicate "back" to an object on the main page.

Here is the code I am using to change the alpha of the testbox_mc located on the main page:

Code: Select allMovieClip(parent.parent).testbox_mc.alpha = .5;

I have attached my fla files to run and test. I have a feeling I am just on tweak away from success.

View 1 Replies

ActionScript 3.0 :: Buttons To Navigate Forward And Back But Gets Stuck In Back?

Dec 4, 2010

Anyways I am using action script 3.0 and I created multiple layers using just one scene.  I created a layer with lables on them to mark where I want my buttons to point to and go to.  I have the stop (); on the first frame.  And I made my buttons mostly interactive with movie symbols and tweens.My first scene I have 2 doors, the user can pick which door to go to and it takes them into a different path.I made the buttons that are clicked to go forward, and then I tried to make an invisible button on the button edge of the scene to go backwards However, the PROBLEM is when I click my button to go backwards I am stuck on the first page and can't move forward.

function gotoOne(evt:Event):void{  gotoAndStop("one")}backbutton1.addEventListener("click",gotoOne);
function gotoFour(evt:Event):void{ 

[code].....

View 11 Replies

Shoutcast Radio Player - How To Autoplay With Page Load

Oct 26, 2009

I've found only one flash player, that plays my Shoutcast stream directly to my site. I've designed it the way I like, put my shoutcast url in it and everything I wanted. The only one problem I couldn't decide is that I can't "tell" the player not to autostart with page load. I tried with "autoplay="false" when I embed the player in site, but nothing happens. I suppose that I need to put something in my actioscript.

function MD5(string) {
function RotateLeft(lValue, iShiftBits) {
return(lValue << iShiftBits | lValue >>> 32 - iShiftBits);
} // end function
function AddUnsigned(lX, lY)
[Code] .....

View 1 Replies

ActionScript 2.0 :: Sound Overlap And Mov Does Not Work?

Feb 26, 2009

Im using Flash CS3 with Action Script 2. I create a Flash file with few scenes in it. im using movie clip button in every scenes plus i embed .mov file in some of the scenes. I also have sound in every single scenes.

i create btnHDPage1 with instance name hd1 to be linked to scene1 and i create btn2 with instance name hd2 to be linked to scene2. (all these buttons are movie clip buttons). i have a sound and both scenes and a .mov file in scene1

The problem is, when i click on hd1 or hd2, yes it goes to appropriate scene. but the sound is overlapping and when im in scene2 and click on hd1 to go to scene1, my sound does not play and my .mov does not working.

[Code]...

View 4 Replies

ActionScript 2.0 :: Sound Overlap And Plays On All Frames?

Nov 29, 2010

the sound is place inside a movieclip timeline on the first frame. its about 600 frames long the sound. the main timeline were the movieclip is situated is only 1 frame long. The main timeline is 50 frames long.I thought if the movieclip was not on the frame the sound wouldnt play.

i have an issue with the sound in the game.ive place a soundtrack on the first frame. its a long sound track. over 600 frames long. I place the sound inside a movieclip due to a large size. My issue i have is it sound plays even on the frames the movieclip is not situated on.when i return to the frame. the sound starts to overlap and play twice which is a bit of a mess and a racket.

View 4 Replies

ActionScript 2.0 :: Sound Overlap In Music On/off Button?

Nov 4, 2009

I'm having is everytime I click on the home button it goes back to the first frame and replays the music, it overlaps which is very annoying and the buttons are made unclickable. Here is a link to my site [URL]

The AS2 code i used was

bgSound = new Sound(this);
bgSound.attachSound("sound 2");
bgSound.start(0, 99);

[Code].....

View 3 Replies

Professional :: What Code To Navigate From Page Without Opening A New Page

Feb 11, 2010

I have a flash button embedded into a css/HTML page that I want to use to navigate into a new page without opening a new window. Here's the code I'm using in the SWF which I got from the adobe tv tutorial:Here is the test page that I have embedded the flash button in:The flash button is the "about Ian" button on the upper left. I want the navigation to be like the traditional rollovers on the page. (I'm working my way up to having the embedded flash button fade into place, that's why I'm using flash.)

// 1. Event handler function
function clickHandler (Event:MouseEvent): void { trace("CLICK!");   navigateToURL(new URLRequest("http://ianmartinphotography.com/about.html")); } // 2.

[code].....

View 3 Replies

Professional :: Back Button On Web Browser Goes Back To First Frame Instead Of Actual Last Page?

Oct 21, 2010

I have a Flash website with 3 interfaces( 3 frames with movie clips inside). they have a button that goes to different loaded .html page(text). But once the back button is pushed on the web browser, it always goes back to the first frame instead of the actual last page, which might have been frame 2 or 3.

View 1 Replies

IDE :: Make Back Button In Flash To Go Back To Page?

Feb 27, 2010

i want to know how we can make back button in flash to go back to page same like browser back button.

View 1 Replies

ActionScript 3.0 :: 'BACK Keycode' To Go Back To Previous Page

Nov 8, 2011

In my apps, i would like to:

1)have a pop-up menu when a button is touched, then ok to close but still in the same page as it is
2)invoke the popup menu by using samsung's "MENU keycode",then ok to return the same page as it is
3)having the user to swipe 5 images to view them, left image as 1st and 5th image as last image with smooth transitions
4)and also using the "BACK keycode" to go back to previous page

View 3 Replies

ActionScript 3.0 :: Using Back And Forward Browser Buttons To Navigate Through The Flash Movie?

Apr 3, 2009

I've a couple of website on thefwa.com in which you can avigate by using the back and forward buttons on the browser.[URL].. Look at the URL String. It's done through that.

View 1 Replies

ActionScript 2.0 :: Back Button In Flash - Navigate Where The Users Has Last Viewed The Webpages

Feb 16, 2003

The code that u have recommended is not working properly... What i meant is that the function of the back button is to navigate where the users has last viewed the webpages..

View 1 Replies

ActionScript 3.0 :: Navigate On Main Timeline Using Custom .as?

Apr 21, 2010

OK, I'm back, and I have another issue that's bogging me down. The project I am working on has individual frames, each of which holds separate movie clips.  Within those movieclips are buttons which allow the user to navigate to the next frame in the main timeline.  The button objects are different in each frame, so these aren't objects that I can just put on the main timeline (some are nested within several objects)
 
I want to be able to use a line like:myButton.addEventListener(MouseEvent.CLICK, rootnextframe);
 
and not have to always then follow that up with the function declaration. I've tried just declaring the function on the main timeline, but when the script within the objects call the function, it doesn't see it.
 
I have created an actionscript file that reads:package public function rootnextframe():void {      MovieClip(root).nextFrame();}}
 
but I get the errors:Call to a possible undefined method MovieClip.Access of undefined property root.
 
So, clearly, I'm going about this all wrong.  I feel like it's a waste to have a function that has only one line, but I can't think of any other ways to do what I'm trying to get it to do. 

View 8 Replies

ActionScript 3.0 :: Cannot Navigate From One Page To Another?

Apr 2, 2009

I have used flash in the head of my pages and have added navigation bar within that header I have attached code to the message so you are able to see the actionscript I have used to control said navigation. The problem is this does not seem to be working as I cannot navigate from one page to another

View 3 Replies

ActionScript 3.0 :: Navigate From The Original Page?

May 22, 2011

I have a link in my flash and when I click it ,it opens new window and navigte me to other pages but still the original page remain on the screen but I want to navigate from the original page in the same window what should I do ?

View 6 Replies

ActionScript 1/2 :: Back From The Bottom Of A Long Page To The Top Of The Page?

Jul 14, 2009

I have made a Flasch website with long pages. I look for a possibility to jump from the bottom of the page to the top of the next page (is in the next frame).
 
When I make a button "preview frame" on the bottom of the page, the page change into the next page, but at the bottum of that page.

View 1 Replies

Professional :: Cannot Navigate To Home Page Anymore

Oct 8, 2010

I have 10 buttons for various pages on a website I am building. I am only dealing with the first 2 buttons so far: home and about (laborLaw). On my about page, I wanted to have buttons to navigate to another frame where the viewer can Read More Details. In order to get my button to work, I had to type about_mc. before the event listener of that button. Here's the code that worked.

about_mc.laborLaw1_btn.addEventListener(MouseEvent.CLICK, laborLaw1);
function laborLaw1(evtObj:MouseEvent):void{ gotoAndStop("laborLaw1_fl"); }

So I am now able to navigate to frames from buttons inside the mc. My next task was to build a close button to navigate back to the about page from the "Read More Details" page on a 101. Here's the code I used on frame 101:

(stop);
// the following is to navigate back to "about" (Labor Page)
closeLabor1_btn.addEventListener(MouseEvent.CLICK, returnLabor);
function returnLabor(evtObj:MouseEvent):void{
gotoAndStop("about");
}

That worked great BUT, once I navigate BACK to the about page using the closeLabor1 button, I am no longer able to navigate to any other button such as the home button. Here's a video showing exactly what happens. [URL]

View 1 Replies

Actionscript :: Flex Navigate To Another Mxml Page?

Jan 26, 2011

I am having difficulty navigating to different MXML pages in my Flex application. I checked some other questions on SO about it but they seemed to be to do with tab navigation. I am trying to navigate from one MXML page to another via Actionscript code.

View 2 Replies

ActionScript 3.0 :: Navigate Page With Mouse Movement?

Jun 13, 2010

Basically what I want to know is how to have a page be navigable by the movement of the mouse like in Greg Martin's online gallery: [URL] I just want to know how to create that movement following the mouse.

I want to learn actionscript properly, but it's for my final project for school and I'm a bit short with time. I'm in a design course, so they don't bother to teach us coding (design courses are lame, I should have gone with programming), but I really wanted to know how to create this effect in order to make what I had in mind.

View 3 Replies

Actionscript 3.0 :: When Navigate To Next Page Video Stops

May 7, 2011

I have a website that plays video1 when it opens. When you navigate to next page the video stops. One of the buttons on the second page plays video2. The problem is that video 2 won't stop using the same command that made video1 stop.[code]

View 2 Replies

Actionscript 3 :: Flash Timeline Sound Not Stopping On Navigate Away?

Dec 16, 2009

I have a Flash piece that has one main timeline that loads different movie clips and different sections of that main timeline.

On those embedded movie clips within the main timeline are sounds attached to the embedded movieclips timelines set to "stream". They have to be on the timeline so they sync up correctly (I can't load the sounds programatically).

I'm having the issue that when I navigate to a new section on the main timeline, the movieclip that was embedded on the timeline I navigated away from goes away, but the sound continues to play. I can't figure out how to get the sound to stop once I've navigated away.

I can't add a stop all sounds because the navigation of the movie is controlled from an external player I don't have control over (basically the external player just calls a gotoAndStop("myFrame") on the movie.)

View 6 Replies

Navigate Already Viewed Page Only Shows Last Frame Of Slide?

Sep 26, 2006

I am creating a website using the slide presentation template. However, when I navigate to a page I have already viewed, it only shows the last frame of the slide rather than starting from frame 1 of the slide. Is there I way I can tell button to go to a slide and play from frame 1 regarless of how many times the slide has been viewed?

View 6 Replies

ActionScript 3.0 :: Back To A Page Or Refresh A Page?

Aug 8, 2009

Is there a way for Flash to remember which frame it's on and what it's doing when you come back to a page or refresh a page?

View 9 Replies

ActionScript 3.0 :: Buttons On The Main Page Doesn't Goto And Stop At Other Frames In The Main Scene

Jun 14, 2010

I added a website preloader in a separate scene to the main frame of my website and scripted it to go to and Play the main scene or frame of the website when finished loading. I then put a command in the first frame of the main scene for the movie to stop (); at that point. The problem is that now the buttons on the main page don't respond to any behaviour commands to go to and stop at other frames in the main scene. I'm not sure if this is a conflict between the stop(); command in the main scene and the button behaviour command to go to and stop at another frame or an error with the way I'm identifying the scene and frame.

View 5 Replies







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