ActionScript 2.0 :: Can't Get The Sound.position To Reset To 0?

Feb 3, 2009

I am trying to call a sound to play whenever the UP key is down. I want the sound to stop and reset to position zero when UP is released. Everything works except the sound will not reset to 0. Here is what isn't working:

if(Key.isDown(Key.UP)){
if(sound.position == 0){
sound.start(0,0);[code]....

When ran, the program plays the sound once, and will never play it again because I can't get the sound.position to reset to 0.

View 1 Replies


Similar Posts:


IDE :: Can't Reset ScrollBar Position

Mar 8, 2006

ok - i'm totally confused here... this is probably a stupid noob question... just recently got flash 8 - upgrading from mx2004, but had previously been using flash 6 components and AS1, due to files that had already been written in mx... my problem is this - i have a dynamic text field, populated with data from a LoadVars object. When a button is pressed, different data is loaded into the text field, and the scrollBar is supposed to reset to the top (position=0)

[Code]...

View 2 Replies

ActionScript 2.0 :: Rising Movieclips - Reset Position?

Apr 15, 2004

I have a moviclip duplicating 200 times and rising off the top of the screen. When it moves completely off the stage, and I want it to move back to the bottom of the screen and rise up again. Right now it just keeps going up off the stage and doesn't replace itself.Here is my code on my movieclip:

[code]...

View 1 Replies

ActionScript 2.0 :: Scroll Text Position RESET?

Oct 21, 2005

I know this is a dumb question, but it would've taken me forever to search through all the rest of the posts regarding Scrolling Text boxes. So I have text scrolling in a dynamic text box. Buttons control it's movement, up and down with (scroll --) and (scroll ++). Let's say I read to the bottom of this text, and then load a new file into this same box. When I do this, the new text is scrolled to the bottom. My Question: How do I reset the scrolled position back to the top for each new file that I load??

View 6 Replies

ActionScript 2.0 :: Reset Object To Default Position?

Jun 1, 2010

i wanted to make an object to reset to the default position, like i move it around and when i hit a button he goes to his position for example x: 233 and y:431

View 1 Replies

ActionScript 1/2 :: Get The Handle On A Slider To Reset To Its Original Position?

Sep 30, 2010

I'm trying to get the handle on a slider to reset to its original position whenever the frame is changed.

View 2 Replies

ActionScript 3.0 :: Tween X Position Is Reset When Using Width Parameter?

May 12, 2011

I'm trying to make some manual transitions. Because I don't know AS3, and I'm building this from the help of Google, I've started with a simple "blind" transition just to figure out the works.

The issue is that when I expand the width, it seems as though all my AS3 created sprites seem to reset their x position, and sit on the left. That or 15 of the tweens aren't working.

Here's the code:

ActionScript Code:
function vBlinds(){
var tweens:Array=new Array(16);

[code]....

View 3 Replies

ActionScript 2.0 :: Reset The Registration Point To The Clicked Position?

Nov 11, 2003

i'm trying to zoom in on a picture at the specific spot where the mouse is clicked. ie if the mouse is clicked in the lower left corner, the pic gets bigger from there, not the center of the pic. the only way i can think of to do this is to reset the registration point to the clicked position. is this possible? is there another way to go the job done?

View 12 Replies

ActionScript 2.0 :: Dynamic Scroller - Reset Scroll Position?

May 29, 2007

I'm using the dynamic scroller found on the kiropa site found here [URL]..In the action script on the ScrollBar, I can't find what variable to change to reset the position of the bar to the top of the scroller when I use the same dynamic text area for other content. It loads just fine, but if the scroller was left at the bottom, it stays there on the new text until you move it a bit, then the text catches up.

I'm hoping to find the variable and reset it when the new text loads.

View 4 Replies

ActionScript 2.0 :: Scroller - Reset The Position Of The Thumbnails Back To The Beginning

Apr 3, 2008

I've got 3 pages each with their own portfolio loaded dynamically from an XML file. Everything is working great with the thumbnails i added using the "adding thumbnail" tutorial. There's only one quirk I can't figure out. If you've scrolled to the end of the thumbnails on the first portfolio, the scroller stays in the same place when you go to the next portfolio rather than reloading back at the beginning. I hope that makes sense because it's hard to explain, but the site is [URL] here's the partial code for the thumbnails...

[Code]...

View 1 Replies

ActionScript 2.0 :: Uses Sound.position And Sound.duration To Use As A Playlist?

Jun 19, 2006

I have currently a music player that uses Sound.position and Sound.duration to use as a playlist. However, the sound is streaming, so then Sound.duration is the number of loaded seconds/miliseconds. Is there a way for me to figure out the duration of a sound without fully loading it? Right now, it really messes up the playhead.

View 2 Replies

ActionScript 2.0 :: [MX] Mp3 Sound Position / Sound Length?

Apr 28, 2003

I am trying to get mp3 sound position and sound length to work. Heres the code below and I ahve attached the FLA.

Code:
// Create a new Sound object.
var music = new Sound();
// Create a text field to show sound length.

[Code]....

I have attached my FLA file. You will need to through a MP3 in the same dir as swf file names test.mp3..

View 1 Replies

ActionScript 2.0 :: "reset" Movie Clip To Its Original Position

Jan 6, 2010

I'm working on a project for my class using flash as2. I want it to be able to, when you click on a button, it drops a movie clip down the screen, essentially just adding _y to it, but then when it reaches 300y coordinate it resets the movieclip to its original position so that you can click the button and replay the same function. I'm not sure if this would be create empty movie clip each time you release button. I'm quite lost in this area so i dont have any actionscript to show, I really dont know where to begin. <3

View 9 Replies

ActionScript 3.0 :: Reset The Display By The Means To Start The Motion All Over Again (reset Button)

Jul 13, 2010

Just new in forum and just new in as3 programming. All i want to do is to make some physics simulations (i'm physics teacher...). So i made my first sim with the following code, just to simulate a simple motion with constant velocity. It works ok, except the part i need to reset the display by the means to start the motion all over again (reset button). Then the motion starts but the traces of the previous motion remains on stage. I tried the null command (sp=null) but the sim could not start again because the sp nedded to be non-null...

[CODE]...

View 2 Replies

ActionScript 1/2 :: Make A Reset Button And Add Script To It To Reset All Of The Drag And Drop Movie Clips?

Apr 13, 2011

I have an issue with adding a reset button to my drag and drop movie clips.The problem is, if a student drags a movie clip to a wrong location on the SWF file I want them to be able to hit a reset button that would take them the same SWF that they opened and what would showup would a clear page for them to restart their drag and drop exercise.I know how to make the button for this just want the proper action script to be able for user to start over with no movie clip symbols on the page.

View 3 Replies

ActionScript 3.0 :: Bg.reset() Can Only Find Reset Used For Timers?

Dec 28, 2010

reset in google yields only its use for timers.However I have code bg.reset() which I suppose puts the background back to the beginning of its timeline.

View 3 Replies

ActionScript 2.0 :: Sound.position Not Resetting

Oct 25, 2005

Just to start off, this isn't exactly an inquiry to a problem. It is moreso of a posting of a bug (or assumed bug) in the Flash player and how to get around it. Though if anyone else has a better method then share. Ok, well I very rarely ever work with the Sound() object in Flash, and I found myself working with it today. I was having a problem and I could not pinpoint it for the life of me.... my code appeared correct in every aspect.

After tracing many sections of my code to find out where it was going wrong I realized... that for some reason when you use Sound.stop(), the Sound.position doesn't get reset... it instead just increments from where it left off. This is quite annoying. And being that Sound.position is a read only property you can't reset it yourself. The only solution I have found for this is to delete or overwrite your Sound() object with a new Sound() object. Anyone know if this is indeed a bug, or if there was some reason Macromedia did it like this?

View 9 Replies

ActionScript 2.0 :: Clearing Sound Position Value

Aug 26, 2006

I am using previous/next buttons to navigate through various screens. Each screen has its own voice over track.If I hit the "Next" button in the middle of the track playing, then try to go back, the audio won't play - most likely because the position is still sitting at wherever it was when the sound was stopped.Is there a way I can reset the position? I am assigning the positiong to a variable (mySoundPosition), and have tried stting it to 0 (mySoundPosition=0), but that doesn't seem to help. I know that the position is read-only, so I was hoping that somehow clearing the value of the variable would work.Basically, I just need a way to start the sound over without having to envoke multiple start(); commands because that causes the sounds to essentially play twice, simultaneously, which doubles the volume.

View 13 Replies

ActionScript 3.0 :: Sound Volume By Position Mouse?

Jul 24, 2011

Is there any code in as3 that sets the volume by x&y- coordinates of the mouse?So that my sound is in a MC, and how closer my mouse is at the MC, the louder the volume gets?

View 4 Replies

ActionScript 2.0 :: [CS3] Playing Sound Based On Mouse Position?

Jan 10, 2009

I have created a document 600x300 filled with buttons for a rollover effect. I want to be able to play sounds dependant on the x and y position of the mouse without having to use objects that interfere with the buttons.

View 2 Replies

ActionScript 3.0 :: Controlling Sound Of Movie With Mouse Position?

Nov 26, 2009

is there a way in as3 to mute a video inside a movie clip if the mouse x position equals less than, say 200px?

View 1 Replies

ActionScript 3.0 :: Sound Position And Length On Slider Component?

Sep 11, 2011

I have the following working great:
 
stop_btn.setStyle("icon", square_mc);player_btn.setStyle("icon", next_mc);
import flash.events.Eventimport flash.events.MouseEvent;import flash.media.SoundTransform;
var alreadyDefined:Boolean;volumen.value = 1;

[Code].....
 
I have another slider component on the movie with instance name PROGRESO

I would like for PROGRESOnto indicate (update) the sounds progress as it plays and be able to scrub through the sound.

View 7 Replies

ActionScript 2.0 :: Load Mp3's So The Sound.position Property Resets?

Oct 17, 2006

Basically I have an XML file that contains the paths of a few mp3 files. I have a Play button that plays them and a Next button that plays the next song on the list. These buttons work fine. I actually even am able to obtain and manipulate the songs position using the mySong.position property in order to display the songs position in the form of minutes and seconds.My problem is that when you click Next to go to the next song, the mySong.position property does not reset back to zero, like it should. So if you are 12 seconds into a song and you click NEXT, the next song starts to play fine, but the display keeps counting up from 12 seconds. I realized the .position property is read-only, so I cannot change it. If this is the case, then how does it ever reset, what causes it to reset?

I am loading the songs via the loadSound() method. Which means my only code on the Next button (other than to update some other displays) is:Code:mySound.loadSound("file.mp3", true);I do not need to use mySound.stop() to stop the previous sound, or even mySound.start() to start the new sound playing, it starts automatically. I tried using those commands and got the exact same results, the position property still did not reset.Am i missing something? I sure hope its painfully obvious and I just overlooked something simple cuz im getting a headache

View 9 Replies

ActionScript 3.0 :: Position Working, But When Resumed / Sound Rewinds A Little

May 28, 2008

I have a pause button that pauses a sound playing in a sound channel. It works, but when I resume the sound, it isn't in the correct position, almost like it was rewinded a little.[code]

View 3 Replies

ActionScript 2.0 :: Store Playing Sound Position In A SharedObject?

Mar 16, 2010

I`ve run in a bit of a problem. I`m trying to make a web player in AS2. It stores some data from player for later usage in a shared object. One of the things i`d like to store is my current playing position, so player can start of where it was playing after page reloads, but i can`t think of how it should be done..

[Code]...

View 0 Replies

ActionScript 2.0 :: Displaying Duration / Position Of A Sound Object

Aug 4, 2010

I am following this tutorial (Url...) on how to build an audio mixer in Flash. I am trying to display the duration/position of one of the sound objects in the mixer (all sounds in the mixer have the same length). I have tried adding this code to the actions under frame label "ready".[code]I have two dynamic text fields named Text01 and Text02 on the main timeline. Yet, nothing populates.

View 2 Replies

ActionScript 3.0 :: Soundchannel.position Working, But When Resumed, The Sound Rewinds A Little?

May 28, 2008

I have a pause button that pauses a sound playing in a soundchannel. It works, but when I resume the sound, it isn't in thecorrect position, almost like it was rewinded a little. I'm usingthe code straight from the

View 1 Replies

Flash :: Differences Between Sound.length And SoundChannel.position In ActionScript 3?

Jan 20, 2010

I load a song and when I get the length the song never reach this value.Here is issue document by another guy AS3 - SoundChannel.position never reaches Sound.length.And here is my code

import flash.display.Sprite;
import flash.net.URLRequest;
import flash.media.Sound;[code]....

View 2 Replies

ActionScript 3.0 :: Track / Trace Current Position Of Sound File While It Is Playing?

Aug 18, 2010

does anybody maybe know how to track/trace the current position of a sound file while it is playing?So that it is updated every frame or second?I figured something with trace(sound.position) onEnterFrame, but didn't succeed in realizing this yet.

View 1 Replies

Actionscript :: Manipulate The Position Of Multiple Sound Objects Client-side In Flash?

Jan 20, 2011

If you wanted to create a client-side Flash-based sound editor that lets you load more than 1 sound to an interface that allows you to manipulate the individual positions of the sounds, and mix/play them in real time, how would you accomplish this?

I'm looking to create a simple version that can mix 2 mp3s, allowing the user to adjust the positions of each. Sort of a dumbed down version of Aviary's Myna audio editor.

At the end of the mixing, I would also like our server to mix the 2 mp3 files with the proper positioning into 1 mp3 file...

View 1 Replies







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