Get a FLV in a loop to a specific image using Netstream (as3)

To preface this my AS3 knowledge is quite new. As long as the thread titled readings, I try to get an FLV to play through its entireity and loop and then back to a specific image and keep the point constantly proofreading. After much digging, I found a video tutorial using AS3 that worked! Here's my current situation even though I can't find the right code to be inserted to make the loop video back on the image I want. The FLV just stops and go back at the end of the video. Here is my code so far:

var video:Video = new Video(1980, 1020);
addChild(video);


var nc:NetConnection = new NetConnection();
nc.connect(null);


var ns:NetStream = new NetStream(nc);


var meta:Object = new Object ();
meta.onMetaData = function (meta: Object)
{
          trace(meta.duration);
}


ns.client = meta;


video.attachNetStream(ns);


ns.play("All.flv");

In the end, the video should play throughout an only on the first load and then looping back to frame 319 and play towards the end and loop back again in order to frame the 319 infinitely. I think I'm almost there, I just need help in getting my code works appropriately. I've done this before by using "gotoAndPlay()" but the loop is not seamless so it gives one pause seconds before looping back. I hope using a function of Netstream that this will be resolved. I'd appreciate any help!

You can use:

Video: video of var = new Video (1980,1020);

addChild (video);

var nc:NetConnection = new NetConnection();

NC. Connect (null);

var ns:NetStream = new NetStream (nc);

ns.addEventListener (NetStatusEvent.NET_STATUS, netStatusF);

NS.client = this;

video.attachNetStream (ns);

NS. Play ("All.flv");

function onMetaData(obj:Object):void {}

trace (obj. Duration);

}

function netStatusF(e:NetStatusEvent):void {}

Switch (e.info.code) {}

case "NetStream.Play.Stop":

NS. Seek (2);

break;

}

};

Tags: Adobe Animate

Similar Questions

  • Stop a loop file in specific image

    Ive created a banner ad in 1.0 to 2.0. The announcement only a loop 4 times then it must stop. The following code for this to the 170 member. The timeline is of length 170 images and copy the code next is retouching on a layer actions on framework 170 - however, I would like to the final stopped flash swf to happen to frame 155. I can't put just this code on frame 155 - it ignores a large part of the animation (from 155 to 170 executives) I want to keep in the loop.

    Any help is greatly appreciated.

    Loop = loop + 1

    If (loop < 4) {}

    this.gotoAndPlay (2);

    } else {}

    This.Stop ();

    }

    use:

    Loop = loop + 1

    If (loop == 3) {}

    {this.onEnterFrame = function ()}

    {if(this._currentframe==155)}

    This.Stop ();

    delete this.onEnterFrame;

    }

    }

    }

    this.gotoAndPlay (2);

  • Get the data of while loop!

    Ladies and gentlemen,

    I am new to Labview, and I have many doubts!

    But now I need a help of a simple question!

    I need to get a Boolean status within a while loop and together a status outputs digital DAQ, but as I read in this forum, is impossible to use a tunnel to do that!

    I tried to use a LOCAL VARIABLE, but I think that I don't know how to use it!

    Please, check the photo and help me if possible... How can I get the status in real time of the Boolean (saida)?

    Thank you!

    Use a single loop that continues to turn and place all the code, including the output of data acquisition on the inside (why use separate loops if all run at the same rate?).

    To better help, fix the real VI instead of an image. What are the typical values for MP1... MP3? What is the significance of the division by one?

    You could also write simple lines after each loop, remove the dependecy of table built, data which cannot be done once all loops have ceased.

    (I also would not use one of these weird case of departure strutures.) Is there a while looping around it or you use "continuous operation"?)

  • I can't use the link 'Check the seats' on Delta when I use Firefox, but Safari works fine. I get the message "not available at this time" when you use Firefox, but when I go on Safari it works just fine.

    I can't use the link 'Check the seats' on the website of Delta Airlines when I use Firefox, but Safari works fine. I get the message "not available at this time" when you use Firefox, but when I go on Safari it works just fine. I love Firefox but it sucks!

    This problem may be caused by corrupted cookies.

    Clear the cache and cookies from sites that cause problems.

    "Clear the Cache":

    • Firefox > Preferences > advanced > network > storage (Cache) offline: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox > Preferences > privacy > Cookies: "show the Cookies".
  • I have a macbook pro: 2.3 GHz Intel Core i5, 4 GB of 1333 MHz DDR3 Ram. 10.7.5 version. When I open some websites, I get a message that web browser is obsolete. I use safari. When I do a software update, it says that the software is up-to-date. Help, plea

    I have a macbook pro: 2.3 GHz Intel Core i5, 4 GB of 1333 MHz DDR3 Ram. 10.7.5 version. When I open some websites, I get a message that web browser is obsolete. I use safari. When I do a software update, it says that the software is up-to-date. Help, please.

    Safari maxes in a version of Mac OS x.  New version of Mac OS x would be needed for the new version of Safari.

    Firefox is not limited within an OSX and probably has a version that works.  Chrome may as well but is a Devourer of resources.  Opera is a third option.

  • can not install the latest version of itunes, get the error msg: "the component you are trying to use is on a network unavailable resource."

    Can not install the latest version of iTunes.  Everytime I try I get this error msg: "the component you are trying to use is on a network resource that is unavailable."

    Then I click OK and get this msg: could not find the path C:\users\my name\appdata\local\apple\apple software update\itunes6464.msi.

    I need to sync my new iPad pro and because used to synchronize requires the latest update, I have my laptop but I never have syncd my ipad with this computer and if I try to backup if I agree to erase everything on my device and sync with the laptop.  Of course, I don't want to do what I want to see everything on the NEW ipad from the old version.

    I went through the troubleshooting and found a solution, but when I had finished making all this trouble report said, there was a pesky itunes shortcut file on the left and I can not delete this shortcut, regardless of how many times I try.  If I can't remove it, the Installation will be terminated.  How can I delete this file?

    For general advice, see troubleshooting problems with iTunes for Windows updates. Start by Missing MSI errors .

    The steps described in the second case are a guide to remove everything related to iTunes and then rebuild what is often a good starting point, unless the symptoms indicate a more specific approach.

    Review the other boxes and other support documents list to the bottom of the page, in case one of them applies.

    More information area has direct links with the current and recent buildings if you have problems to download, must revert to an older version or want to try the version of iTunes for Windows (64-bit-for old video cards) as a workaround for problems with installation or operation, or compatibility with QuickTime software or a third party.

    Backups of your library and device should be affected by these measures but there are links to backup and recovery advice there.

    TT2

  • I now get [error number: 0 x 80070424] when I try to use windows update.

    I now get [error number: 0 x 80070424] when I try to use windows update. Also I can not update microsoft UAA!

    Hi KirkOKC,

    Follow the steps described in this document to resolve the Windows Update error 0 x 80070424.

    Let us know if that helps.

  • Is it possible to get a copy of XP Home that is activated by using the activation code provided with the computer?

    My sister recently gave me his old laptop no hard drive and no disk Windows XP.  I installed a HARD drive and installed Windows XP Pro using my own drive I bought for my office (just to check that everything works), but since it is already registered, I can not continue to use it.  I want to remove and reinstall XP Home.la original with the original activation code label is still on the case.  Is it possible to get a copy of XP Home that is activated by using the code on the label?

    Contact the computer manufacturer to buy a disc of installation for the laptop.  If the drives are available, the cost is usually low.

  • All of a sudden, I started getting double e-mails. I am running Vista and using windows mail. Does anyone have a solution?

    All of a sudden, I started getting double e-mails. I am running Vista and using windows mail. Does anyone have a solution?

    Usually, it is because the two copies of the account are set up.  Go to tools | Accounts | Mail and see if there is more than one copy of the account.  If not, then try to compact and repair the database (www.oehelp.com/WMUTil/) and analysis of e-mail what to do is not enable in your anti-virus software (see www.oehelp.com/OETips.aspx#3).  If this does not resolve things, try to delete your account, close and reopen WinMail and then add the account back again.

    Steve

  • When activating my windows vista ultimate product, I get the response that the license key is already in use, let me know how to solve this problem?

    When activating my windows vista ultimate product, I get the response that the license key is already in use, let me know how to solve this problem?

    KiranS Hello,

    Judging by your post, it seems that Microsoft had technical problems when you tried to activate your copy of Vista by phone. Have you tried phoning the line Activation again?

    The normal procedure is that if the activation fails through the automated system, the call is transferred to a real person. It is the only available option if you get the error 'use existing product key'.

    I can only suggest that you try again the activation by phone and see what happens.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Expert - consumer: www.winuser.co.uk |  vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com

  • Can we get all the contacts that are in the Blackberry phone using the PIM functionality that is, JSR 75?

    Hello guys,.

    I need to develop an application that should support devices such as the Bold 9700 and Pearl, Storm, Blackberry Curve 8900. If I go for j2me / MIDP, what will be the limits that I face in blackberry? Is it recommended to go for j2me or device-specific development of RIM.

    Can we get all contacts into the Blackberry phone using PIM JSR 75 i.e and other native features features if developing an application in j2me for blackberry. I guess that the user interface will be completely different, but we support all the controls that supports the JDE?

    Is someone can you please tell me if I can get access to all contacts present in the Blackberry phone using 'javax.microedition.pim' API - that is not specific to the RIM. Has anyone tried this one virtually on the phone or emulator?

    Y at - it something like a website where I can test my application on Blackberry devices as in the Nokia Forum Sites?

    Thanks in advance.

    Kind regards

    Raki

    JSR75 is supported

    However, there are some extensions specific "Blackberry" for the base PIM classes. These add a few extension Blackberry PIM data. I think that you can only use the JSR 75 classes as long as you don't need BB extensions.

    For the test, the development environment provides the device simulators.

  • How can I get rid of the background yellow when I display an image using the photo viewer?

    Original title: Windows Photo Viewer

    How can I get rid of the background yellow when I display an image using the photo viewer? It gives images a yellow cast.

    Thank you

    Ed Fuller

    How can I get rid of the background yellow when I display an image using the photo viewer? It gives images a yellow cast.

    Thank you

    Ed Fuller

    Hi Ed

    See the following for the patch thread.

    Windows 7 photo viewer shows images with an orange and yellow tint:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-pictures/window-7-photo-viewer-shows-pictures-with-orange/e5d31c5e-ae84-4EBD-bbe9-9428f410560b

    Concerning

  • I cannot set up my email account and get prospects to accept it. I am tring to use a gmail account, I am new to this and don't know what iam do any help would be great

    I cannot set up my email account and get prospects to accept it. I am tring to use a gmail account, I am new to this and don't know what iam do any help would be great

    Hello

    1. you try to add the Gmail account in Outlook?

    2. are you referring to Outlook.com or Microsoft Office Outlook?

    If you are referring to Outlook.com, then I suggest you according to the application in the Windows Live forum to improve assistance:

    Reference:

    http://answers.Microsoft.com/en-us/windowslive/Forum/mail?tab=QnA

    If you are referring to Office Outlook, and then send the query Office Forum.

    Reference:

    http://answers.Microsoft.com/en-us/Office/Forum/Outlook?tab=QnA

    I hope this helps. If you have any other queries/issues related to Windows, write us and we will be happy to help you further.

  • I cann't get the network wireless hp 7500 to connect. I use wep-64 and shared.

    I cannt get the network wireless hp 7500 to connect. I use wep-64 and shared.

    I'm glad it's working for you now.

    Thank you to inform the community that has solved the problem.

  • How can I get my RAW files to open in photoshop?  I use a Sony Alpha NEX - 7 shooting JPEG and RAW.  Open end JPEG but RAW only.

    How can I get my RAW files to open in photoshop?  I use a Sony Alpha NEX - 7 shooting JPEG and RAW.  Open end JPEG but RAW only.

    This camera is supported in Camera Raw 6.6 and newer. This means that you need to Photoshop CS5 or newer version to have the support of the camera. What version of Photoshop are you using?

Maybe you are looking for