Play video in frame 1 then go to frame 2 on complete

I am very new to Flash and especially ActionScript... I just
want a video which is in frame 1 (I imported an avi which was then
encoded and has a skin) to play and at the end of the video simply
go to the next frame (or a new video, whatever is easiest) which
will have a "Play Again" or "Buy DVD" buttons.
I found the following code from another forum but I do not
know how to use it. The playback component is "FLVPlayback" which
is what is listed but it looks like "myListener" needs to be
changed as it is black (not blue in the code). Do I create a
"Listener"? And how?
Thank you!

The flv is loaded through a movieClip named GardenWalk which
contains this code:
// this part is pretty cut and dry
var introConnection:NetConnection = new NetConnection();
introConnection.connect(null);
var introStream:NetStream = new NetStream(introConnection);
var metaIntro:Object = new Object();
metaIntro.onMetaData = onMetaData;
introStream.client = metaIntro;
var intro:Video = new Video();
introStream.play("anAffairOfTheHeart_Intro_small.flv");
intro.attachNetStream(introStream);
addChild(intro);
function onMetaData(data:Object):void
The code that I have placed on the main timeline is as
follows:
frame1 - preLoader - just a movieClip with a turning circle
and the word 'Loading' visible on the stage. All other elements are
present, but not visible:
var total:Number = stage.loaderInfo.bytesTotal;
var loaded:Number;
var loadProgress:Number;
gardenWalk.alpha = 0; //gardenWalk is my flv Loading
MovieClip
bigFrame.alpha = 0; //bigFrame is just a MovieClip used as a
border
loadProgress = setInterval(checkProgress, 10);
function checkProgress():void
loaded = stage.loaderInfo.bytesLoaded;
if(loaded >= total)
clearInterval(loadProgress)
gotoAndPlay(2);
stop();
Frame2 animation and flv display:
wreath.alpha = 0; // wreath is part of thre client's logo
affairText.alpha = 0; // affairText is part of the logo as
well
gardenWalk.scaleX = 1.8;
gardenWalk.scaleY = 1.45;
gardenWalk.x += 85;
gardenWalk.y -= 10;
gardenWalk.alpha = 1;
bigFrame.alpha = 1;
var fadeCounter:Number = 0;
var checker:Number;
var fader:Number;
var wreathFader:Number;
var wreathCounter:Number = 0;
var wreathScale:Number;
gardenWalk.mask = videoMask;
checker = setInterval(checkTime, 10)
function checkTime():void
if(gardenWalk.introStream.time >= 15)
clearInterval(checker);
var fader:Number = setInterval(fadeThis, 10)
// At 15 sec the intro flv and 'frame' fade out and client's
logo fades in
function fadeThis():void
gardenWalk.alpha -=.02;
bigFrame.alpha -=.02;
fadeCounter++;
switch(fadeCounter)
case 10:
wreathFader = setInterval(wreathFade, 10);
break;
case 50:
gardenWalk.alpha = 0;
bigFrame.alpha = 0;
gardenWalk.x -= 1000;
bigFrame.x -= 1000;
clearInterval(fader);
break;
// I used a 'switch' to time two events with 1 interval
function wreathFade():void
wreath.alpha +=.02;
wreath.scaleX += .0025;
wreath.scaleY += .0025;
wreath.x += 2;
wreathCounter++;
if(wreathCounter >= 50)
clearInterval(wreathFader);
wreathCounter = 0;
wreathScale = setInterval(wreathShrink, 3);
// the wreath fades in, scales up and moves to the right
function wreathShrink():void
wreath.scaleX -= .0005;
wreath.scaleY -= .0005;
wreath.x += 1.35;
wreath.y += .25;
affairText.alpha += .02;
wreathCounter++;
if(wreathCounter >= 50)
clearInterval(wreathScale);
the wreath scales down some, and moves down a little and to
the right as the client's name 'An Affair of the Heart' (A big Arts
and Crafts Festival) fades in.
stop();
The server that I am using is the Yahoo server that handles
my personal website. I just upload the files to a 'test' folder,
and test them of course, before delivering them to a client. Here
is a link to the page:
http://theserialartist.com/RichMediaSamples/anaffairoftheheart/an_affair_of_the_heart.html
also
http://theserialartist.com/RichMediaSamples/anaffairoftheheart/anAffairOfTheHeart.swf
When I open the html directly, from the c:\\ I have no
problem at all. When I open it via http, the problem arises. Making
the MIME type explicity known to the server is a concept I'm not
familiar with, and I have this little feeling that this may be the
culprit.
I just embedded the audio in the timeline becuase its a
pretty small MP3. The flv itself is stopping completely! Otherwise,
the checkTime function would see the 15 sec point and start the
fade into the logo. This has worked for me well in the past. Was I
just lucky until now? Thanks for taking time to give me a hand. I
appreciate it. In the meantime, I'm going to do a little research
about MIME type in relation to flv's. THANKS!

Similar Messages

  • QT playing video a few seconds then turns green

    I've tried a bunch of things but still can't fix this problem. When playing back a quicktime file either streaming or downloaded, video plays a few seconds then turns green and starts using a lot of system resources. I'm using Nvidia video card and have no problems playing any other types of media. Is this a problem with codec or QT7 and graphics card?

    Always best for initial first time startup, to do it with just one RAM stick in the primary blue dimm slot. A couple thoughts, first is use just the one RAM stick & load the OS & all the drivers, then add the other sticks. The other thought is to try each RAM stick individually in the primary slot to rule out a bad or failing stick.
    Quote
    I notice my graphics card is very hot
    That can't be a good thing.

  • HT1267 My iPod player in my iPhone isn't working properly it will play for a few seconds then stop and also the volume level will appear then disappear what can I do to remedy this?

    My iPod player within my iPhone isn't working properly when playing videos it will start then stop after a few seconds and also the sound bar appears then disappears, and when playing music no sound is coming out when I'm on a call I can hear everything properly and also on loud speaker! What can I do to remedy this? Please help!!!

    If you haven't tried it yet, I'd eliminate memory issues first.  Close all of the apps with the double tap on the home button method
    http://support.apple.com/kb/HT5137
    then restart the device.
    http://support.apple.com/kb/HT1430
    My experience has been that this fixes a lot of issues.

  • Project in Imovie 9 Only plays back still frames, wont play video

    Project in Imovie 9 Only plays back still frames
    I can see all the video clips but screen just goes black while going over the video. The video is still in the computer and has not been moved around.
    Also if i play the imported video on the "Event" board it plays over it with no information coming back to the computer. Like if the files were offline.
    any help?
    Message was edited by: Manny Figueroa
    Message was edited by: Manny Figueroa

    Hi
    *Not knowing the origin to Your problem - General approach when in trouble is as follows.*
    • Free space on internal (start-up) hard disk if it is less than 10Gb should rather have 25Gb
    • Delete iMovie pref file - or rather start a new user/account - log into this and re-try
    iMovie pref file resides.
    Mac Hard Disk (start-up HD)/Users/"Your account"/Library/Preferences
    Macintosh HD)/Users/"Your account"/Library/Preferences
    and is named.
    com.apple.iMovie.plist
    com.apple.iMovie3.plist
    com.apple.iMovie7.plist
    com.apple.iMovie8.plist
    and find com.apple.iApps.plist - trash this too
    While iMovie is NOT RUNNING - move this file/s out to desk-top.
    Now restart iMovie.
    • Hard disk is untidy. Repair Permissions, Repair Hard disk (Apple Disc Util tool)
    • Garageband-fix. Start it, Play a note and Close it. Re-try (Corrects an audio problem that hinders iMovie)
    • Screen must be set to Million-colors
    • Turn off Mac and disconnect Mains/Power for 20-30 minutes - will at least re-set FW-port
    • Third party plug-ins that doesn't work OK (not relevant for iMovie’08 or 09)
    • Problems in iPhoto Library can affect iMovie to crash on start-up. Re-build this first then try to re-start iMovie.
    This You do by
    _ close iPhoto
    _ on start up of iPhoto - Keep {cmd and alt-keys down}
    _ now select all five options presented
    _ WAIT a long long time
    • iMovie updated ?
    • QuickTime updated ?
    • Mac OS version ?
    • Program miss-match. iMovie 4 - will not work under Leopard
    • Program miss-match. iMovie 5.0.2, up to Mac OS X.4.11 AND QuickTime 7.4.1 - is OK
    • Program miss-match. iMovie 6.0.3 or 6.0.4, Mac OS X.4.11 AND QuickTime 7.4.1 - is OK (will work under Leopard and Snow-Leopard)
    • Program miss-match. iMovie’08 v. 7.1.4, Mac OS X.4.11 AND QuickTime 7.5.5 - is OK (will work under Leopard and Snow-Leopard)
    • Program miss-match. iMovie’09 v. 8.0.6, Mac OS X.5.8 AND QuickTime 7.6.4 - is OK (will work under Leopard and Snow-Leopard)
    From LKN 1935. (in this case = iMovie HD (5), I tried it all, but nothing worked.
    Your answer (above) has been helpfull insofar as all the different trials led to the conclusion that
    there was something wrong with my iMovie software. I therefore threw everything away and reinstalled
    iMovie from the HD. After that the exportation of DV videos (there has not been any problem with HDV videos)
    to my Sony camcorders worked properly as it did before.
    Lennart Thelander
    I run "Cache Out X", clear out all caches and restarts the Mac.
    Yours Bengt W

  • I want to play video on my computer to make some analysis to frames,the problem that I face ,I can't change video frame rate using labview,but I can change frame rate to the video out of labview using some program

    HI All
    I want to play video on my computer to make some analysis to it's frames,the problem that I face ,I can't change video frame rate using labview,but I can change frame rate to the video out of labview using some program .
    I used IMAQ AVI Read Frame VI
    for example I have avi video It's frame rate is 25 fbs ,my image processing code is very fast that can process more 25 fbs,so I want to accelerate video acquisition

    Hi abdelhady,
    I looked into this further, and reading an AVI file into LabVIEW faster than its frames per second won't be possible. LabVIEW could read in frames faster than 25fps, but because it will be pulling the available frame at that point in time this would just give you duplicate frames. If you want to be able to read in frames at faster than 25fps, you would need to speed up your AVI file before reading into LabVIEW.
    There's a good shipping example to show how to read in from an AVI file, "Read AVI File.vi". You'll notice that they add timing to make sure that the while loop runs at the right speed to match up with the frames per second of the file being read. This is to make sure you're not reading duplicate frames.
    Thank you,
    Emily C
    Applications Engineer
    National Instruments

  • Play Video In iTunes Then It Won't Sync To iPod

    I've just noticed that if I play a video in iTunes 6.0.2 it will then no longer sync with the iPod. iTunes says its not a compatible format.
    I've just tested playing a video on the iPod (OK) then playing on Mac iTunes (OK) then resyncing. The video no longer syncs and removes itself from the iPod.
    Looked in the threads but nothing there.
    I have tried restoring my iPod to v1.0 firmware but this makes no difference. Videos that have previously been played inside iTunes will not sync.
    Looks like iTunes 6.0.2 or Quicktime change the file format on play so it is then not accepted by the sync to the iPod.
    Any clues ??
    Thanks in advance.
    NIALL 8-)

    Video is a pretty complicated subject.  I take it this video wasn't from your normal source so who knows what combination of audio and video codecs were made to produce the thing.  I also don't know how iTunes processes video.  Some converters can just pass through components and not really re-code them, and maybe iTunes did that to something that to something that really needed re-coding.  Maybe you'll find tips at:
    iTunes: May be unable to transfer videos to iPhone, iPad, or iPod - http://support.apple.com/kb/TS1497

  • Is it possible to embedding a video in Keynote and then play as a PDF?

    Hi
    Is it possible to embedding a video in Keynote and then play as a PDF?  I want to do a PowerPoint/Keynote presentation that includes videos from YouTube.  My preference is use Keynote although I do have Office 2004.
    My issue is that the places where we present have their own equipment so we are encouraged to bring the presentation on a USB/portable HD, and they tend to be Windows environments.
    In my perfect (ignorant) world, I'd
    Create it in Keynote
    Add/embed videos from YouTube
    Save it as a multi platform file like a PDF
    I guess the key issue is:
    Is there a way to create a multi platform presentation with videos (I think Keynote and PPT require different video formats???) that can be carried on USB/portable HD?
    Thanks

    No, it's not possible without using hacks. And Adobe can't support or endorse hacks
    Bear in mind that not only there are new features in a new version which can't possibly be recreated by an older version - also, there are enhancements to existing features, which would make them render differently in the two versions.
    That said, there are people posting such hacks, as Sébastien pointed out.

  • How can I download FLV completely and only then play video on Flash?

    What is a proper way to download video first and then play it in Flash? NetStream seems to allow me only to stream video - I can't find a way to download file completely first. Is there some other file for this?
    It looks like I can download the file using URLLoader, then do NetStream.play(null) and then append bytes from URLLoader using NetStream.appendBytes(...), but I get: "SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: file:///Users/Paulius/Build.swf cannot access unknown URL. No policy files granted access." Is there a workaround?

    No, I don't think that's the issue. I have no problems downloading the video using URLLoader, which does the crossdomain check. Problem is when I do this:
    stream = new NetStream(connection);
    // ... snip ...
    video = new Video();
    video.attachNetStream(stream);
    addChild(video);
    stream.play(null);
    stream.appendBytes(videoByteArray as ByteArray); // videoByteArray is taken from URLLoader downloaded content, i.e. the video
    As you can see NetStream doesn't know anything about the video, it doesn't know anything about the server, so it can not take something from crossdomain.xml.
    As far as I've read, it's imposible to do what I'm doing: simply Flash security won't allow to take contents of anonymous stream (i.e. stream started with play(null)).
    So my question is: how do I download video first and then play (instead of streaming) it in some other way? I couldn't find such API on NetStream itself.

  • I have downloaded The Final by Wham (Deluxe edition) and most of the Videos only Play for about 2 minutes then freeze

    Hi all
    I am new to iphone and have just bought Wham The Final (deluxe edition) which includes all there videos.
    When i go to play the videos they play for about 2 minutes then they just freeze. Club tropicana does not even play at all.
    I have other video purchases which all play fine.
    Is there anywhere in itunes where you can re-download?
    Thanks in advance

    It's probably the new 'taste filter' trying to keep you from emberrasing yourself in public. Try playing them when you're alone. If it detects no one else is in the room, it may allow you to view them. 
    Seriously... Do they play in iTunes on your computer? If they're in your iTunes library, un-sync them from the phone, then sync them back.

  • "Cannot play video with this frame rate&qu

    For reasons that aren't important here I cannot use the Zen video converting software. Instead, I've been using the trial version of the Caniusoft Video to Creative Zen converter. Only once has a video played, but as soon as I closed the video and opened it up again this message appeared. "Cannot play video with this frame rate." Daniusoft offers frame rates from 5 fps to 30. I've tried all of them and none of them work. Has this been a problem for others? Perhaps I need a different converter?
    ps.
    ..i'm converting flash video to avi. Does that make a difference?

    I can't answer your question in full (maybe somebody else can). However, I am aware that both the Zen and the Zen X-Fi can only play video files up to 320x240 resolution. Previous players like the Vision M were able to scale files down to this resolution on the fly, but not these two newer players.

  • You tube videos play about 11 seconds and then reset to the beginning...why?

    You tube videos play about 11 seconds and then reset to the beginning and if i jump ahead in the video, it will play for a few seconds and then reset to the point that I jumped to. This started happening yesterday, 10/7/11. It only happens with you tube videos in the firefox browser. Videos from others sites such as vimeo play normally. You tube videos play normally using internet explorer. This is a windows 7 machine.

    If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copies of the dodgy tracks and try redownloading fresh copies. For instructions, see the following document:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Otherwise, I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the items that are not playing properly. If you can't see "Report a Problem" next to the items, click the "Report a problem" button. Now click the "Report a Problem" links next to the items.

  • BluRay video plays for a few seconds then goes black...audio plays fine

    I have several videos that are to play from a main menu, then return to the menu.  On all of them, only a few seconds (ranging from 4 to 9 seconds) plays, then the screen goes black while the audio continues.  This is happening with all videos.  The menu structure is working fine, when I go to the end of each video the menu returns.  I'm on a MAC, and all quicktime movies play fine in quicktime player.  What am I doing wrong?
    Thanks
    Steve

    I'm in the Windoze world, and don't do BluRay, so I have no idea if the Avid codec is your problem
    I guess all I can suggest at this point is to Google for something like
    Encore CS5 Avid Codec
    and see if anything jumps out

  • I can't play youtube videos. I will play for about 12 seconds, then stop, and restart over again. I tried youtube on IE and it works there. What do you suggest I do?

    I can't play youtube videos. I will play for about 12 seconds, then stop, and restart over again. I tried youtube on IE and it works there. What do you suggest I do? edit

    This problem can be solved selecting manually the video resolution.

  • External Video - No longer plays video...? Only shows single frames

    Hey all - thanks for stopping by! I am hoping for help as soon as possible!
    So I've been doing fine on my project up until I did the FCS 2008-03 update today... ugh (I know I shouldn't have).
    I use 2 monitors; one for my timeline, etc. the other for full screen playback. It's worked swimmingly for the past month. Now, it will only play a single frame back - wherever my playhead is, generally. But takes a second to refresh.
    I have external video set to "all frames" and have refreshed the external devices, restarted, reverted to QT 7.5, etc.
    What can I do to get back to where it was working?
    A black magic card is installed but I'm not capturing anything right now. Will that still affect it?
    Thanks to all who stop by
    Specs:
    FCP 6.0.4
    QT 7.5
    10.4.11
    G5 2GHz
    2.5 GB DDR SDRAM

    Try all these?
    Shane's Stock Answer #8: External Monitor Viewing
    CUTTING SO YOU ONLY SEE THE TROUBLESHOOTING THINGS
    If for some reason you can't view your timeline on your external monitor, there are a few things to try:
    1) Make sure that the camera/deck is connected and powered on BEFORE you open FCP.
    2) In the Final Cut Pro menu select AUDIO/VIDEO Preferences and make sure your signal is being sent out thru Firewire DV.
    3) Go to the menu and select VIEW>EXTERNAL>ALL FRAMES.
    4) Click in the % box above the image and select FIT TO WINDOW.
    5) Go to VIEW->refresh A/V devices
    6) Make sure the Log & Capture window is closed
    If you want it to play in both the canvas and the external monitor you need to go to the FINAL CUT PRO menu and select AUDIO/VIDIO settings and make sure MIRROR ON DESKTOP is selected under the PLAYBACK OUTPUT section.
    Shane

  • Very recently, my computer stopped opening quicktime when I click on a video clip in iphoto, Its quicktime X, and it works to play videos if I open quicktime and then search for the video. How do I go back to quicktime automatically launching from iphoto?

    Very recently, my computer stopped opening quicktime when I click on a video clip in iphoto. I have quicktime X, and it still works to play videos if I open quicktime and then search for the video. How do I go back to quicktime automatically launching from iphoto?

    Well since I do not have iPhoto 7 I can only guess what may be: As far I can remember up to iPhoto 8, iPhoto insisted on Quick Time Player 7. As I can see you have Snow Leopard (Mac OS X 10.6) and there Quick Time X is the standard playaer. Basically Quick Time 7 is not part of Snow Leopard.
    Can you please check if Quick Time 7 is installed under Applications->Utilitis (in 10.6 Quick Time 7 if presenet is installed not under Applications - there Quick Time X is - but under Application/Utilities).
    If not: insert your Snow Leopard installation DVD.
    Once the installer opens, double-click on the Optional Installs folder
    Double-click the Optional Installs.mpkg package
    Click continue.
    Select the option for QuickTime 7 then click Continue to start the installation.
    If it is there you may try to move the iPhoto prefernce file to another folder and let iPhoto create a new one.
    Please keep the old file until you are sure that iPhoto works how it should.
    The iPhoto preference file can be found under your home folder then Library then Preferences and there
    com.apple.iPhoto.plist
    As alraedy mentioned do not delet this file, since if something goes wrong you can put it back.

Maybe you are looking for

  • File transfer from a FTP server to another External FTP server

    Hi, I have one FTP server , I need to transfer a file from this FTP server to aother external FTP server. Could any one please help me how to write a batch file on FTP server so that my file is transfered to another FTP server by executing the Batch

  • Regarding the o/p in excel sheet

    hi experts, i have developed one report in alv when i transfer it to excel sheet its coming rt in development server,,but in production server when i take it to excel sheet the material number gets cut (half) and extra zero is coming ...why plz help

  • Postscript fonts blocky on screen in Quark 5.0 / Classic

    I have previously been using Quark 5.0 successfully in Panther, with fonts previewing fine on screen. I have now upgraded to Tiger 10.4.8 (and erased my hard drive) and the same fonts are now previewing very blocky on screen in Quark 5.0. What's chan

  • Consuming Web Service Issues

    Hello All, I appreciate any help in getting me pointed in the right Direction. I am trying to pull values from my vender's web services. They required that I place .wsdl file on my server then call to the local file which will then make calls to thei

  • ABAP in SapScript : syntax, data types, ... ?

    Hello, Can someone tell me what are the biggest differences between regular ABAP and ABAP in SapScript? Like syntax rules, possible data types, and so on. Thanks!