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


Similar Posts:


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 :: 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 3 :: Safe To Store A Password In A SharedObject?

Mar 28, 2012

Is it safe to store a password in a SharedObject if it gets saved over https from a Flash based webapp?

View 1 Replies

Flash :: Setting Initial Position Using SharedObject?

Aug 8, 2011

I have created a simple audio player to play continuously even if the page is refresh it will play continuously.This is my code to store audio position in flash Temp memory

MySharedObject.data.audioPos = mySndChannel.position;
MySharedObject.flush();

MyProblem,When the player starts the sndPosition is null, so it was not playing. If I set some value, when I am refreshing it will not continue from the last position. How can I set the initial position to play from the start?

View 1 Replies

ActionScript 2.0 :: [MX04] Store A Mc's X-position Between Scenes?

Feb 13, 2009

I make making a basic animation / game. Basically I need to have a movieclip named "ground" stay in the same position between scenes. It will be moving around and at certain moments, the movie goes to other scenes and it needs to place the ground at the x-postion where it was last at. So I had:

I set a variable (xpos) to be 0 earlier and then i have:

if(blah blah happens){
gotoAndStop(nextScene()){
_root.xpos = _root.ground._x;
}

and then in the next scene I have

_root.ground._x = _root.xpos;

But it only works randomly. Some time it will work for certain scenes and certain actions and other's it doesn't work.

View 1 Replies

Professional :: Netstream FLV Position Store In Variable?

May 16, 2010

I have a AS2 netstream instance, in which I am loading various flv's into. The 'main' video has links to other visble when its playing. I want to be able to store the position of the flv (in seconds) so that when the user comes back to the 'main' video it remembers where it was and contiues to play. This is the code I have written so far regarding this (its probably massively wrong).

var remember:Number;
if(ns.play == ("flvs/reel.flv")) {   ns.time = remember;  trace ("stored"); }

[code]....

View 1 Replies

ActionScript 2.0 :: SharedObject, Unable To Start Sound Back After Refresh

Nov 24, 2009

I have a toggle to mute and unmute sound in this movie. If sound is on and refresh with SharedObject sound plays again. Also I can toggle between the sound before refresh. The issue: when selecting mute then refresh, the movie plays back muted but the ability to un-mute is no longer available (at least not before another refresh).

Problem: toggle to mute then refresh of browser. Mute is fine but no ability to toggle back to sound.

Code:
var my_snd_obj:Sound = new Sound();
my_snd_obj.start(0,1);
my_snd_obj.attachSound("my_audio");

[Code]....

View 1 Replies

Actionscript 3.0 :: If Press Play Button While The Sound Is Already Playing It Has The Same Song Playing In The Background

Nov 13, 2010

I have a sound clip that I'm loading externally into my flash file. The code I'm using looks like this and is placed in the as layer on the first frame,

var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
var myTransform = new SoundTransform();
var lastPosition:Number = 0;
mySound.load(new URLRequest("introaudio.mp3"));
myChannel = mySound.play();
[Code]....

View 14 Replies

ActionScript 1/2 :: Stop Other Sounds From Playing While Current Sound Is Playing?

Apr 10, 2011

I am creating a game that has 6 movieclips all on the main time line of the game. Each movie clip has three buttons that when clicked plays, pauses or stops a sound clip.When I press any of the sound clip play buttons that sound starts playing, the problem is when I click any of the other sound clip play buttons those sounds also start to play. Is there a way I can disable the other sound clip buttons while the current sound is playing then enable all of the buttons when the current sound has stopped.
 
This is the code that creates one of the sound objects

[Code]...

View 3 Replies

ActionScript 2.0 :: Store The Initial X Position Of Five MovieClips In An Array By Looping Through It

Jan 9, 2005

I'm trying to store the initial X position of five movieClips in an Array by looping through it. Should be no worries, but I only end up with "Undefined" when I trace the array afterwards...

[Code]...

View 2 Replies

Stop The Playing Sound And Start Playing The Button?

Oct 3, 2009

So I made a few buttons with sounds within them and when I publish it they work just fine. But what I want them to do is;

Say I click a Button.The sound starts playing.Then I click it again, before the sounds done playing.I want it to stop the playing sound and start playing the button I just clicked on, whether it be the same button, or a different one.Right now it just ends up sounds like an echo because it'll play it as many times as you click it.

View 2 Replies

Flash :: Playing Sound From Data Acquired From Sound.extract()?

Aug 1, 2011

I'm trying to play a sound using a technique found here (play the sound by sampling raw sound data gathered from the original with extract()), with the difference that the mp3 sound is embedded in the swf, not loaded externally. This is my code:

var soundBytes:ByteArray = new ByteArray();
var mp3sound:Sound = Sound(new Sound1_design()); // this is the embedded sound
mp3sound.extract(soundBytes, int.MAX_VALUE);

[Code]....

This works, in a way, except that the resulting sound is distorted (it has a kind of a metallic ring).

View 1 Replies

ActionScript 2.0 :: [FMX] LoadSound - Sound To Keep Playing While The Rollovers Load Sound

Jun 22, 2003

I am loading small sounds dynamically with the loadSound command. These small sounds are activated with a rollover. see script below. This works ok. however. i want the first sound to keep playing while the rollovers load sound. a bit like playing the piano. This works ok when i import all the sounds into the library and place them on their very own button. however the size of the flash movie increases to 140k. whereas when i load them dynamically the size of the movie is 20k. obviously i want to load dynamically.

But with dynamic loading each sound stops when another sound is rolled over, so that there is only ever one sound playing at once. I need to load the sound into a different level or something, so that the first sound can keep going while the smaller, shorter sounds play over the top. this is my script below. The first sound loads when the movie starts. This is the one i want to keep playing. Then there are the smaller ones with rollovers. does this make any sense? there's actually 13 little sounds.

[Code]...

View 3 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 :: Store Sound Level To Move A Mc?

Jun 2, 2008

I'm trying to develop a game that will use sound to move an mc. I want to be able to store where the level of the sound bar is after 3 seconds. Depending on how loud the player shouts the more power they will get.This is what I have so far:

// set up microphone object
_root.createEmptyMovieClip("myAudio", 1001);
_root.myAudio.attachAudio(Microphone.get());[code].....

View 3 Replies

Professional :: Stop A Sound From Playing If It Is Playing Already

Dec 6, 2011

ok so i have a button that plays an animation for fire when held down. and when realsed goes to and stops and frame one. when it reaches the end of the time line it goes to and plays at frame 10 and goes back to the end of the timeline. I have a sound for the fire animation that plays for the effect. The problem is the sound keeps going untill its over even if the button isnt held down. and when the playhead reaches the end of the timeline it goes to and plays and frame 10 and it replays the sound. if i hold it down it will just keep playing the sound over and over from start to finish. what i want it to do it when i hold the button down i want it to play the sound and when released it stops the sound where ever it is at. I also dont the sound to play again if there is a sound already going to stop it from playing 20 sounds at one time it gets loud and you need asprin after about 5 seconds of that.

View 2 Replies

ActionScript 3.0 :: Assign A Sound To A Soundchannel Without Playing The Sound?

May 4, 2011

The thing I don't understand is how to assign a sound to a soundchannel without playing the sound. All the examples I've seen do this.

Code:
_SoundChannel = _sound.play();
_SoundChannel.stop();

And how can I set a SoundChannel volume to zero before allocating a sound to it?

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

Media Server :: SharedObject.NoAccess Error When Trying To SharedObject.getRemote?

Feb 18, 2012

I've installed developer version of Flash Media Server 4.5 and trying to get remote object, but no matter how I call my object all i get is this error .I've rad configuration guide and it told me that I should set StorageDir for shared objects, enable RPC (<RPC enabled="true">) and allow shared object (<Allow>users</Allow> in <RPC> - <SharedObject> tags)

View 1 Replies

CS3 Sound Control - No Sound Playing?

Apr 16, 2010

I am trying to embed some sound controls, and have hit a dead end. I made my play and stop buttons, imported my mp3,, assigned it proper linkage, and inserted this AS2 :

[Code]...

The buttons are named "play_btn" and "stop_btn" respectively. When I export it or preview it, hitting the play button does not do anything.... I hear no sound. What could be up with this?

View 4 Replies

ActionScript 3.0 :: Playing A MovieClip In A Certain X Position?

Dec 6, 2011

I want to play video clip when it is dragged into the timeline I created. I handled the timeline and drag/drop part but I need that clip to play when button is clicked on. So I need to make my function determine the x position of the movieClip and play it if it is on the certain x value.

View 3 Replies

Sound Playing Too Soon?

Sep 2, 2010

Im making an animation and in the 3rd scene i have a deer that screams and the sound plays way to early. I had to drag it out way past the frame where it opens its mouth for it to play at the right time.

I have no idea whats wrong this has happened before. I really dont want to have to guess on where to put the sound for everything a character says.

View 2 Replies

Sound Not Playing On Mac?

Sep 21, 2009

Back to my nightmare project, I've embedded sounds in the project that play based on certain user actions. They play fine for me (PC), but my customer is telling me they don't work for her (Mac).Would there be ANY reason a sound would play on a PC but not a Mac?I've told her to update her Flash player to make sure it's current and to make sure her speakers are on and the volume is up, but no sound.Okay, the REAL reason this isn't working is user error based on everything else I'm told that's happening and not happening, but I need to cover my bases and see if there really may be a reason sounds won't play on a Mac.

View 3 Replies

HitTest Was Playing The Sound Over And Over?

May 20, 2009

I have a playhead that moves across the screen and when it hitTests a movie clip it plays a sound. all is working fine except that it will only work the first time it is played. The playhead is controlled by a button. I am working in Actionscrpt2. Here is the code on the movieclip:

onClipEvent(enterFrame)[code]....

In the begining I was having trouble because the hitTest was playing the sound over and over but the above code sorted that out. I think that the new problem was created by fixing the old one.

View 7 Replies

ActionScript 2.0 :: Sound Playing Only ONCE

Nov 13, 2009

I want to achieve the effect of a computer startup. IE, it only plays -once- and then doesn't play again for the rest of the time, even if the user comes back to the same menu. How do I get Flash working that way? I've tried variables to no effect... it doesn't want to change the variable condition.

[Code]...

View 1 Replies

ActionScript 3.0 :: Sound Is Not Playing

Aug 2, 2010

I have another one to get off my chest.I am basically doing a spinning wheel game - i want the sound to play each time the Stopper hits a new prize section of the wheel.In my code, from my EnterFrame function, i call my playSound function but the sound file just never plays .. i know the function is being called as i can see it in trace.I suspect that because the EnterFrame is constantly being called, that the sound file - because it has determined it won't complete - it ignores it totally.[code]

View 2 Replies

ActionScript 2.0 :: Playing The Same Sound Over And Over?

Oct 10, 2006

Anyone know why this keeps playing the same sound over and over?

If I call it using:
Code:
var sounds:src.snd.SoundManager = new src.snd.SoundManager(); // This isn't how I do it, but ... you understand.
sounds.queueSound('libsound1');

[Code]...

View 1 Replies

IDE :: Sound On The Timeline Not Playing?

Aug 26, 2010

I have a small sound effect (less than 10KB) I have placed on my timeline. When I test it directly in flash, I can hear the sound effect, but when I CTRL + test my movie, I can't hear the effect?

View 1 Replies

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







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