ActionScript 2.0 :: When You Click 'off' On The Song, It Turns Off All Sounds, Including The Video?

Jun 13, 2007

I have a song that plays on my site, with an on/off button. And the way the code is set up now is when you click "off" it turns off all sounds. I just put a video on my site, and now the song interferes with the video, so when you click 'off' on the song, it turns off all sounds, including the video. Of course all you have to do is re-start the video, but I'd rather have it set up so the code for the musicbox just turns off only the music.Here's the way it is now, on the off button:

Code:
stop();
stopAllSounds();
play_btn.onRelease = function(){[code]...

I don't know always know the proper way to write it. These last few days have been like a person who's in a foreign country and has a lot to say but can't because they doesn't speak the language.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Maths - When Click On The Knob It Turns 90 Either Left Or Right Depending - Get The Angle In Whole Numbers?

Mar 11, 2011

Code:
knob_mc.addEventListener(MouseEvent.MOUSE_DOWN,turn);
stage.addEventListener(MouseEvent.MOUSE_UP,endTurn );
function turn(e:Event):void[code].....

This is the code I'm using to move a knob the challenge is when i click on the knob it turns 90 either left or right depending where i click, I'd like it to stay still until I turn the knob, and second how do I get the angle in whole numbers??

View 3 Replies

ActionScript 3.0 :: Screen Turns Black And Flash Quits On Video Playback

Oct 21, 2010

I'm using a playback control that is giving me problems. The only thing that I'm using is a play/pause buttons and the time scrubber. I found this code on a website. Now, when I preview the swf, it plays fine, but when the video starts playing, the screen turns black and flash quits automatically.

This is the Error that I'm getting:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Website10_fla::MainTimeline/updateDisplay()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

And this is my code:
import flash.display.MovieClip;
import flash.utils.Timer;
import flash.events.TimerEvent;
// time to buffer for the video in sec.const BUFFER_TIME:Number = 8;
// start volume when initializing player
// const DEFAULT_VOLUME:Number = 0.6;

View 20 Replies

ActionScript 3.0 :: Mp3 Player - Plays The First Song When Click On Second

Jan 17, 2010

Im new in flash, and i have a problem in my mp3 player. im using flash cs3. When i click the link to play the song, it plays the song. but when i click another song, it plays the first song. by the way its an XML driven. here's the codes that i've tried

[Code]...

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 :: Pause Whole Video (including Music) Without A Billion Lines Of Code?

Jul 15, 2010

I made this music video, and now I'm trying to give is some UI controls. I have a play and replay button at the start and the end. But I want to have a pause/play button available to users all the time. I know how to do that for one object at a time, but I have around 80 layers. How do I make it so it will pause the whole video (including the music) without a billion lines of code?

View 9 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 2.0 :: Play Random Sounds On Button Click?

Dec 21, 2010

What's I'm looking at doing is making a button that plays 1-20 different sounds at random each time the button is clicked (hit), and also have an image swap when that happens. A different sound and different image (the same 1 image per sound, not random images, just sounds "image1 goes with sound1").

View 1 Replies

ActionScript 3.0 :: Code To Stop Previous Sounds / If Click On New Sound

Dec 23, 2011

[code]I am making a soundboard and I need the code to stop previous sounds if I click on a new sound

View 3 Replies

ActionScript 3.0 :: Stopping Sounds From Playing In Embedded Video Clip?

Jun 10, 2011

I have three embedded video clips that are inside of movieClips. They I have buttons that take you to a framelabel where those movieClips are located. Each movieClip containing each movie are on separate frames. (See attached image)

When I click on any of the buttons that take me to any videoClips other than the first one, make the audio from the previous embedded Video on the timeline in front of the one I went to , start to play.

I have SoundMixer.stopAll();

on everybutton before I tell it to go anywhere. what to do to only get audio from the video clip in that section of the timeline to play.

View 0 Replies

Flash :: Unloading Swf Using The UnloadAndStop() Method, But Video Sounds Remain Audible

Feb 16, 2011

I have tried many approaches to unloading my swf, but to no avail, the video sounds within my laoded swf keep playing even once the swf has been loaded.

I have created a universal loader as follows:

var loader:Loader = new Loader();

I then load various swf's into a movie clip named mov_contentLoader, for example the video swf is loaded as follows:

loader.load(new URLRequest("video.swf")); //assign SWF url to loader
mov_contentLoader.addChild(loader); //add loaded content to movi clip

I then have a generic "exit" button, based on the state of the application, certain windows are closed, swf's are unloaded etc. For my video.swf file, when the exit button is clicked, I call the unloadAndStop(); method on the loader as follows:

loader.unloadAndStop(); //unload all content, do some garbage cleanup
mov_contentLoader.removeChildAt(0); //just to be safe, a second layer of reassurance ??

The SWF is unloaded, but for the life of me I can NOT get the sounds to stop! I even resorted to adding stage listeners on the video.swf to listen for an exiting state, but that still did not stop video sounds.

If I load the video.swf in again and play a different video, the two soundtracks play ontop of each other.

View 4 Replies

ActionScript 3.0 :: Youtube And Flash - User To Be Able To Click On A Video Thumbnail And That Video Plays Back In The Center Of The Document

Jan 12, 2009

In my CS4 flash document I have created a media gallery. It's a very simple interface that has mouse overs on thumbnail pictures, and then the larger picture will fadeUP in the center of the document. (With use of framelabels in the timeline).

In the same document, I want the user to be able to click on a video thumbnail, and that video plays back in the center of the document. Several questions: If the user clicks on the thumbnail "onrelease," the time line goes to the player, is it possible to stream this video from a youtube clip into my media player on the screen? If not and I have the document in a fl4 format, is there a simple process to have this video open? (I currently do not have the document in fl4 format).

View 0 Replies

ActionScript 2.0 :: Use With Music Is Affecting All Other Sounds - Button Sounds And Background Sound

Apr 16, 2010

I followed the mp3player tutorial (part 3) from [URL] and got it working fine. Only problem is that the setVolume I'm trying to use with my music is affecting all my other sounds - button sounds and background sound. I'm aware of the createEmptyMovieClip/attachSound approach and got it working on my other sounds. But Lee's tutorial-mp3player is using a slight different technique, and so my normal approach doesn't quite work.

[Code]....

View 7 Replies

ActionScript 3.0 :: Synchronize Sounds Perfectly To Do A Kind Of Audio Mixer Using Different Sounds?

Feb 7, 2011

I want to synchronize sounds perfectly to do a kind of Audio Mixer, using different sounds. [URL] does it perfectly, I've been researching and researching and I just don't know how to do it! How does [URL] synchonize audio so perfectly? you can even change sounds and the new ones will come on time! How do I do that? Is it just Action Script? or something else?

View 1 Replies

ActionScript 2.0 :: CS3 Getting Sounds To Start Again After Using Stop All Sounds

Nov 29, 2009

I have a film with 4 scenes in it: Here's a link to the film and as you can see the film does not play the music the second time because of the StopAllSounds function which is probably the wrong code to use. The first scene is just a button with 1 frame, a stop action and a music clip. The second scene is the film. The third scene is the credits fourth scene is a Play again button. I have a Stop all Sounds action on the fourth scene because if I do not use it and I press the Play Again button, the music from the first song keeps playing but also the music from the film starts up again so it starts to play twice. What I want to know is, how do I get the music to stop at the end of the film but start up again once I hit Play Again?

I am using Flash CS3 if that helps and using Actionscript2.

View 2 Replies

Bmp Image Turns Into A Red Square?

Feb 23, 2004

I've been using flash for a whopping 3 days now, and I've stumbled onto a problem that I can't seem to find a way around. I'm using flash 4, due to the fact that #1 it's all I've got, and #2 the new flash mx 6 won't run on the old ass computer I'm using. This is my problem: I import a .bmp image and edit it in flash to make portions of it animated. The image is a symbol (I think it has to be anyway to animate it...) Everything runs fine when I use the basic play/rewind buttons to test the animiation, but when I make it into an executable, or when I go to the menu and hit "Test Movie", the image shows up as a red square. The animation I added still runs, but the actual image I imported is a red square.

View 5 Replies

ActionScript 3.0 :: Detect When The Cursor Turns To A Hand?

May 17, 2011

I would like a function to run when a user clicks anywhere on stage. But this function should not run when the click is on buttons & on url:s inside a dynamic html-formated textfield. How can I detect this? I do realise that the cursor turns to a hand when you hoover over a url inside a textfield & you can set the hand to appear on buttons as well (which i always set it to do). So is there a way in realtime to detect when the cursor is & is not a hand? I've tried the following:

Code:
btn_mc.buttonMode = true;
stage.addEventListener(MouseEvent.MOUSE_DOWN,down)
function down(E:MouseEvent)

[Code]....

View 2 Replies

ActionScript 1/2 :: Html Turns To Percent Signs?

May 28, 2009

I am trying to load html into a text box from a website. when i load to the text box, everything goes fine except that it is loaded as something that looks like this:
 
"%20Cheese%20Croissant= %3B%3Cimg%20src=%22http%3A%2F%2Fwww%2Ehousi ng%2Eumich%2Eedu%2Fdining%2Fmenus%2Fm%2Dfit%2Egif%22%20alt%3D%22%2A%22 %3E%3C%2Fdiv%3E%3Cdiv%20class%3D%22Desserts%22%3EOat%20Bran..."

I wouldnt mind if the html tags were there, because I can deal with those, but I don't know what to do with this. Here is my loader:

[Code]...

View 8 Replies

Within MovieClip - Pasteboard Turns To Color Of Stage

Jul 14, 2009

Flash CS4. When I enter a movie clip to edit the timeline the pasteboard turns to the color of the stage. The result: I can't see the edges of my stage. This is only within the MC. And only within one particular MC (I created another one and the pasteboard stayed 4% gray). When I take the content in the bad MC (via copy frames) and move it to the good one, the same thing happens: Pasteboard turns to the color of the stage. I've tried SFT-CTL-ALT double click. No luck. Strangely, this isn't happening in every FLA. I know it must have something to do with the content on that timeline, but what that is I have no idea.

View 3 Replies

Arrays :: All Color Values Turns Into CurrentColor

Feb 20, 2011

I'm trying to make an array with different color values. My problem is that when I do...
teamColor[i] = currentColor...
All color values in my array turn into the currentColor. (I would upload more code, but that would be a massive mess, considering that I have code everywhere with references from movie clips that are as far as 3 layers deep. However, this would be irrelevant anyways (probably), because I tested this with color values on my main timeline, without any references to or from anything deeply nested). I would like to add that I tried adding strings in there and that the strings remained their original, intended, value, while the color exhibited the same phenomenon.

I changed my code by creating separate variables for each color instead of putting the variables into an array (not what I really wanted to do, but it works). My code looks like this:
if (teamColor != 0) {
this["team"+teamColor+"Color"] = new ColorTransform(0,0,0,1,currentColor.redOffset,currentColor.greenOffset,currentColor.blueOffset,)
teamColor = 0
namebox.addboxes()//function in a movieclip
}

TeamColor is now an int that is changed based on which box a user clicks from a movie clip that has a dynamically generated name, based off of what the variable value in a loop was when it was created.
(E.G: 'tempboxname[ttns].name = i;')
teamColor is then equal to that name when the user clicks it. I have another movieclip with colors in it and the above function is called to check if any teamColor change has occurred, and if it has, act accordingly. (The idea of having teamColor equal to 0 is so that if the user clicks twice, nothing changes. I other conditionals for other colors, all within the same function). That is how I fixed me code. It's not what I wanted, because it's not an array (meaning a seemingly infinite number of teamColors, and thus, teams) but it'll do for me.

View 2 Replies

ActionScript 2.0 :: How To Make Knob That Turns Volume

Jan 11, 2009

i want to create an mp3 player with volume ,frequency, bass, treble and speed knobs any pointers to any scripts that might help me would be great, but at the moment i am just trying to work out how to make a knob that turns.I assume i would use drag over and some kind of rotation function.

View 0 Replies

ActionScript 3.0 :: Tweener - Mouseout Turns Off OnClick

Sep 1, 2009

Basically, I have a button that when moused over it makes rivers go to 50% opacity (they start at 10%), then when clicked they go to 100%.
What I want: Then the rivers stay at 100% until the user clicks the button again.
What is happening: Currently though the mouseout is fading the rivers back to 10%. I know that my code is telling it to do that and want to know how to make it stop.

Here is my code for this:
function shipMouseOver(event:MouseEvent):void {
Tweener.addTween(rivers_mc, {alpha: 1, time:2});
Tweener.addTween(this.dashboard_mc.ship_btn, {alpha: 1, time:2});
} function shipMouseOut(event:MouseEvent):void {
[Code] .....

View 1 Replies

ActionScript 2.0 :: Circle Collision Turns Into Attraction?

Nov 14, 2009

I have a whole heap of circles which are user created and they all bounce off one another. Generally it works fine but occasionally two balls join together and sort of .. orbit each other.

my collision code is this: (it's within two loops going through an array of movie clips, where mc1 is the current movie clip in the first loop and mc2 is the current movie clip within the second loop)

ActionScript Code:
dx = mc1._x-mc2._x
dy = mc1._y-mc2._y

[Code].....

View 1 Replies

ActionScript 3.0 :: Capturing Microphone Turns Down Volume

Dec 19, 2011

In our application, we are using a Microphone object, that is published to a server (via NetStream).The recording works well.But unfortunately, while the microphone is active and the NetConnection+NetStream remain, all other audio from inside the flash application (and I guess other active flash applications as well, at least it does it with grooveshark) has its volume turned down.This is completely against the flow of our flash application, as you have to hear certain sounds clearly while speaking into the microphone.How can this turning down of the volume be disabled?

View 3 Replies

ActionScript 2.0 :: Lightsaber Turns On When Push The Button

Sep 24, 2005

im trying to make a lightsaber that when you push the button, the lightsaber turns on, and then when you push it again, it turns off. There are three frames in this animation. It starts out with just the handle on frame one and by frame 3 the beam gets to its full size. Right now, the light saber will start out with the beam completely out and when you click the button, the beam will go down and then back up and stay there. This is the actionscript i have so far,

[Code]...

View 7 Replies

ActionScript 2.0 :: Flipbook Which Turns Page Automatically

Sep 12, 2003

I'm interested in coming up with a flipbook which turn to another page, with a "turn page" animation. Exacly like what they did for Fullerton, at this URL...I got a great reply from JCS (thanx again dude!), who passed me a fla where they came out with a flip book, but you'll have to manually drag the page frm one page to another. Technically this flip book is more superior, as the user can flip the book manually, and it looks very very cool, but the thing is, there doens't seem to be a way to flip all the way to the last page withouth going through all the pages in between, and that sucks, as imagine that the document has like 50 pages!. BTW, the file in JCS sent can be downloaded here.URL...So basically, I want to modify the script to enable the the page to turn automatically when clicked, instead of having to drag the page.

View 11 Replies

ActionScript 3.0 :: Extending VideoPlayer Turns Sizes Static?

Feb 12, 2009

I'm extending VideoPlayer and it's been working fine for weeks - all of a sudden it's gone berserk on me. I create a few instances and I'm passing different dimensions to each but new instances are using the size of the largest instance so far...as though the height/width had somehow turned static...?Here's the pertinent code:

PHP Code:
import fl.video.VideoPlayer;
import fl.video.NCManager;

[code].....

View 2 Replies

When Upload Site And View Swf It Turns Out Smaller On Webpage?

Dec 9, 2011

[URL]I have published my site but when i upload it to my server and go to view it gets smaller on the screen,i have tried to attach html but it wont upload.please help its driving me crazy and its my first time trying to do this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>~~main9_v4</title>

[code]....

View 1 Replies

Professional :: Intro Background Turns To Black Instead Of Staying?

Jul 19, 2010

I have a flash intro and when ever I preview it,the intro background turns to black instead of staying the way it should be.Can somebody please help me out here,I need this flash intro for a website.Please explain this to me in simple terms because im pretty NEW to adobe.
 
Note I've tried everything to make the flash background stay the way it was but nothing I do works.

View 6 Replies

Ios :: Flash CS5.5 For IPad Turns Landscape Stage Into Portrait SWF

Sep 16, 2011

This seems pretty weird even for Adobe standards. I've set up size of the movie to be 1024x768, which is the resolution of ipad screen in landscape. The stage looks ok but when I publish the swf it goes into portrait mode.

I even used this line of code but it doesn't help.

stage.setAspectRatio(StageAspectRatio.LANDSCAPE);

View 1 Replies







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