How to stop the capture source of AudioVideoCaptureDevice

Hi. I capture video with the AudioVideoCaptureDevice API and I'm not sure if I followed the right steps to implement it. If I record a video for the first time everything works in the emulator but when I tap the record button for the second
time the app crash. I think it's because I have to disconnect the file stream from the capture source but I can't because passed an instance of  AudioVideoCaptureDevice as the source of the video recorder brush. Here's my code + - in the order of
execution:
private async Task InitializeVideoRecorder()
try
if (vcDevice != null)
vcDevice = null;
CameraSensorLocation location = CameraSensorLocation.Back;
captureResolutions =
AudioVideoCaptureDevice.GetAvailableCaptureResolutions(location);
vcDevice = await AudioVideoCaptureDevice.OpenAsync(location, captureResolutions[0]);
vcDevice.RecordingFailed += OnCaptureFailed;
vcDevice.VideoEncodingFormat = CameraCaptureVideoFormat.H264;
vcDevice.AudioEncodingFormat = CameraCaptureAudioFormat.Aac;
// Initialize the camera if it exists on the phone.
if (vcDevice != null)
//initialize fileSink
await InitializeFileSink();
// Create the VideoBrush for the viewfinder.
videoRecorderBrush = new VideoBrush();
videoRecorderBrush.SetSource(vcDevice);
// Display the viewfinder image on the rectangle.
viewfinderRectangle.Fill = videoRecorderBrush;
//_cs.Start();
// Set the button state and the message.
UpdateUI(ButtonState.Initialized, "Tap record to start recording...");
else
// Disable buttons when the camera is not supported by the phone.
UpdateUI(ButtonState.CameraNotSupported, "A camera is not supported on this phone.");
catch(Exception ex)
MessageBox.Show("InitializeVideoRecorder Error:\n" + ex.Message);
private void OnCaptureFailed(AudioVideoCaptureDevice sender, CaptureFailedEventArgs args)
MessageBox.Show(args.ToString());
//setup iClips video file creation
private async Task InitializeFileSink()
StorageFolder isoStore = await ApplicationData.Current.LocalFolder.GetFolderAsync("Shared");
sfVideoFile = await isoStore.CreateFileAsync(
isoVideoFileName+".mp4",
CreationCollisionOption.ReplaceExisting);
// Set the recording state: display the video on the viewfinder.
private void StartVideoPreview()
try
// Display the video on the viewfinder.
if (vcDevice != null)
// Create the VideoBrush for the viewfinder.
videoRecorderBrush = new VideoBrush();
videoRecorderBrush.SetSource(vcDevice);
// Display the viewfinder image on the rectangle.
viewfinderRectangle.Fill = videoRecorderBrush;
// Set the button states and the message.
UpdateUI(ButtonState.Ready, "Ready to record.");
txtRecTime.Visibility = Visibility.Collapsed;
// If preview fails, display an error.
catch (Exception e)
MessageBox.Show("Start Video Preview Exception:\n " + e.Message.ToString());
// Set recording state: start recording.
private async void StartVideoRecording()
try
if (vcDevice != null)
MessageBox.Show("1");
s = await sfVideoFile.OpenAsync(FileAccessMode.ReadWrite);
MessageBox.Show("2");
await vcDevice.StartRecordingToStreamAsync(s);
MessageBox.Show("3");
rState = 1;
logo.Opacity = 1.0; //brighten logo to indicate that the recording started
StartTimer(); //show time ellapsed on UI
// Set the button states and the message.
UpdateUI(ButtonState.Recording, "Recording...");
// If recording fails, display an error.
catch (Exception e)
MessageBox.Show("Start Video Recording Error:\n" + e.Message.ToString());
// Set the recording state: stop recording.
private async void StopVideoRecording()
try
await vcDevice.StopRecordingAsync();
sfVideoFile = null;
rState = 0;
logo.Opacity = 0.1;
StopTimer();
// Set the button states and the message.
UpdateUI(ButtonState.Stopped, "Preparing viewfinder...");
StartVideoPreview();
// If stop fails, display an error.
catch (Exception e)
MessageBox.Show("Stop Video Recording:\n " + e.Message.ToString());
// Start the video recording.
private void StartRecording_Click(object sender, EventArgs e)
// Avoid duplicate taps.
StartRecording.IsEnabled = false;
StartVideoRecording();
private void DisposeVideoRecorder()
if (_cs != null)
// Stop captureSource if it is running.
if (_cs.VideoCaptureDevice != null
&& _cs.State == CaptureState.Started)
_cs.Stop();
// Remove the event handler for captureSource.
_cs.CaptureFailed -= OnCaptureFailed;
// Remove the video recording objects.
_cs = null;
vcDevice = null;
//fileSink = null;
videoRecorderBrush = null;
InitializeVideoRecorder() is called in OnNavigatedTo the when I tap the record button StartVideoRecording() is then called like wise StopVideoRecording() and when I tap the record button( or call StartVideoRecording) for the second time an error
is thrown. What am I missing? (I bet it's something to do with how I implemented the capture source.) Thaanks in advance.
 

Thank you that answer is very helpful. I got the recording to work and it's playing the video back too, however, when I record for the second time and tries to playback that file the screen is just black. Can you kindly take a look at my methods
and see where I'm missing up?
// Constructor
public MainPage()
try
InitializeComponent();
//setup recording
// Prepare ApplicationBar and buttons.
PhoneAppBar = (ApplicationBar)ApplicationBar;
PhoneAppBar.IsVisible = true;
StartRecording = ((ApplicationBarIconButton)ApplicationBar.Buttons[0]);
StopPlaybackRecording = ((ApplicationBarIconButton)ApplicationBar.Buttons[1]);
StartPlayback = ((ApplicationBarIconButton)ApplicationBar.Buttons[2]);
PausePlayback = ((ApplicationBarIconButton)ApplicationBar.Buttons[3]);
//SetScreenResolution();
//Sign_Client();
catch (Exception ex)
MessageBox.Show("Constructor Error:\n"+ ex.Message);
//Life Cycle
protected async override void OnNavigatedTo(NavigationEventArgs e)
base.OnNavigatedTo(e);
// Initialize the video recorder.
await InitializeVideoRecorder();
//prepare shutter hot keys
CameraButtons.ShutterKeyHalfPressed += OnButtonHalfPress;
CameraButtons.ShutterKeyPressed += OnButtonFullPress;
CameraButtons.ShutterKeyReleased += OnButtonRelease;
protected override void OnNavigatedFrom(NavigationEventArgs e)
// Dispose of camera and media objects.
DisposeVideoPlayer();
DisposeVideoRecorder();
base.OnNavigatedFrom(e);
CameraButtons.ShutterKeyHalfPressed -= OnButtonHalfPress;
CameraButtons.ShutterKeyPressed -= OnButtonFullPress;
CameraButtons.ShutterKeyReleased -= OnButtonRelease;
// Update the buttons and text on the UI thread based on app state.
private void UpdateUI(ButtonState currentButtonState, string statusMessage)
try
// Run code on the UI thread.
Dispatcher.BeginInvoke(delegate
switch (currentButtonState)
// When the camera is not supported by the phone.
case ButtonState.CameraNotSupported:
StartRecording.IsEnabled = false;
StopPlaybackRecording.IsEnabled = false;
StartPlayback.IsEnabled = false;
PausePlayback.IsEnabled = false;
break;
// First launch of the application, so no video is available.
case ButtonState.Initialized:
StartRecording.IsEnabled = true;
StopPlaybackRecording.IsEnabled = false;
StartPlayback.IsEnabled = false;
PausePlayback.IsEnabled = false;
break;
// Ready to record, so video is available for viewing.
case ButtonState.Ready:
StartRecording.IsEnabled = true;
StopPlaybackRecording.IsEnabled = false;
StartPlayback.IsEnabled = true;
PausePlayback.IsEnabled = false;
break;
// Video recording is in progress.
case ButtonState.Recording:
StartRecording.IsEnabled = false;
StopPlaybackRecording.IsEnabled = true;
StartPlayback.IsEnabled = false;
PausePlayback.IsEnabled = false;
break;
// Video Recording Stopped.
case ButtonState.Stopped:
StartRecording.IsEnabled = true;
StopPlaybackRecording.IsEnabled = false;
StartPlayback.IsEnabled = true;
PausePlayback.IsEnabled = false;
break;
// Video playback is in progress.
case ButtonState.Playback:
StartRecording.IsEnabled = false;
StopPlaybackRecording.IsEnabled = true;
StartPlayback.IsEnabled = false;
PausePlayback.IsEnabled = true;
break;
// Video playback has been paused.
case ButtonState.Paused:
StartRecording.IsEnabled = false;
StopPlaybackRecording.IsEnabled = true;
StartPlayback.IsEnabled = true;
PausePlayback.IsEnabled = false;
break;
default:
break;
// Display a message.
txtDebug.Text = statusMessage;
// Note the current application state.
currentAppState = currentButtonState;
catch (Exception ex)
MessageBox.Show("UpdateUI Error:\n" + ex.Message.ToString());
private async Task InitializeVideoRecorder()
try
CameraSensorLocation location = CameraSensorLocation.Back;
captureResolutions =
AudioVideoCaptureDevice.GetAvailableCaptureResolutions(location);
vcDevice = await AudioVideoCaptureDevice.OpenAsync(location, captureResolutions[0]);
vcDevice.RecordingFailed += OnCaptureFailed;
vcDevice.VideoEncodingFormat = CameraCaptureVideoFormat.H264;
vcDevice.AudioEncodingFormat = CameraCaptureAudioFormat.Aac;
//Set a perfect orientation to capture with
int encodedOrientation = 0;
int sensorOrientation = (Int32)this.vcDevice.SensorRotationInDegrees;
switch (this.Orientation)
// Camera hardware shutter button up.
case PageOrientation.LandscapeLeft:
encodedOrientation = -90 + sensorOrientation;
break;
// Camera hardware shutter button down.
case PageOrientation.LandscapeRight:
encodedOrientation = 90 + sensorOrientation;
break;
// Camera hardware shutter button right.
case PageOrientation.PortraitUp:
encodedOrientation = 0 + sensorOrientation;
break;
// Camera hardware shutter button left.
case PageOrientation.PortraitDown:
encodedOrientation = 180 + sensorOrientation;
break;
vcDevice.SetProperty(KnownCameraGeneralProperties.EncodeWithOrientation, sensorOrientation + 90);
// Initialize the camera if it exists on the phone.
if (vcDevice != null)
//initialize fileSink
await CreateAndOpenNewVideoFile();
// Create the VideoBrush for the viewfinder.
videoRecorderBrush = new VideoBrush();
videoRecorderBrush.SetSource(vcDevice);
// Display the viewfinder image on the rectangle.
viewfinderRectangle.Fill = videoRecorderBrush;
//_cs.Start();
// Set the button state and the message.
UpdateUI(ButtonState.Initialized, "Tap record to start recording...");
else
// Disable buttons when the camera is not supported by the phone.
UpdateUI(ButtonState.CameraNotSupported, "A camera is not supported on this phone.");
catch(Exception ex)
MessageBox.Show("InitializeVideoRecorder Error:\n" + ex.Message);
private void OnCaptureFailed(AudioVideoCaptureDevice sender, CaptureFailedEventArgs args)
MessageBox.Show(args.ToString());
//setup iClips video file creation
private async Task CreateAndOpenNewVideoFile()
StorageFolder isoStore = await ApplicationData.Current.LocalFolder.GetFolderAsync("Shared");
sfVideoFile = await isoStore.CreateFileAsync(isoVideoFileName+".mp4",
CreationCollisionOption.ReplaceExisting);
s = await sfVideoFile.OpenAsync(FileAccessMode.ReadWrite);
// Set the recording state: display the video on the viewfinder.
private void StartVideoPreview()
try
// Display the video on the viewfinder.
if (vcDevice != null)
// Create the VideoBrush for the viewfinder.
videoRecorderBrush = new VideoBrush();
videoRecorderBrush.SetSource(vcDevice);
// Display the viewfinder image on the rectangle.
viewfinderRectangle.Fill = videoRecorderBrush;
// Set the button states and the message.
UpdateUI(ButtonState.Ready, "Ready to record.");
txtRecTime.Visibility = Visibility.Collapsed;
// If preview fails, display an error.
catch (Exception e)
MessageBox.Show("Start Video Preview Exception:\n " + e.Message.ToString());
// Set recording state: start recording.
private async void StartVideoRecording()
try
if (vcDevice != null)
await vcDevice.StartRecordingToStreamAsync(s);
rState = 1;
logo.Opacity = 1.0; //brighten logo to indicate that the recording started
StartTimer(); //show time ellapsed on UI
// Set the button states and the message.
UpdateUI(ButtonState.Recording, "Recording...");
// If recording fails, display an error.
catch (Exception e)
MessageBox.Show("Start Video Recording Error:\n" + e.Message.ToString());
// Set the recording state: stop recording.
private async void StopVideoRecording()
try
await vcDevice.StopRecordingAsync();
//sfVideoFile = null;
rState = 0;
logo.Opacity = 0.1;
StopTimer();
// Set the button states and the message.
UpdateUI(ButtonState.Stopped, "Preparing viewfinder...");
//StartVideoPreview();
// If stop fails, display an error.
catch (Exception e)
MessageBox.Show("Stop Video Recording:\n " + e.Message.ToString());
// Start the video recording.
private void StartRecording_Click(object sender, EventArgs e)
// Avoid duplicate taps.
StartRecording.IsEnabled = false;
StartVideoRecording();
private void DisposeVideoRecorder()
if (vcDevice != null)
// Remove the video recording objects.
vcDevice = null;
// Remove the event handler for captureSource.
vcDevice.RecordingFailed -= OnCaptureFailed;
s = null;
sfVideoFile = null;
videoRecorderBrush = null;
private void OnCaptureFailed(object sender, ExceptionRoutedEventArgs e)
MessageBox.Show("Recording Failed!");
private void SaveThumbnail()
Deployment.Current.Dispatcher.BeginInvoke(() =>
var w = (int)vcDevice.PreviewResolution.Width;
var h = (int)vcDevice.PreviewResolution.Height;
var argbPx = new Int32[w * h];
vcDevice.GetPreviewBufferArgb(argbPx);
var wb = new WriteableBitmap(w, h);
argbPx.CopyTo(wb.Pixels, 0);
wb.Invalidate();
using (var isoStore = IsolatedStorageFile.GetUserStoreForApplication())
var fileName = isoVideoFileName + "_iThumb.jpg";
if (isoStore.FileExists(fileName))
isoStore.DeleteFile(fileName);
var file = isoStore.CreateFile(fileName);
wb.SaveJpeg(file, w, h, 0, 20);
file.Close();
//STOP WATCH
private void StartTimer()
dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
dispatcherTimer.Start();
startTime = System.DateTime.Now;
private void StopTimer()
dispatcherTimer.Stop();
private void dispatcherTimer_Tick(object sender, EventArgs e)
System.DateTime now = System.DateTime.Now;
this.Dispatcher.BeginInvoke(delegate()
txtRecTime.Visibility = Visibility.Visible;
txtRecTime.Text = now.Subtract(startTime).ToString().Substring(0, now.Subtract(startTime).ToString().LastIndexOf("."));
// ICLIPS THEATRE - VIDEO PLAYER
private void StopPlaybackRecording_Click(object sender, EventArgs e)
try
if (rState == 1)
// Avoid duplicate taps.
StopPlaybackRecording.IsEnabled = false;
// Stop during video recording.
StopVideoRecording();
// Set the button state and the message.
UpdateUI(ButtonState.NoChange, "Recording stopped.");
if (rState == 0)
// Stop during video playback.
// Remove playback objects.
DisposeVideoPlayer();
StartVideoPreview();
// Set the button state and the message.
UpdateUI(ButtonState.NoChange, "Playback stopped.");
catch (Exception ex)
MessageBox.Show("Stop playback recording Exception:\n" + ex.Message.ToString());
private void StartPlayback_Click(object sender, EventArgs e)
PlayVideo();
private async void PlayVideo()
try
// Avoid duplicate taps.
StartPlayback.IsEnabled = false;
// Start video playback when the file stream exists.
if (VideoPlayer.Source != null)
VideoPlayer.Play();
// Start the video for the first time.
else
//vcDevice.Dispose();
// Remove VideoBrush from the tree.
viewfinderRectangle.Fill = null;
//get the path of iClips-video
StorageFolder isoStore = await ApplicationData.Current.LocalFolder.GetFolderAsync("Shared");
iclip = await isoStore.GetFileAsync(isoVideoFileName + ".mp4");
// Create the file stream and attach it to the MediaElement.
VideoPlayer.Source = new Uri(iclip.Path);
// Add an event handler for the end of playback.
VideoPlayer.MediaEnded += new RoutedEventHandler(VideoPlayerMediaEnded);
// Start video playback.
VideoPlayer.Play();
// Set the button state and the message.
UpdateUI(ButtonState.Playback, "Playback started.");
catch (Exception ex)
MessageBox.Show("Play Video Exception:\n" + ex.Message.ToString());
private void PausePlayback_Click(object sender, EventArgs e)
PauseVideo();
private void PauseVideo()
// Avoid duplicate taps.
PausePlayback.IsEnabled = false;
// If mediaElement exists, pause playback.
if (VideoPlayer != null)
VideoPlayer.Pause();
// Set the button state and the message.
UpdateUI(ButtonState.Paused, "Playback paused.");
private void DisposeVideoPlayer()
if (VideoPlayer != null)
// Stop the VideoPlayer MediaElement.
VideoPlayer.Stop();
// Remove playback objects.
VideoPlayer.Source = null;
iclip = null;
// Remove the event handler.
VideoPlayer.MediaEnded -= VideoPlayerMediaEnded;
// Display the viewfinder when playback ends.
public void VideoPlayerMediaEnded(object sender, RoutedEventArgs e)
// Remove the playback objects.
DisposeVideoPlayer();
StartVideoPreview();
I'm using StorageFile to create the file to save the video to. I think my Stop and Start Video Recording logic is causing ether the video not to write to the file the second time or something else. If you can see something that's not right kindly tell me. Thank
you in advance.

Similar Messages

  • HOW TO STOP THE PROCESS CHAIN WHICH IS RUNNING IN THE PRODUCTION?

    HI ALL,
    CAN ANYONE TELL ME HOW TO STOP THE PROCESS CHAIN WHICH IS RUNNING DAILY AT 5.00 PM. I NEED TO STOP THE PROCESS CHAIN FOR COUPLE OF DAYS AND THEN RESTART IT AGAIN.
    cAN ANYONE TELL ME THE PROCEDURE TO STOP THE ENTIRE PROCESS CHAIN RUNNING IN THE PRODUCTION.
    THANKS
    HARITHA

    Hi,
    First and foremost let me advice you to be very careful while doing this.
    For Rescheduling
    RSPC> chain > Goto > Planning view and
    click on Execution tab > select > Remove from Schedule and then in Maintain variant of start process reschedule for the day you require it to run.
    For terminating active chain
    You can start from SM37, find the process WID/PID then go to SM50 or SM51 and kill it. Once its done come back to RSMO and check the request, it should be red but again manually force to red and save by clicking on the total status button in the status tab. This shuld ensure that the process is killed properly.
    The next step will be to go to targets that you were loading and remove the red requests from those targets.
    Note: For source system loads you may have to check if the request is running in the source system and kill if needed and pull it again.
    But for BW datamart delta loads u may have reset the datamarts in case u are going to pull the delta again.
    Re: Kill a Job
    Re: Killing a process chain.
    Regards,
    JituK

  • How to stop the spinning ball/pizza that is stalling repairs to project on imovie 09? on macosx10.5.8 using iomega and superspeed ext h.d. as storage for the events and projects archive of a wedding video that has had audio sync problems on all share form

    How to stop the spinning ball/pizza that is stalling repairs to project on imovie 09? on macosx10.5.8 using iomega and superspeed ext h.d. as storage for the events and projects archive of a wedding video that has had audio sync problems on all share formats (iDVD, mp4, and last of all iTunes). The project label now carries signal with yellow triangled exclamation “i tunes out of date”.
    To solve the sync problem I’m following advice and detaching sound from all of the 100 or so short clips.  This operation has been stalled by the spinning ball. Shut down restart has not helped.
    The Project is mounted from Iomega and superspeed ext hd connected to imovie09 on macosx 10.5.8.
    What to do to resume repairs to the audio sync problem and so successfully share for youtube upload?

    How to stop the spinning ball/pizza that is stalling repairs to project on imovie 09? on macosx10.5.8 using iomega and superspeed ext h.d. as storage for the events and projects archive of a wedding video that has had audio sync problems on all share formats (iDVD, mp4, and last of all iTunes). The project label now carries signal with yellow triangled exclamation “i tunes out of date”.
    To solve the sync problem I’m following advice and detaching sound from all of the 100 or so short clips.  This operation has been stalled by the spinning ball. Shut down restart has not helped.
    The Project is mounted from Iomega and superspeed ext hd connected to imovie09 on macosx 10.5.8.
    What to do to resume repairs to the audio sync problem and so successfully share for youtube upload?

  • How to stop the changes made for the BP in CRM not to update in R/3

    Hello Gurus''
    we are in need of help......i have an issue...the issue is
    Wht ever the changes we do in crm , need to be not updated in r/3 ....for example if we change the the language for the BP 100 in CRM, it should not update in R/3
    Where as in our case the data is updateing in R/3
    Here by requesting you all to help me out how to stop the updaation of some changes  which are made in CRM , that should not be in R/3
    Point will be given......
    Regards
    sreeram Raghu

    Hello
    Thanks for ur reply.........
    We have the following business process
    We create BP with role prospect in CRM, once the prospect is ready to buy the product we conver the prospet in to customer and thesame  customer is replicated in R/3 fro sales.
    What i am looking at is for the customer we created in CRM if we change any data that should be updated in r/3..it may be nay like name address ...language....etc.....
    can u help me out...as u told me to unassig/delete the subcription:All Business partner(MESG) under that we have --
    >publication>All BP(MESG)->Replication object-->Bupa_Main
    >Sites-->SQ1_300
    If we do this process does the issue will fix or else we need to do soem thing more...
    Thanks in advance
    Regards
    Sreeram Raghu
    +91-99 94 94 82 72

  • How to stop the waterflow?

    Hi,
    I need to make the water coming from the shower, when shower is clicked.
    And the water should stop after 5 seconds.
    The code is below.
    The water is flowing nicely. But I do not manage to stop it.
    I added a timer, which starts when the shower is clicked. And should stop the waterflow after 5 seconds have passed.
    With the lines
    if (stop = true)
         break;
         trace("break");
    it looks like the for loop is breaking right from the start, from the first second. But not completely, somehow 1 or 2 drops are flowing.
    Without these lines nothing is happening when the time is over (5 seconds from clicking the shower). Water is just flowing.
    Can someone help? How to stop the water flowing after 5 seconds and clean of the array and stage from the waterdrops?
    Many thanks in advance!
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    var WatertropArray: Array = new Array();
    var WaterArea01: MovieClip = new WaterArea();
    var WaterBorder01: MovieClip = new WaterBorder();
    var timer: Timer = new Timer(5000, 1);
    var stopp: Boolean;
    var i: uint;
    Shower.addEventListener(MouseEvent.CLICK, waterFlowStart);
    function waterFlowStart(event: MouseEvent): void
                    addChild(WaterArea01);
                    WaterArea01.x = WaterArea00.x;
                    WaterArea01.y = WaterArea00.y;
                    WaterArea01.alpha = 0;
                    addChild(WaterBorder01);
                    WaterBorder01.x = WaterBorder00.x;
                    WaterBorder01.y = WaterBorder00.y;
                    WaterBorder01.alpha = 0;
                    stopp = false;
                    timer.addEventListener(TimerEvent.TIMER, waterFlowEnd);
                    timer.start();
                    addWaterdrops();
                    Shower.removeEventListener(MouseEvent.CLICK, waterFlowStart);
    function addWaterdrops(): void
                    for(var i: uint = 0; i < 100; i++)
                                   var waterDrop: MovieClip = new Waterdrop();
                                   addChild(waterDrop);
                                   waterDrop.x = Math.round(Math.random() * stage.stageWidth / 1.5);
                                   waterDrop.y = Math.round(Math.random() * stage.stageHeight / 3);
                                   waterDrop.alpha = 0;
                                   waterDrop.rotation = -12;
                                   WatertropArray.push(waterDrop);
                                   trace("waterdrops added");
                                   moveWaterdrops();
    function moveWaterdrops(): void
                    waterDrop00.addEventListener(Event.ENTER_FRAME, waterFlow);
    function waterFlow(event: Event): void
                    for(var i: uint = 0; i < WatertropArray.length; i++)
                                   WatertropArray[i].y += 8;
                                   WatertropArray[i].x += 5;
                                   //trace(i);
                                   if(WatertropArray[i].hitTestObject(WaterArea01))
                                                   WatertropArray[i].alpha = Math.random();
                                                   WatertropArray[i].scaleX = Math.random();
                                                   WatertropArray[i].scaleY = WatertropArray[i].scaleX;
                                   if(WatertropArray[i].hitTestObject(WaterBorder01) || WatertropArray[i].x > stage.stageWidth || WatertropArray[i].y > stage.stageHeight / 2)
                                                   WatertropArray[i].x = Math.round(Math.random() * stage.stageWidth / 1.5);
                                                   WatertropArray[i].y = Math.round(Math.random() * stage.stageHeight / 3);
                                                   WatertropArray[i].alpha = 0;
                                   if(stopp = true)
                                                   break;
                                                   trace("break");
    function waterFlowEnd(event: TimerEvent): void
                    trace("TIME OVER");
                    stopp = true;
                    stoppTrue();
    function stoppTrue(): void
                    for(var i: uint = WatertropArray.length; i > WatertropArray.length; i--)
                                   remove(i);
    function remove(idx: int)
                    removeChild(WatertropArray[idx]);
                    WatertropArray.splice(idx, 1);
                    trace("REMOVED");
                    removeChild(waterDrop00);
                    trace(i);

    thanks again, kglad.
    changed the for-loop and it is reaching now the last functions as well.
    but there is still a but  ... an error message.
    function waterFlowEnd(event: TimerEvent): void
    trace("TIME OVER");
    stopp = true;
    stoppTrue();                                                       // line 106
    function stoppTrue(): void
    for(var i: uint = WatertropArray.length-1; i >= 0; i--)
    trace("stoppTrue");
    remove(i);                                                         // line 115                                                    
    function remove(idx: int)
    removeChild(WatertropArray[idx]);                   // line 123
    WatertropArray.splice(idx, 1);
    trace("REMOVED");
    //removeChild(waterDrop00);
    trace(i);
    and the output panel gives the following (tested with 5 water drops, 5 items in array):
    TIME OVER
    stoppTrue
    REMOVED
    0
    stoppTrue
    REMOVED
    0
    stoppTrue
    REMOVED
    0
    stoppTrue
    REMOVED
    0
    stoppTrue
    REMOVED
    0
    stoppTrue
    TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at TitavannisinglisekeelneAS3_fla::MainTimeline/remove()[TitavannisinglisekeelneAS3_fla.Main Timeline::frame1:123]
    at TitavannisinglisekeelneAS3_fla::MainTimeline/stoppTrue()[TitavannisinglisekeelneAS3_fla.M ainTimeline::frame1:115]
    at TitavannisinglisekeelneAS3_fla::MainTimeline/waterFlowEnd()[TitavannisinglisekeelneAS3_fl a.MainTimeline::frame1:106]
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
    What is that error message trying to tell me?   

  • How to stop the internal batch session

    Hi ,
    How to stop the internal batch session, which is triggered from the program.
    When I execute the program, there is an batch session, which starts processing in parallel with the program, and causes an error message for the program, so the further process is affected.
    I tried finding the session through the Transactions - SM35, SM37. However, I could find any session in my name.
    However, when I try thro SM04, I could find an session with the same error message. But I am not able to end the session.
    Pleas advise.
    Thanks,
    cartesian.

    Go through transaction SM50. In case you have more than one application server (transaction SM51 will show) you can also use SM66 which will show all running processes on all application servers.
    With SM50 you will only see the process running if it is running on the same application server you are logged on to.
    Mark the process and use menu 'Program/Session - End Session' or 'Process - End with or without Core'
    Hope that helps,
    Michael

  • How to stop the auto-start of log reader agent (replication) right after my database is restored?

    I have the scenario where the SQL server is restored (after migration).
    This database has transactional replication set-up on one of the databases. When I do a manual delete and restore of the database, I see that the replication starts right after the publisher and subscriber are restored.
    Replication agents should not start and run before the integrity checks are completed. How to stop the replication from auto starting right after the migration?
    Thanks in advance - Jebah

    Thanks Pradyothana, I have disabled the logreader, distribution agents through sp_update_job in Tsql script. I have also verified that there are no pending transactions to be replicated to the subscriber, I see that the job is still being executed. Is there
    any other way to disable the jobs?
    Steps I followed
    Started with a Working publication and subscription
    Disabled the jobs (log reader and distribution agents)
    Backed up publisher, subscriber, distribution and msdb
    Deleted the publication, subscription, publisher and subscriber
    Restored the publisher, subscriber, distribution and msdb
    Enabled the jobs and executed sp_replrestart
    Observations/Issues
    Replication does not work
    Replication monitor does not show any error
    Jobs are shows as enabled but not started in job monitor
    Not able to start/stop the log reader and synchronization manually.
    I am not sure if I have missed something while restoring the db.
    Thanks in advance

  • How to stop the running infospoke

    Hi Experts,
    there is a infospoke is still running so long time, it's incorrect, i'll cancel it as kick off the dependenies, i have no idea to how to stop the running infospoke. Anybody could tell me how to do it. thanks in advance.

    hi denny,
       Go to SM37 , find the job , stop the process
    or
       To stop the job find the job with the help of the request name ( TC - SM37 ),then in the job Details find the PID .
    find the process in the process Overview (SM50 / SM51 ).
    Set the restart to NO and Cancel the process without core
    u can also see these threads that are already posted:
    stopping v3 run job LIS-BW-VB_APPLICATION_02_010
    how to cancel or change the background job which is scheduled
      In SM37, for the job , click on Step button. Then from the menu Goto > variant. You can see the process chain name here.
    sure it helps
    Thanks
    Varun CN

  • How to stop the timing out of web Discoverer Plus

    I was working in Plus, and it drove me crazy that I would loose my work because I kept my session open and it would time out.How to stop the timing out of web Discoverer Plus?
    Thank you,
    Olga

    Please check Discoverer configuration guide which tells you which parameter to change in preference file(pref.txt).I think you change the value.

  • How to stop the report from Web!

    hi,all!
    Now I can start a report from Web with schedule parameter!Can you tell me how to stop the report via the Web server?Or tell me with which patameter.Thank a lot.

    hello,
    there is a CGI/Servlet command called killjob which you pass the job-id of the job you want to kill.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                           

  • How to stop the Dialog from being dragged

    I was hoping that someone could tell me when calling a Dialog from Jframe, a how to stop the Dialog from being dragged
    while a dialog is showing.
    When it is visible I can still click and drag the Dialog
    I want to set it so you can not drag it until the dialog has be closed.

    If you don't have access to the parent frame, a "hack" that usually works:
    Frame frame = Frame.getFrames()[0];
    if (null != frame && frame instanceof JFrame){
    JFrame jf = (JFrame)frame;
    JDialog jd = new JDialog(jf, "title");
    ... code here ...
    As each JFrame (or Frame) is opened, its stored in the array of Frames that you can get. Same thing with Dialog.getDialogs(). Almost always, at least so far for me I've never had this problem, the [0] index is the main window opened, or the parent/top frame. I'd put the check in there to be safe and make sure its a JFrame and usually you'll only have the one JFrame.

  • How to stop the upload process?

    Hi,
    i had by mistake started the other upload than the required!
    How to stop the current upload process,( generally it takes lot of time to upload the data as data is huge )
    Thanks,
    Ravi

    Hi Ravi Kottur 
    Just follow the things like Sunil suggested check one more just kill the process
    manually and goto RSMO and in the Monitor QM status just Amke it red manually
    for the load which you want to stop and then go to that particular info provider
    Manage and delte the request.. 
    Hope itz clear a little atleast...!
    Thanks & Regards
    R M K
    ***Assigning pointz is the only way of saying thanx in SDN ***
    **Learning the thingz is never end process if u stop it will Be a devil if u continue it will be a divine***
    > Hi,
    >
    > i had by mistake started the other upload than the
    > required!
    >
    > How to stop the current upload process,( generally it
    > takes lot of time to upload the data as data is huge
    > )
    >
    >
    > Thanks,
    > Ravi

  • How to Stop the method Action When an Exception Occur in other Method

    Hi All ,
    public void action( Event clientEvent) {
    startAction();
    JOptionPane.showMessageDialog(null, getDocumnetId());
    how to Stop the method action ( "action" ) if an exception occur in the method ("startAction")
    ( if the exception occur we doesn't need to show the JOption Message )

    Hi,
    try FacesContext.getCurrentInstance().renderResponse();
    Frank

  • How to stop the message "press 1 for ..."

    Hello, while I'm at it...does anyone know how to stop the instructions that get attached to my outgoing voicemail message?  You know, the one that says, press 1 for __, press 2 for __, press * to send a fax.....in my old phone (also with Verizon) it didn't have that message. 
    Thanks all!

    I took this problem to a genius.  He removed the SIM card and added a new "blank" card from AT&T.  Using this SIM we went to setting an turned cellular data off.  Then we put the Apple SIM back in the machine.  Now you can turn off the cellular so you will no longer get the messages.  To end this practice, sign up with a carrier.  Just click the button in the Settings... menu.

  • How to stop the background job "Sap_collector_for_job_statistic"

    Dear All,
    Kindly let me know how to stop the Background job "Sap_collector_for_job_statistic" which is running everyday.
    We want to stop this background job.
    Kindly suggest.
    Regards,
    Mullairaja

    Select the Job using SM37 transaction. In the Menu Choose
    Job ---> Cancel Active Job.
    Before you do this it may be good idea to check the pid using SM50.
    It will be using a Background work process. Check the pid and the status.
    Select the same and in the Menu Choose Process --> Cancel with Core.
    Refresh and check in SM37 for the Active and Cancelled Jobs.

Maybe you are looking for

  • Macbook pro 15" will not boot up

    went to turn on computer, and get a blank screen, sucked OS X disk and will not eject! have tried rebotting from disk, installing, and even gon into utilities..but nada!

  • Some problem

    hi to every one ,in fact i got problem with my mobileme  in my machine ,i cant sing in system preference mobileme,even i can sing in in mobileme webside ,please i need help

  • Maintain Check Lots

    Hi Experts, I'm trying to maintain check lots in FCHI for several housebanks. I have successfully maintained the check number series on all housebanks except for one.  The error below ppeared when I tried to save the data. Check the format of the che

  • Strange Behaviour when opening pdf files using search results

    Hi I have observed inconsistencies between opening a pdf file when in the document library itself (it opens in a browser - good). However, when I click on a the same file in my search results having used Search and the Search Centre it opens in the a

  • Lightroom Exporting Issue

    Hi everyone, sorry if this is repetitive; I hadn't seen it posted. I'm a new Lightroom user and am having trouble exporting the photos that I've made my edits/adjustments to.  I follow the steps as outlined in various tutorials on exporting, but afte