ActionScript 3.0 :: Add A Button When Video Stops Playing?
Sep 23, 2009
I created an FLV of my movie and am using the Slideshowpro for flash component to play the FLV in my SWF. (Not the built in FLVPlayback component) The video is about 2 minutes long.At the end of the video playing I would like a button to pop up that people can press to send an email to request more information. I have no idea what the best way to go about doing this would be and I do not know AS well at all.Currently my only thought is to make my player.swf (the one that plays my video) as long as my video (appr. 2 minutes) and then fade in a button towards that people can use. This would probably work but it is probably not the most efficient way of accomplishing this.Does anyone have any suggestions? I have been searching for things like adding annotations to flash movies just as YouTube does but have not found anything so far.
View 4 Replies
Similar Posts:
Aug 7, 2009
I am loading an external SWF file into my main timeline. The external SWF file contains an FLV video. At a certain point in my main timeline, the SWF file loads and plays the video. Is there a way to say...
If the VIDEO (FLV) is done playing, gotoAndPlay(X)?
View 4 Replies
Jul 6, 2009
I have a FLV player that stops playing right before the end of the video.
View 1 Replies
May 13, 2010
I bought Adobe Flash Media Streaming Server 3.5 and I have problems with large video.After 70 minutes, the video stops playing.
View 8 Replies
Nov 8, 2010
I'm trying to load a movieclip that has some video running on it using a page container dynamically on the click of a button. however im not able to get the audio from pausing even when this page has been navigated to another. The video gets hidden behind the newly called page however the audio still continues to play on the called pagethis is the code i wrote to add the movieclip(page) to the container..
var gp1:gpage1=new gpage1;
menu_cont.media_menu.press_review.addEventListener(MouseEvent.CLICK,mediaclik3);
function mediaclik3(event:MouseEvent ):void {
[code]....
View 1 Replies
Aug 31, 2009
I have some animation (programmatic, I'm NOT using keyframed animation in timeline), and some music I want to play in the background. Once the music file reaches the end (about 30 seconds long), I want to trigger the end of the animation functions.I figure I could either use an actionscript timer to trigger the end of the animation or a keyframe with actionscript that is placed on the timeline near the end of the song but these methods assume knowledge about the duration of the wave file. If I changed the framerate or updated the external wave file, these triggers would possibly no longer sync upIs there some sort of event listener or other detection method for an audio file to signal it has finished playing? Or maybe there is a way to get the duration of the audio file to use in the timer
View 3 Replies
Jul 3, 2010
how to code this on a button
onrelease
gotoandplay(10); // i need delay here before activating the next code below//
gotoandplay(80);
the trick is.. i want the button to play frame 10 to 40 then after playing from frame 10-40 the movie stops and then play frame 80 to 100
View 4 Replies
Jul 20, 2010
I am importing video into flash via FLVPlayback Component..
What I would like to do is have a button after the video is done playing that offers to re-play the video and may be another button with some other action.. I"m sure it's some kind of "if" statement... (to see when the video is done playing)
View 15 Replies
Jul 20, 2010
I am importing video into flash via FLVPlayback Component.. What I would like to do is have a button after the video is done playing that offers to re-play the video and may be another button with some other action..
View 1 Replies
Mar 29, 2010
I am trying to start an external video with playback component (instance name- movie_flv) upon clicking on a text button I created (instance name- play_btn). Here is my code that I have so far
play_btn.addEventListener (MouseEvent.CLICK,playClick);
function playClick(event:MouseEvent)
{
trace ("button was clicked");
}
The trace function works but when I try to insert "movie_flv.play();" underneath the trace function, I get this error message: 1120: Access of undefined property movie_flv.
View 1 Replies
Mar 27, 2009
I am using flash 8 professional.
I have a custom video player that loads videos from an external xml file. It uses all actionscript to control the video using the attatchVideo(ns).
At present the video starts playing as soon as the video opens, I would like the video to only start playing after the user clicks the play button.
What is the actionscript I need to achieve this?
* all the actionscript for all buttons etc. is on one layer called actions. Videos are external not on layers.
View 3 Replies
Oct 11, 2011
How to make sanpshot from playing video through button click? (to local machine)
View 1 Replies
Jan 24, 2011
I have a friend who's stuck in an old-school splash setup: He's trying to insert an AS2 script that goes to a URL when an external FLV stops playing... It's not working. He's in CS5 � I can test out in CS4
View 1 Replies
Jan 17, 2010
I am trying to create a little website in flash.. I have some video that plays automatically once the user goes to that section (I am using frame labels to navigate from section to section of the site). But, when the user clicks another button to go to a different page, the video is still playing because I hear it..How can I stop the video from playing once another button gets clicked?
View 20 Replies
Feb 22, 2010
I'm developing a simple application at the same time as I am studying some things in actionscript and I've got the following code:
ActionScript Code:
if (Key.isDown(Key.LEFT)) {
x -= speed;
this.gotoAndStop(2);
_xscale = -scale;
} if (Key.isDown(Key.RIGHT)) {
[Code] .....
I've got an object, and every time I press one of those keys those actions happen. My problem is that, when I press SHIFT, the object appears in that way (frame 3), but It doesn't play that animation it just stops in the first frame. How can I say "if you press SHIFT at the same time as RIGHT or LEFT, gotoAndStop(3); and the object that is in frame 3 only plays if either RIGHT or LEFT is down too"?
View 1 Replies
Sep 30, 2008
I have uploaded an .swf file to my site but when I embed it into my site page it won't play all the way through, it just freezes about half way. But the same .swf file will play fine in Flash.. I am using a content management system called Teamsite.
This file is not especially large only 377KB, I have tried removing images to reduce the size down to 96KB and it will still freeze. The file is just rotating images and uses no fancy effects just a simple fade.
View 2 Replies
Jan 14, 2011
I've noticed (a few months ago, actually) that in most browsers I use to test my application (Firefox, chrome and explorer) the flash plug in, while playing it's content, will stop, or freeze, when the actual plug in playback window is out of the window (due to scrolling, or switching tabs), or covered by another window (a different browser or program window that will cover the visible area of the player), which is something good, and nice, when you think about web pages full of commercials slowing down your browser and computer in general, but what happens when you a games programmer, who work with multiplayer games, on games which are mostly turn based? If one of my players switches tabs, open a new window over the browser, or god forbids, scroll down the page, the game is essentially stopped, since no events occur on that players side of the game!! And this does not effect just simple frame based animation, but everything, onEnterFrame events stop, setInterval stops... the only thing that I could find that does not stop when this happens is a setInterval action done in a different swf, which is loaded to a different level of my game file.
View 3 Replies
Mar 9, 2012
I am making a banner that has multiple movie clips sharing the same area, creating different rainbow effects when different areas (invisible buttons) are moused over.
First of all I couldn't figure out if there was a way to have one invisible button over the whole area that changed to a different colored effect with each mouse over (first mouse over the black and whites would change to reds, second would change it to blues, third would change it to browns, etc.). Since I couldn't figure this out I settled on creating three buttons covering a third of the banner each, so when the mouse passes over one button it changes to reds, over another button it changes to blues, over the third it changes to browns.
The effects are movie clips where each frame has another stripe changing color so it goes in a wave effect from one to the next, and then goes back to white and black in the same manner. The first frame of each movie clip I had to turn into a nested movie clip so I could turn the alpha to 0, since I was going to have these color effect movie clips on top of one another in the main timeline on different layers, and so you could see the effect even if that color layer wasn't on top. I used the same nested movie clip with zero alpha for the first frame of each color effect clip (reds movie clip, blues movie clip, etc), so I dont' know if that's an issue.
Anyway, it seemed to work fine for a while, but after working on it for a while longer (and not getting any further since I removed most of the changes I made), now when I test the movie the mouse over does not seem to work correctly. It works fine, seemingly, for the first time I mouse over each button, but in order to have it work again I have to mouse over the button twice, and then it will pause randomly during a part of the clip and I have to move my mouse back over for the movie clip to continue.
I can't tell if this is because of the overlapping movie clips, or because my buttons are messed up, or if my actionscript is messed up, or if the timeline has to be longer, or what. Currently the timeline is 55 frames, the same as each movie clip.
I put a movieclip_instance.stop(); command in the first frame of the main timeline, is there a better way to do this? Should I put the stop command in the movie clip itself?
Here is a section of my AS in the main timeline, this is my first time programming ever, in any language, and trying to learn from the internet is more difficult than I thought it would be.
redmovie.stop();
red_btn.addEventListener(MouseEvent.ROLL_OVER, playRed);
function playRed(event:MouseEvent):void
{
redmovie.play();
}
View 4 Replies
Dec 2, 2009
I have a MovieClip that consists of multiple layers, one of those layers is an animated background Shape. let's call this MyMovieClip with the background shape have the instance name "mcBackground";
I'm adding the MovieClip to the stage from ActionScript by:
var myMovieClip = new MyMovieClip();
addChild(myMovieClip);
This works fine and when the movie clip is added to the stage it plays as expected (background is moving).
The problem is when I try to apply a colorTransform to the background shape, it stops from moving. what I'm doing is this inside the MyMovieClip class:
[Code]...
View 2 Replies
Apr 7, 2010
I have a live streaming application using RTMP. Sometimes the playback works fine but sometimes it stops without any trace or errors in the log file, while still appearing as a connected client.
View 7 Replies
Apr 13, 2009
I'm making music visualization in papervision3d using FlashDevelop. The script generates 150 cubes each acting as different tone (from basses with red colors to high notes with blue).The song starts, everything works fine, but after 44 seconds song stops. I hadn't wrote function that would do that. I've turned off every useless visual functions and even papervision3d rendering. The scene is just black and the song still stops playing after 44 seconds.File is included with:
Code:
[Embed(source = "../assets/8bp069-05-she-session.mp3")]
because I'm not writing it in flash.
I've tried different song and it stops after 1:10...Flash uses ~30MB of Ram and 50% of my Athlonx2 64 2.6Ghz in action.
Here's some code: sound
Code:
[Embed(source = "../assets/8bp069-03-she-pioneer.mp3")]
private var Music:Class;
private var sp:Sound = new Music();[code].........
those last 3 functions have nothing to do with playback.Am I doing something wrong with computeSpectrum function? Here's the scrieennie of it in action: Of course it's like an alpha version of what I'm planning to do.
View 1 Replies
Aug 24, 2010
I have a problem with an embedded flash video not playing to the end, it stops around half way It is a 4 minute video with sound, the FLV file is around 24Mo This is a normal server not a flash streaming server .
I have at least 10 other sites on line with a flash video on the home page and they all work fine.on the same server.only difference is that this file is about 10 Mo bigger on average.
I contacted the company where my server is hosted and they say that it looks like a java script problem but I am using flash 8 pro standard <object> no java script to detect version etc.[code]...
View 1 Replies
Jan 4, 2010
I have noticed a very frustrating error in flash lately. I will be watching a video in full screen mode...on any site...then all of the sudden, the video freezes and the sound continues. This does not fix automatically. I have to minimize the video from full screen to default size and then the video unfreezes and I can then go back to full screen mode.However, eventually I have to repeat this because the video freezes again.
This happens in Firefox 3.5.6 and Chrome 4.0.249.43. I am near certain I can get this to happen in any browser but I don't use other browsers to play videos so I have not tested my theory. All I know is that the problem is very consistent.
I am using Flash Player 10 ActiveX version 10.0.32.18 in XP Pro SP3.
View 6 Replies
Jan 7, 2011
I have an embedded video on time line. I gave it an instance name and tweened it to move left using the tween class. Video moves as expected, but while moving it stops playing itself. I want the video to play as well as move.
View 0 Replies
May 7, 2011
I have a website that plays video1 when it opens. When you navigate to next page the video stops. One of the buttons on the second page plays video2. The problem is that video 2 won't stop using the same command that made video1 stop.[code]
View 2 Replies
Jun 19, 2009
[URL] Some of the clips play fine, others play for 2 seconds and then stop.
View 2 Replies
Mar 19, 2010
the people from my server installed fms 3.5, but the demo video with that train stops every other second. Should I adjust something in settings?
View 8 Replies
Apr 13, 2011
I made a flash video jukebox, so it reads a dynamic playlist of F4V files for hours. Everything works well but after about 45 min the sound stops and after 2 hours the flash player plug in crashes. It seems like the cache is not accepting more F4V videos and then crashes. If I auto-refresh the browser every 2 hours it works but I would like to avoid having to refresh the browser and just clear the flash player cache if that's where the F4V go? I can't find any info about where the F4V files go when you play them!
Frame 1 gives the variable vidReference the value of the video file name:
VidReference = trackToPlay;
Frame 2 does the playing:
var nc:NetConnection = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
nc.connect(null);
[Code] .....
This is the function that detects when video is done playing, still on frame 2:
function netStatusHandler(event:NetStatusEvent):void {
switch (event.info.code) {
case "NetStream.Play.StreamNotFound": newTrack();
break;
case "NetStream.Play.Stop": newTrack();
break;
}}
And the function newTrack() is just giving the variable trackToPlay a value (the file name of the next video). And then says to gotoAndPlay frame 1, so it kind of reinitializing the player. The objects are re declared in frame 2, is that the problem here?
View 2 Replies
May 5, 2011
On a page with an embedded Flash video (from YouTube in an <iframe/>), is it possible to be notified through JavaScript when the user starts or stops playing a video?
As far as I know, events raised on Flash level are not propagated to the container page, so it is not possible to do that.
View 4 Replies
Dec 16, 2011
I suppose the title says it all. I can load an external video file (FLV) and I can have it play. I also have the custom buttons made to control the clip. The only thing I have left to do is to have the main timeline move onto frame 2 once the external video reaches its end. I am using actionscript 3 and flash cs 5.5.
View 7 Replies