Exit out of video and return to stage frame 1

Ive manged to create a flash player that incorporates a video
using a online
tutorial with the code below.
All is working well but at the end of the video I want to
exit out of the
video and return to the stage at frame 1. The reason being
is; before a user
hits play an interface image (containing info) is displayed.
When they hit
the play button the video appears and plays over the
interface image.
problem is at the end of the video the layer containing the
image is still
covered by the video. when the video finishes I need a line
of code to exit
and return the player to the original state without the
presecence of the
video layer.
any ideas? thanks in advance
Brett
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
rewindButton.onRelease = function() {
ns.seek(0);
ns.play();
playButton.onRelease = function() {
ns.play("modular.flv");
pauseButton.onRelease = function() {
ns.pause();
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
var duration:Number;
ns["onMetaData"] = function (obj) {
duration = obj.duration;
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 200;
loader.scrub._x = ns.time / duration * 200;
var scrubInterval;
loader.scrub.onPress = function(){
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit, 10);
this.startDrag(false,1,this._y,198,this._y);
loader.scrub.onRelease = loader.scrub.onReleaseOutside =
function () {
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus,100);
this.stopDrag();
function scrubit() {
ns.seek(Math.floor((loader.scrub._x/200)*duration));

Inside the videoStatus() function Check the Current Time and
Total time for video completion. Some time the Video doesn't have
exact Time when comparing to the Total duration so use Math.floor
to compare. if you still facing problem also check the Buffer
status and Video status too.

Similar Messages

  • My first gen. iPad exits out of apps and safari at random times when I am trying to use them. So I basically can't do anything on it. Is there some way I can fix this?

    Crashing apps. What do I do to fix it?
    My first gen. iPad exits out of apps and safari at random times when I am trying to use them. So I basically can't do anything on it. Is there some way I can fix this?

    I have the same problem.  Yahoo Sportacular aborts every time I try to open it.  It attempts to load and then the device goes right back to the home screen.  The problem started April 26 after I switched leagues from NHL to NBA. Closing all apps and Restarting doesn't solve solve the problem.
    All other apps on the iPad work fine.  IPad2, OS6.
    Any other suggestions?  I suppose I could delete the app from the iPad and try re-installing it

  • I have an iphone 4s that i got last week and i set it up just using the phone. today my dad restored it as my mothers iphone so i lost all of my data. I tried to restore it as my original phone i had but i exited out of itunes and now my phone wont showup

    I have an iphone 4s that i got last week and i set it up just using the phone. today my dad restored it as my mothers iphone so i lost all of my data. I tried to restore it as my original phone i had but i exited out of itunes and now my phone wont showup in itunes or on my computer

    Did you fail to import them to your computer before restoring?
    Not good.
    They are likely gone.
    You can try restoring from backup.

  • Sometimes when I am texting the screen freezes.  I have to go out of messages and return and then I can send.

    Sometimes when I am texting the screen freezes.  I have to go out of messages and return and then I can send.

    Hello mdcrab1,
    Thank you for participating in the Apple Support Communities.
    If your screen freezes sometimes when you're texting until you quit and re-launch Messages, try these troubleshooting steps first:
    Restart your device and check for updates
    Restart your device.
    Check for a carrier settings update.
    Check for an iOS software update.
    You can find these steps and more troubleshooting tips at this link:
    If you can't send or receive messages on your iPhone, iPad, or iPod touch - Apple Support
    If the issue continues, and it only happens in the Messages app, I recommend trying the rest of the steps in the above article.
    If the screen freezes sometimes when you're using other apps, the steps in this article can help:
    If the screen on your iPhone, iPad, or iPod touch doesn't respond to touch - Apple Support
    Sincerely,
    Jeremy

  • Honeycomb some time navigating in tabs does not work. if i select tab a from tab b, the header changes but not the page. It does if i move out of app and return

    using samsung p6200.
    If i open multiple tabs (say more than 14) so say ifi am on 14 tab and back to 12th then it will switch properly but if i go back to first tab it wont show the webpage. some tabs will show and some wont. sometime the tab will show a type of progressive image of tab which wont get more clear. But tab switches if i move out of application and return. example i am not tab 14 say gizmodo.com and i return to tab 2 say wikipedia then it wont change the page. if i go to task manager and return back to firefox then it will show the page.

    I agree that it cant be as smooth but this issue is replicable in much less tabs as well.. around 4. Also i dont see any reason not to open 14 tabs as when i run Ubuntu on sam tablet parallel to Android, i can open tabs in firefox in Ubuntu. I understand the architecture difference of green bot and ubuntu for which i hate android. i wanted to hilight that firefox is working fine but somewhere it is unable to fetch data from its cache, while when OS reloads the app from background to foreground, the cache is retrieved.

  • TS3274 My ipad has been lagging, it will exit out of apps and on safari will bring up pages that I searched awhile ago before bring up the current page. what could be the problem?

    My ipad mini has recently been exiting out of apps on its own. It has also been bring up old searches when I log into safari things I've searched months ago.  I have the latest update. I can't figure out why it's been doing this.

    Clear Safari, close all apps, and reboot your iPad.
    Go to Settings>Safari>Clear Cookies and Data.
    In order to close all of your apps, double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to the app that you want to close and then swipe "up" on the app preview thumbnail to close it. Close all apps this way.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • How can I exit a collection window and return to parent folder?

    I would "love" to have a place where I could ask the simple questions like this that come up and seem so simple to those who know, they don't mention the details I need like how to close a working collection window and move back to the parent folder of that collection.
    I've been stuck for two days (it happened before) in a window (library module) with a collection of 8 photos.  I cannot find any way to close that window or go back to the library collection of hundreds of photos from which it was chosen.  It's very frustrating to be stuck in this window, perhaps forever?
    How do I close these windows.  Isn't there a "back" button?
    I started in Photoshop 3, then 5, then 7, then stopped renewing due to difficulty learning PS until the Adobe CC became available with the many tutorials.  It was great learning how to make a collection, but the tutorials didn't mention how to get back to the main folder where the collection was chosen.  So again, I"m stuck at an even lower level of functioning than with photoshop alone.
    I had to copy a photo and open it separatly in Photoshop just to be able to work on it.  Yesterday I could "edit in Photoshop cc" with right click.  Today, it won't even do that.
    I suspect now two things are working to prevent me from working properly on my photos but have no clue how to fix this.

    In the library module, left-hand panel, there are different sections or tabs. Collections is one of those tabs near the bottom out that panel. If you scroll up in that panel you should see other sections, one of which is "Folders". If that isn't showing, then right-click on the Collections section heading and make sure there are checkmarks in the sections that you want to have displayed. To return to the folder you need to go to the folders section and find the folder in your list.
    Another way to return to a folder is to click in the area in this illustration:
    Doing so will present a list of folders that you have recently been inside of. You can click on one of those folders and return directly to it.

  • Taking out IF's and returning a boolean expression

    I thought a better way to implement this later method might be to remove the IF's and just return a boolean expression true or false if one date object is later than another date object. I almost have it correct but one case is still not outputting correctly.
    Heres the return statement:
    return ((year > otherDate.year)||(year==otherDate.year)&&(month > otherDate.month)&&
                        (day > otherDate.day));

    someone told you that the code looked right? humm... don't look right to me.
    basically if the years are different you are done and know the answer but if the years are the same you must look to the month
    So why don't you have exactly the same situation to deal with the case where you only look at the day if the months are equal? You need an extra set of parens, and another || condition and a term involving == months.
    Nope, your code just mixes together the code for checking days and checking months.
    You CAN do this all in a single boolean expression, but it is nested two levels deep and too long to fit on a line. And you got it wrong. (this is a hint that the person reading the code will also not be sure that the code is correct)
    You have done no one a favor by removing the IFs and using a single complicated boolean expression.

  • My vertical scrollbar sometimes resizes my window, and I have to exit out of Firefox when this happens. Why?

    Sometimes, when I try to move my vertical scrollbar up or down, the entire window will shrink or expand, and the only way to make this go away is for me to exit out of Firefox and then re-open Firefox. It seems to happen randomly, and often happens several times a day.

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • How do i fade out a video clip?

    how do i fade out a video clip?

    ChiDonDada
    What version of Premiere Elements are you using and on what computer operating system is it running?
    In the absence of that information, I will generalize, tending toward Premiere Elements 11....
    a. Right click the Expert workspace Timeline video, select Fade from the pop up menu and then the wanted Fade Audio or Video command.
    b. In version 11, you could click on Applied Effects/Applied Effects Palette/Opacity Panel and the shortcut Fades there.
    c. You could keyframe the Opacity property in the Applied Effects Palette/Opacity or via the video track content rubberband at the Timeline Level.
    Please supply more information for fading in out your video and audio track contents.
    Thanks.
    ATR
    Add On...If you have Premiere Elements 11, you may be interested in the information on these Fades found in one of my blog posts
    http://www.atr935.blogspot.com/2013/06/pe11-timeline-fade-out-shortcuts-and.html

  • Can't exit out of dialogue box in After Effects

    Hi,
    A couple of times now I have accidently reduced my cameras scale below 0% and have had this dialogue box appear.
    When I click 'OK' it just keeps popping up again. I have no way of exiting out of it and resuming my work. The last couple of times I have forced closed After Effects, but as a result, I lost all my work since my last save!
    This time I have done too much to risk loosing it all, does anyone have any suggestions of how to exit this dialogue box without having to exit the program and lose my work?
    Thanks for your help!
    Kim

    The problem is easily reproduced, and I can't find any way out of it.  It's worth posting as a bug to the AE team, because really the software should be able to escape from the infinite loop it creates.
    In the short term, it appears to me you have no option but to force quit.  Hopefully you are using regular auto-saves so you don't lose more than a few minutes work.
    In the future, I'd recommend you simply get diligent about not editing the scale of any camera parented layers.  Ultimately this is a user error, after all.

  • Just updated Firefox, then updated Adobe Flash player and videos and voice are all choppy. Please help.

    I allowed Firefox to update. It prompted that I may need to update my adobe player. I checked my aol account and tryed to watch a video and it would not work. I updated my Adobe flash player, shut down my pc then went back online to check out a video and it was all choppy including the audio.

    Please ask your question on a forum for the Flash Player

  • Firefox won't close down all the way after watching a video. I exit out, and the sound continues. When I try to re-open firefox, I get a message about how I have to restart my computer. How do I fix this?

    Basically whenever I watch a video and I exit out of the video I have to restart my computer to get Firefox back open. If I exit out or go to a new page while the video is playing, the audio continues like nothing has happened. I've checked my task manager and it shows that Firefox is closed. When I try to re-open Firefox I get an error message that tells me Firefox is running but is unresponsive and I have to restart my computer. How do I get it to stop doing this?

    Try holding control, alt and delete down in succession and then a dialogue box will appear with windows task manager. Once open click on the Processes Tab and look for firefox.exe. Highlight this and then click end process. It should come up with a warning but just click Yes. This should then close firefox and allow you to reopen it from your desktop without shutting down your computer. Hope this helps.

  • I just downloaded a video in HD, but I found out after the download was over my computer doesn't play HD videos. Is there any way I can return the video and get the SD version, or upgrade my computer so it will play the HD video?

    I just downloaded a video in HD, but I found out after the download was over my computer doesn't play HD videos. Is there any way I can return the video and get the SD version, or upgrade my computer so it will play the HD video?

    From http://support.apple.com/kb/HT3209
    When you purchase an HD video on a supported device or computer, only HD video will be downloaded. To download the SD version, you need to download the video again from your Purchased page. Conversely, if you purchase an HD video on an unsupported device, the SD version will be downloaded. Then, you will need to download the HD version from your Purchased page. Learn more about downloading previous purchases.

  • When I open an app, it exits out of the app and returns to the home screen.

    When I open up apps, it exits out and returns to the home screen.

    That's not true. In most cases this is a memory issue and in some cases simply a bug. Most often it can be corrected by either resetting the iPad or closing all other apps and restarting the app in question.
    You can try resetting your iPad by simultaneously pressing and holding the Home and Sleep/Wake buttons until you see the Apple Logo. This can take up to 15 seconds so be patient and don't release the buttons until the logo appears.

Maybe you are looking for

  • How do I print a specific sized picture.

    I'm trying to print a picture to fit in a frame size of 6 5/8 X 4 5/8. (6.625 X 4.625). The size of the picture in pixels is 416 X 288. The width is more important than the height. I've used the "constrain" feature in iPhoto, to constrain the size to

  • Network Utilization script throws error after re-executing

    Hi everyone, I have a piece of code that finds the network util of a fileserver and if it is over 75% it stops executing the script. The script works the first time but after re-executing it, it throws an error. I've tried to null out all the variabl

  • Saving logo for Web

    I am having trouble with saving my logo for web. I went to Save for web but what are the specs to save as PNG? I am using this logo for signature use in an email..but when I print it out it look very pixeleted. The logo size I reduced to 1.5 in X 0.4

  • Configuration Of Cst & Vat With Taxinn

    Hi Expert I have followinfg Scenario My Vendor is in Say ' X ' state of India And the good Recieving Plant Is ' Y' State of India If  a)  both states are same  -- local tax ( Vat) should be applicable as per Taxinn Procedure     b)  both states r dif

  • [débutant] Extraire un signal

    Bonjour, Sur l'image ci-dessous vous pouvez voir le signal dont je fait l'acquisition, je sais que j'ai une répétition d'un signal plus long dans le temps toute les environ 5 [s] +ou- 0.5 [s]. Comment est-ce que je peut extraire cette information, in