Video Object - Sound But No Picture
I am trying to make a video player from scratch for a project.
The audio plays, but the video does not.
var obj_Video:Video = new Video (); var obj_Video_NC:NetConnection = new NetConnection (); obj_Video_NC.connect (null); var obj_Video_NS:NetStream = new NetStream (obj_Video_NC); obj_Video.attachVideo(obj_Video_NS); obj_Video_NS.play ("video.flv");
I read the documentation and I have to attach the video object to the timline, but how do I do that?
Any ideas?
Thanks in advance!
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 02-19-2006, 01:52 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Video Object - Sound But No Picture
I am trying to make a video player from scratch for a project.
The audio plays, but the video does not.
code: var obj_Video:Video = new Video ();
var obj_Video_NC:NetConnection = new NetConnection ();
obj_Video_NC.connect (null);
var obj_Video_NS:NetStream = new NetStream (obj_Video_NC);
obj_Video.attachVideo(obj_Video_NS);
obj_Video_NS.play ("video.flv");
I read the documentation and I have to attach the video object to the timline, but how do I do that?
Any ideas?
Thanks in advance!
Video With Sound But No Picture
Using flash 8 I have created an swf file with embedded movie which
works fine when i view it after publishing to the web server however
several clients who are looking at the page which contains the movie
say they can hear the audio but cannot see the movie, as suggested they
have upgraded to flash player 8 but still no joy. This is not
consistant as others i have show the page to can see the clip fine. I
am thinking it could be a player I really dont want to go into a whole
dialogue with people who want to view the page. Pulling my hair out at
the mo as i cannot get my head round where the problem exists, why they
can hear but not see!!!
Hope someone can help
The site with the problem is here: http://www.buswaytech.com
Streaming Video But No Picture Just Sound
okay --- when click on the site the video should automatically play -- which it does, but all i hear is sound and see no video. anyone have any clue what i can do to fix this. p.s. --- it takes a few seconds -- about 11 seconds -- to hear the sound by the way
also -- i have used the media display component and added the url to that and also used the mediaplayback component and added the url to that as well -- do i need to do that? or is it overkill
here is the link --> http://magnoliafoam.com/
i used the media components and it pulled my file size way way down which is why i went this way otherwise it would have been a 3MB site.
any suggestions
thanks
.stop() For Sound Object Stopping Embedded Video Sound
I have a problem where the stop funtion for a sound object is stopping the audio in an embedded video. Has anyone ever encountered this? Ihave poured over my code and there is no cross-linked intance names, so I do not have a clue what is happening.
Sound Object For Video? Help
Hi there,
I am trying to use the sound object to separate two different sound channels from a flv.
Ive never attempted anyhting like this before- does anyone know if it is at all possible?
Basicly I have a video file as flv loaded in, and I want to be able to switch between the left and right channels.
The code I found is:
var mySoundTransformObject:Object = new Object();
mySoundTransformObject.ll = 100;
mySoundTransformObject.lr = 100;
mySoundTransformObject.rr = 50;
mySoundTransformObject.rl = 50;
my_sound.setTransform(mySoundTransfromObject);
in actionscript help files,
Im hoping to use it on press of a left and right button:
left.onRelease = function() {
var mySoundTransfromObject:Object = {ll:100, lr:100, rr:0, rl:0};
}
but as I have no real understanding of how it works, I dont know how to actually get it to work.
Would the sound object work on a piece of video, or is it just for mp3s,
Please help- any tips would be much appreciated
Video Object Sound Control
Hello!
I was wondering what is the best way to solve this issue:
If you use the Video object to load an FLV WITH sound and before it has ended playing you load another FLV in the same Video object WITHOUT sound, then the sound of the first FLV keeps playing. This doesn't happen with the FLV Playback component.
Any suggestions?
Thanks.
How Can We Control The Sound Object Of A Video Stream From A Different Domain.
Hi All,
We are quite familiar with action scripting but are facing an awkward situation.
We need to call different instances of youTube Video into our own swf and play them.
Now as youTube video is from a different domain, the Flash sandbox restrictions naturally come into play. We am loading the youTube swf into a clip using the MovieClipLoader Class.
If we remove the instance using the removeMovieClip() command the video is removed but the sound continues. We have even tried the MovieClipLoader unloadClip() method but that too did not yield results.
We wish to be able to kill the sound object or atleast mute it so that it does not play even after the movie clip containing the video is removed.
As the swf belongs to a different domain we are unable to control the sound object directly through script.
We have even tried loading another youTube instance into the same movie clip after first removing it using the removeMovieClip() command, then creating it again, and finally loading the youTube instance using the MovieClipLoader class, but the earlier sound still continues to play even while the second clip sound also plays.
We need help guys. Any advice?
Thanks to all.
Display Object From Child Class ? Sound But No Video. I Dont Get It...
So I have a main package with a main class, then it breaks down into children from there (I think thats how you explain it). I am trying to stream a video and get it on the stage. I know my issue is with adding the display object but I dont get it - I have too many forum posts / books open but I just cant seem to get it. How do I get it to display when compiled? I can hear the sound but cant see it.
Main Package:
package core {
import flash.display.*;
public class SecretSolutions extends MovieClip {
var secretsXMLFile = "../xml/secrets.xml";
public function SecretSolutions() {
var secretsXML = new GlobalXML;
var secretsVideo = new GlobalVideo;
secretsVideo.showVideo();
secretsXML.importXML(secretsXMLFile);
}
}
}
Global Video Package
package core {
import flash.display.*;
import flash.net.*;
import flash.events.*;
import flash.media.*;
internal class GlobalVideo extends MovieClip {
public function showVideo () {
var video:Video = new Video(320,240);
addChild(video);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
function onStatusEvent(stat:Object):void{
trace(stat.info.code);
}
var meta:Object = new Object();
meta.onMetaData = function(meta:Object){
trace(meta.duration);
}
ns.client = meta;
video.attachNetStream(ns);
ns.play("video_001.flv");
}
}
}
Thanks in advance and for any insight - Im new to AS3
Video Object - Call To Load And Listener Object Not Working
i've got a video object within a movieclip who's full path i put in a var called 'video'. here's my code, it appears that the video object is not loading my stream and/or i'm not getting the listener object to work properly... everything does trace out good as far as vars, rtmp address, etc... grrr!!!
Code:
//function to load the stream in the vid object
_global.loadVid=function(vidFile){
trace("this is path to vidObj: "+video);
trace("loadVid function var passed: "+vidFile);
var listenerObject:Object = new Object();
listenerObject.ready=function(eventObject:Object):Void{
//video loaded, do this
video.removeEventListener("ready", listenerObject);
_root.container.vidPanel.gotoAndPlay("tovideo");
trace("video is loaded, proceeding to video play state");
};
video.addEventListener("ready", listenerObject);
var nV:String=rtmpURL+vidFile;
video.load(nV, true);
trace("video: "+rtmpURL+vidFile+" should be loading");
}
Video Picture
I have a video
I want it so when i put it on the stage i can publish it as a .gif
how do i do it so i can see it
Embedded Video Object In Video Basics - Part 1 Tutorial
I am a total newbie at Flash, so please bear with me. In Lee's Video Basics - Part 1 tutorial, one of the first steps is to create a Embedded Video object in the library. Flash Professional MX 2004 is being used in the tutorial and I am using Flash Professional 8, so maybe that is the reason I'm having a problem. The tutorial shows that by clicking "New Video" in the library panel, the embedded video object is automatically added to the library. When I click "New Video", I get a Video Properties dialogue box that defaults to "Video (ActionScript-controlled)". When I check the Embedded option, the OK button becomes disabled...only Cancel and Import are enabled. Clicking the Import button gives me an open dialogue box for a *.flv file. I'm not sure what to do here. Am I supposed to select the .flv file that I am going to use? I was under the impression that the tutorial was creating a generic object that I would be able to reuse whereas selecting a .flv file would make it specific to what I'm working on now. Can someone that is using Flash Professional 8 clarify what I should do?
Thanks,
Pat
Picture In A Remote Shared Object
How would I store a picture in a remote shared object that is being brought into flash with loadmovie? a code example would be helpful
[F8] Video In Place Of Picture
Hello everyone I am new to flash and I am in the process now of taking online tutorials. I have purchased a template and I would like to import a video in place of the picture that is there. Is this possible? I have tried to drag the video onto the stage however when I test the movie it ends up behind the whole template. Not to mention the little peek I do get to see of it is extremley huge!!!! Can someone please help me!!! Thank you
AS2 CS3: Video Player Class W/ NetStream Video Object
is it possible to use the properties of the videoPlayer class with a video object that is not wrapped in a flvplayBack component. I am having trouble using the maintainAspectRatio property with my current video object. Additional question, If you use a flvPlayBack component are you forced to use a skin for the controller or can you use a controller that was built in the swf of the video object?
Convert A Video Object To A Bitmapdata Object
package {
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.*;
import flash.media.Camera;
import flash.media.Video;
import flash.display.BitmapData;
import flash.display.MovieClip;
import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.events.Event;
public class CameraExample extends Sprite {
private var video:Video;
private var _bitmapData:BitmapData;
private var _bitmapDataDue:BitmapData;
private var mybitmap:BitmapData;
public function CameraExample() {
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
var camera:Camera = Camera.getCamera();
if (camera != null) {
camera.addEventListener(ActivityEvent.ACTIVITY, activityHandler);
video = new Video(camera.width * 2, camera.height * 2);
video.attachCamera(camera);
addChild(video);
_bitmapData = new BitmapData(video.width , video.height, false);
_bitmapData.draw(video);
var _bitmapDataDisplay:Bitmap = new Bitmap(_bitmapData);
_bitmapDataDisplay.x= camera.width * 2;
addChild(_bitmapDataDisplay);
}
what's wrong with this?
thank yooou
[CS3] Popup Video From Picture Button
Hello
I have a Flash template for a photography site. I would like one of the pictures that is configured as a button to pop up a window to play a video that I will create, with just the player controls and the exit button. (There is no room to embed the video player.) The button currently has this code:
Code:
on (rollOver) {
gotoAndPlay("s1");
}
on (rollOut, releaseOutside) {
gotoAndPlay("s2");
This is where I get stuck. I am not sure how to incorporate JavaScript and HTML to call up the popup and reference the video file.
Any advice is greatly appreciated.
Insert A Picture To A Flash Video.
Hi all,
I am quite new to flash, and i think that i am trying something above my knowledge.
I want to create a flash clip that will contain a picture. and then i would like to make that picture a variable. in such a way that i could load a different picture every time.
For example, lets say there is a man walking, i would like to be able to change the face of the man, depending on the picture i want.
Is this possible?
I tried to insert a picture on the movie, but i could not find any option for it.
thanks
ilias
Flash Picture And Video Gallery Effects
Hi all,
Does any know how to create the folder popup effects found at these pages? Also, can this be done with video files.
See below:
http://www.myflashxml.com/swf.asp?page=http://www.Myflashxml.com/003/swf/v5o/index.html
http://www.myflashxml.com/swf.asp?page=http://www.Myflashxml.com/003/swf/ult3/index.html
http://www.myflashxml.com/swf.asp?page=http://www.Myflashxml.com/003/swf/v8b/index.html
http://www.myflashxml.com/swf.asp?page=http://www.Myflashxml.com/003/swf/v5d/index.html
I would greatly appreciate your advice, on how I can do this myself, or a software program which would help me do so. Thanks you
Help With Sound And Picture Syncing
it's so frustrating to finish a flash animation that times out perfectly fine on your own comp, only to find it lags on others. Is there anyway to sync a sound track to frames so that if the frames cant keep up they get cut? anything that can insure it'll time out would be awesome. thanks in advance all you even read this
Synching Sound With Picture In Flash
Hi there! I'm making a short movie in flash with music, sound effects and speech. It is very important that the sound and the film is synching with eachother. I'm sure you understand why, it's pretty obvious. The problem is that the speed of the film varies from computer to computer and because of that the sound does too. However, I've seen alot of flash-films on the web that seem to work ok.
What should I do?
External .flv: Sound Plays, Picture Does Not
Dear Community,
I am truly stumped by this problem. I have used the code suggested in "cool effects & practical action script" on p. 260 to get the external .flv to play.
The strange thing is, the sound is there, and sounds GREAT, but there is no picture! What could be the problem?
Please help! I am at my wit's end on this one.
Sharon Anne
Sound Linked To Picture Space ...
Hi all,
I have a professionnal project for a website.
My main problem is that I have to code something that I guess I'm not really capable of. Actually, I'm a graphist, not a coder. So I need some lil' help.
Here is how it goes :
My site is 1000 pixels wide and coded in AS2.
Let's say we have a wide picture ( something like 5000x600 ) cut in 5 differents atmosphere side by side ( each are 1000x600).
I'd like first to have this whole picture scroll to scroll left or right when my mouse is going to one side or the other. Could be cool if there was some acceleration in proportion to the distance from the center of the site. This should be not too complicated to code. Well we'll see if I succed.
My really question is ... as I must have a mp3 playing for each part of my image ( so 1 mp3 for each of my 5 atmospheres ), what could be the easier way to have this working with an effect of cross fading between the different sounds as I scroll at my image ?
I have think for now of 5 images side by side, and a sort of "play sound" on rollover each one. But I don't know how to get my cross fade effect.
If you have some ideas of something to aim to achive the effect, I'll be very gratefull.
This is to me a good place to start seeking for a solution.
I hope I'm right ^^
Thanks for all the help you can bring.
Stoping And Playing Sound At A Particular Point (using Sound Object)
Hi,
I have a movie in which i have a voice over and some animations which is in sync with the VO. I have a play button and stop button.
I am using the sound object method to play the sound and the animations are in timeline.
I have to stop the movie at any point in time and when i click on play the sound should start from the point where it stopped..But it is not happening.
Please help me..
am having a deadline today..
lamus
Glitch With Sound.position And External Mp3 Sound Object
Hi,
I am in the midst of build a flash mp3 player and have chosen to load all of my mp3s externally and streaming using this method:
sndAudio.loadSound(track01, true);
The problem I am running into is that when track01 starts playing and I switch to another sound i.e.:
sndAudio.loadSound(track02, true);
the value in sndAudio.position doesn't get reset. This is causing havoc for me in my pause function and my counter as well... I am guessing I have to somehow delete the sound object and repopulate it when I stop a sound or start a different one but I am having trouble figuring this out. Has anyone had any luck with this before? Here is how I am initializing my sound object:
this.createEmptyMovieClip("mcSoundHolder", this.getNextHighestDepth());
var sndAudio:Sound = new Sound(mcSoundHolder);
I am running Flash MX 2004.
Thanks to anyone who can lend a hand,
Cheers,
T-Dawg.
Stop Sound File Early (using Sound Object)
I know I can use the play() method of the Sound object to offset the beginning of a sound. Ex:
mySound.play(2000) - plays the sound beginning at 2 seconds
Is there a way to get a sound to stop early? For example, if it is a 20-second sound, can I get it to stop at 18 seconds? Thanks!
How Do I Load External Sound Into A Movieclip Vs. A Sound Object?
I have a sound player movie clip that is designed to play the sound loaded into the parent movie clip. In particular, it uses "_parent.gotoAndPlay(targetFrame);" to start playing the sound. And it works well for statically loaded sounds.
However, how can I use this sound player movie clip with dynamically loaded sounds? The player requires a sound to be loaded into the parent movie clip, but the only way I know of loading an external sound is instantiating a new Sound() object and then using .loadSound(...). But loadSound doesn't load the sound into a movie clip.
So, how do I load an external sound into a movie clip versus a Sound object?
Thanks!
_global Sound Element/ Shared Object Sound
THIS IS DRIVING ME CRAZY
Im programing a childrens game that teaches music.
Needless to say there are a lot of sounds involved, so natuarrally I only want the sounds to load one time then just be referanced later to be played.
However, this game consists of about 10 different .swf files, that jump back and forth depending on user navigation.
I have tried defining the sounds as _global like so
_global.mysound = new Sound ();
_global.mysound.loadSound("noise.mp3")
playsnd = function(){
_global.mysound.start(0,0)
}
However this will only play in the clip it was defiend in, and I need it to be able to be called from any of the .swfs
I use this code to transpher between movies
unloadMovie(this)
loadMovie("new", this)
I have also tried converting the sound to a Shared:Object but it two only plays in the clip it was defiend in
user_so = SharedObject.getLocal("sndz");
_global.sndz = new Sound(this);
sndz.loadSound("soundz/parry.mp3");
user_so.data.song = _global.sndz;
_global.playsnd = function() {
trace("getting called");
user_so.data.song.start(123, 1);
};
user_so.flush();
OMFG, I have a deadline on Thursday, and I have not been making any progress
PLEAS HELP!!!!!!!!!!
Streaming Flv File Can Hear Sound But No Picture...
Hello friends!
I'm doing something wrong, I believe, I can see flv files if I use the flash component - but I want/need to load it with AS.
When I load the FLV via code, the video plays its sound, but no image... I'm a bit lost as to what I am missing...
I've tried other example code, like this:
Code:
function playVid(flvname) {
this.connection_nc = new NetConnection();
this.connection_nc.connect(null);
this.stream_ns = new NetStream(this.connection_nc);
my_video.attachVideo(this.stream_ns);
this.stream_ns.setBufferTime(5);
this.stream_ns.play(flvname);
}
playVid("test.flv");
stop();
Does this need to be on an object? Its currently on the stage/frame1.
Thanks for your help!!!
Seb.
How Can I Get The Picture To Change Color And Have Sound At The Same Time?
can anyone tell me how can i get this result for the flash file i attached;
1. make the sound appear (i could not import the sound to the library cause the file size is too large),when the user clicks on the black square on the stage,
at the same time.....
2. make the sound appear when the user press the key on the computer keyboard, "a" ,
3. make the square change to another color (eg: black square to a blue square)when the user does step 1 and 2.
i tried using this code.. but i wouldn't work:
ActionScript Code:
on(press, keyPress "a"){ function check() { Key.isDown(65) ? a._visible=1 : a._visible=0; } setInterval(check, 50); soundObj = new Sound( ); soundObj.attachSound( "doremi" ); soundObj.start();}
what is the correct way to do it?
How Can I Get The Picture To Change Color And Have Sound At The Same Time?
can anyone tell me how can i get this result for the flash file i attached;
1. make the sound appear (i could not import the sound to the library cause the file size is too large),when the user clicks on the black square on the stage,
at the same time.....
2. make the sound appear when the user press the key on the computer keyboard, "a" ,
3. make the square change to another color (eg: black square to a blue square)when the user does step 1 and 2.
i tried using this code.. but i wouldn't work:
ActionScript Code:
on(press, keyPress "a"){ function check() { Key.isDown(65) ? a._visible=1 : a._visible=0; } setInterval(check, 50); soundObj = new Sound( ); soundObj.attachSound( "doremi" ); soundObj.start();}
what is the correct way to do it?
IMport Video Vs Video Object?
what is the main difference between importing a quicktime video to flash to use as flv and using a flash object to play an external flv ? which one can you add, a preloader and buffering option? any tutorial on creating a video player that buffers and starts playing after maybe half of the video has preloaded?
IMport Video Vs Video Object?
what is the main difference between importing a quicktime video to flash to use as flv and using a flash object to play an external flv ? which one can you add, a preloader and buffering option? any tutorial on creating a video player that buffers and starts playing after maybe half of the video has preloaded?
Stopping Timeline's Sound But Continue The Video's Sound
Hi folks!
I need help to solve this problem. I can't seem to get it work out.
I have a music playing in Timeline (looping forever) when the flash site starts.
In some sections of the flash site, there is a video section where users can watch a video.
When the video is played, I would like to stop the sound in Timeline so it doesn't interfere with video's sound.
For loading the video, I am using Video Object, the code is simply:
var my_conn:NetConnection = new NetConnection();
my_conn.connect(null);
var my_stream:NetStream = new NetStream(my_conn);
my_video.attachVideo(my_stream);
my_stream.setBufferTime(3);
Many many thanks in advanced for your help!!
ps: I have tried following links, but no luck to me.
http://www.kirupa.com/forum/showthre...ht=sound+video
http://www.kirupa.com/forum/showthre...ht=sound+video
http://www.kirupa.com/forum/showthre...ht=sound+video
Synchronsing Sound Using Sound Object Method
before flash 7 you were able to synch the sound to the timeline with and option in the properties window (using the "stream" or "event" setting) - this would ensure any animation would keep up with the soundtrack, and if need be would skip frames.
how can you do this with the new sound object and actionscript??? - is there a method for it? at the moment im creating a new sound object and then use the attachSound method to bring the sound in from the library, but it doesnt automatically synchronise with the graphics on the timeline
anyone any ideas?
cheers
steve
HELP Sound Object Stop Kills Flv Sound Too
code:
if (!firstTime) {
_root.introMusic = new Sound();
_root.introMusic.attachSound("music");
_root.introMusic.setVolume(50);
_root.introMusic.start(0, 1);
firstTime = true;
}
music_btn.onRelease = function() {
if (!rockNow) {
_root.introMusic.setVolume(0);
this.gotoAndStop(2);
rockNow = true;
} else {
_root.introMusic.setVolume(50);
this.gotoAndStop(1);
rockNow = false;
}
};
stop();
This script for my "music on/off" btn kills ALL audio and not just the sounds object audio. It also pauses FLV playback (I'm using the FLVplayback component). Any insite?
I've tried modifying the above AS not using the "_root." to target the obj and also stop() and start() on the obj instead of just volume control. HELP!!!
Thanks,
1M.
Load New Sound Into Existing Sound Object
I have an extremely simple AS3 mp3 player that I'm trying to create but the problem I'm running into is that I can't seem to load a new song into my sound object when I switch tracks. Here's the basic code I'm using:
Code:
var sound:Sound = new Sound();
var sControl:SoundChannel = new SoundChannel();
var isPlaying:Boolean = false;
function triggerAudio(id:Number, path:String, type:String):void {
if(isPlaying){
sControl.stop();
sound.close();
isPlaying = false;
} else {
sound.load(new URLRequest(path));
sControl = sound.play();
sControl.addEventListener(Event.SOUND_COMPLETE, completeHandler);
isPlaying = true;
}
}
Right now, playing an initial song works
Stopping a song works
But loading a new song over top of a previously loaded song doesn't.
I'm brand new to AS3, what am I missing?
Streaming Sound Distorted - Sound Object
I have a streaming sound that is loaded into my flash movie (will end up on CD) that is very distorted, it sounds like someone is slowing down the audio, the voice sounds deep and slow. its kinda funny, but I doubt my boss will think so.
anyone ever run into this before?
[F8] Recording Sound From A Sound Object To Mp3 Using AS - Brainstorm Here
Hi guys,
Im creating a number of little flash instruments, that I need to be able to record the sounds/songs they create. AFAIK, there is no official way to do this in AS, but I was hoping the more creative scripters around here might be able to help me find a solution?!
The worst case scenario is using the microphone I guess, but i would like to avoid that if at all possible.
Please brainstorm with me here!
Steve
Streaming Sound Distorted - Sound Object
I have a streaming sound that is loaded into my flash movie (will end up on CD) that is very distorted, it sounds like someone is slowing down the audio, the voice sounds deep and slow. its kinda funny, but I doubt my boss will think so.
anyone ever run into this before?
Sound Object Attach Sound Or Load
Hi
I am wanting two sounds in my FLA one for movie clip buttons and one for background music.
In the past I have created a sound object and just loaded the file from a location on the server, but I've just seen an aletrnative method thats works very much in the same way but you import the sound files into the library and then export for action script and then attach them to the sound object.
Which is the best method to use? If I bring them into the library do they contribute the FLA size? and if they do is this worse than just loading them?
What are the pros and cons of each method? and which is best to use?
Thanks
Ricky55
Sound Causing Jerky Sound/video
in a flash movie i am making when a sound effect is streamed the movie get jerky as well as the sound for a second. I am pretty sure its not my cpu (3ghz 512 ddr). As of now.. i don't have a preloader but my whole movie is contained in the first frame of the main timeline. I heard somewhere that this means the movie will not start until everything is loaded. Anyway thanks for your help
Sound Controller Turns Off Video Sound...help
im trying find out why.......here is my set up
onClipEvent(load)
{
_root.soundstatus="on";
_root.mySound = new Sound(_level0);
_root.mySound2 = new Sound(_level1);
_root.mySound3 = new Sound(_level2);
_root.mySound4 = new Sound(_level3);
_root.mySound5 = new Sound(_level4);
maxvolume=100;
minvolume=0;
}
onClipEvent(enterFrame)
{
if(_root.soundstatus=="on") {step=5}
if(_root.soundstatus=="off") {step=-5}
maxvolume+=step;
if (maxvolume>100) {maxvolume=100;}
if (maxvolume<0) {maxvolume=0;}
_root.mySound.setVolume(maxvolume);
_root.mySound2.setVolume(maxvolume);
_root.mySound3.setVolume(maxvolume);
_root.mySound4.setVolume(maxvolume);
_root.mySound5.setVolume(maxvolume);
}
.flv Video Plays Sound, But Not Its Video
I call a .flv into my movie like this:
Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
newVid.attachVideo(ns);
ns.play("test.flv");
Simple with no buffering. I have published with both Flash 8/AS 2, and Flash 7/AS 2.
Any ideas why the sound, but not the video plays?
Thanks for your thoughts.
Advance Sound In Sound Object?
Hey all. Check this:
I need to advance a sound to a certain timeframe. For example, go to 120000 (2 minutes). Is there an way of doing so?
Thanks,
Leo
The Sound Object 'mySound=new Sound();
I had an Idea of using dialogue sound and background loops together on my demo. I wanted to do this using the Sound object using linkage to export all sounds embedded in the same .swf. I also wanted to have two volume sliders. One controlling the volume of the Dialogue, the other controlling the background loops, using the mySound.setVolume(); method.
The problem: everytime I instantiate a new Sound() object it supercedes the old one, even though I give the two objects unique identifiers (names)
Can you only have one sound object playing at a time?
Loading Sound With Sound Object() 'DAP'
Hello,
i was running a test in trying to preload mp3 dynamically using the loadSound function and notice that if am running DAP which is the download accelerator program the flash file doesnt work and instead DAP tried to download the mp3 file. however on diasbling the DAP it worked.
did any one ever encounter a similar problem? was there a solution
Sound Object To Tell You When Sound Stops?
I'm having a problem. I'm developing an intro/offline presentation in flash for a client and it has music in the background to go with it. I have imported the sound and attached it to the first frame after the preloader using the sound thing in properties panel. Now how do I know when the sound ends? If i put a frame down a couple 1000 frames i see where it says it ends, but i added a keyframe on a different frame there and put something like "music ends" in a text box, but when i play it the music ends about 30 seconds before that. And the worst part is it ends at different times depending on the computer. I want to display something right when the music ends. Is there some way (probably with sound object) i can do something like this:
[on frame 999]
if(!sound.on){
gotoAndPlay(1000)
}else{
gotoAndPlay(998);
so it keeps testing to see if the sound ends, and when it does it continues to play the rest? I took out moock's Actionscript the Definitive Guide, but all i can find on the sound object is how to control stop and play, not to test if it is playing.
Thanks
|