ActionScript 2.0 :: Flash8 FLV To Play Only Once?
Aug 24, 2009
I need the FLV to play only once when a MC is loaded.
When the FLV is still playing, I want it to stop playing when click on any button..
PHP Code:
stop();
// Flash 8, AS2
import mx.video.*;
var flv1:String = "flvs/DrJoy_corner_KevinIntro.flv";
[Code].....
View 2 Replies
Similar Posts:
Mar 16, 2009
I have a script that plays a sound on that keyframe. You see, the movie loops. So it keeps hitting that keyframe and the sound keeps playing over and over again. How do I stop this? what kind of script? I want the sound to still loop when it's over, but I dont want it to play again on that keyframe. Only when it's over.
View 1 Replies
May 17, 2009
I am writing an application for my students which plays music when buttons are pressed.I made the buttons myself and they have 4 states in 4 colors.The rollover and mousedown states work okay but I would like the button to hold its 'hit' or "mousedown" color while the sound plays, and then return to its normal state. This way, while the sound plays, the student will see its connection to the button label (rather than a screen full of buttons in the same state/color)
View 2 Replies
May 26, 2009
I am working on a mp3 album collection project and I am using Mediaplayback component for playing the mp3 files, a List component to show all the tracks (and select one) and the songlists are stored in XML data located in one folder for each album. It is working fine, but I want to have a button to "Play all tracks" like when you place a CD in the Windows Media Player, that is, starting playing the first track and so on.... until the last one.
Here are the parts for the mediaplayback:
lista.addEventListener("change", ifchanging);
function ifchanging(evento) {
if (evento.type == "change") {
[Code]....
But it just play the last track. I think it must go on one of the events or in a if..else including the EventListener... I'm just beginning on ActionScripting and I am using parts of what I saw in other codes.
View 2 Replies
Oct 13, 2009
I am working on a mp3 album collection project and I am using Mediaplayback component for playing the mp3 files, a List component to show all the tracks (and select one) and the songlists are stored in XML data located in one folder for each album. It is working fine, but I want to have a button to "Play all tracks" like when you place a CD in the Windows Media Player, that is, starting playing the first track and so on.... until the last one.
Here are the parts for the mediaplayback:
lista.addEventListener("change", ifchanging);
function ifchanging(evento) {
if (evento.type == "change") {
[code]....
that is for when you click (or press) on a selected item in the "lista" List.
I tried something like:
for (var i = 0; i<num_total; i++) {
player.setMedia(urlnow+"/"+lista.selectedIndex[i].data, "MP3");
player.play();
}
But it just play the last track. I think it must go on one of the events or in a if..else including the EventListener...
View 1 Replies
Sep 5, 2010
I am working on a mp3 album collection project and I am using Mediaplayback component for playing the mp3 files, a List component to show all the tracks (and select one) and the songlists are stored in XML data located in one folder for each album.It is working fine, but I want to have a button to "Play all tracks" like when you place a CD in the Windows Media Player, that is, starting playing the first track and so on.... until the last one.
Here are the parts for the mediaplayback:
lista.addEventListener("change", ifchanging);
function ifchanging(evento) {
if (evento.type == "change") {
[code]...
But it just play the last track. I think it must go on one of the events or in a if..else including the EventListener... I'm just beginning on ActionScripting and I am using parts of what I saw in other codes.
View 2 Replies
Jul 4, 2008
I am having the hardest time trying to get AS to play from within a MC called "content_002".Please remember that this AS is an XML-Driven sub-menu that successfully works on it's own. When I tie it into a MC, it doesn't like to work with my shifting main-menu.
For this post, I'll first send the "combined" .fla file then I will post them apart to see if anyone can find a better way.
View 12 Replies
Dec 9, 2009
I think worded the question wrong or posted in the wrong catagory I keep geting error messages with this code in AS2.0
Code:
if (key.isDown(key.getCode(81))) {
_root.samplesound=new Sound();
_root.samplesound.attachSound("sample1")
[code]....
This is the message fore both pieces Statement must appear within on/onClipEvent handler Im trying to get the letter "q" to play a linked mp3 in my library When I apply the code to a seperate layer No error messages shows, but no sound plays. When I apply the code to a movie clip/button object, that message shows up!
View 2 Replies
Jul 14, 2011
I am trying to make a swf with one FLV playback player and 6 buttons. I've got 6 different videofiles that I want to have linked to this swf. Some of the videos are quit large.When starting the Swf, the first video has to start, after playing it, it has to stop. Then you must be able to choose which video to play by clicking one of the buttons. I don't want to have small thumbnails of the video, just plain and simple buttons.I have to have all my files, both fla, swf and xml files in the same directory (I cannot have them stored in different folders, since I have to upload this to a cms system which has limited upload properties).
I've tried to find the right script on the internet, I'm not very good at scripting myselve, actually rather poor educated there.It seems to me that I have to make an xml file with a list of all my videos, I have my default swf ready, with a FLVplayback and buttons.Now there's just the coding part....
View 1 Replies
Feb 27, 2012
I have created two buttons for separate audio files. Essentially if you click on the button it will play and stop. This works great! I have also injected a SoundMixer.stopAll(); to ensure if you click between both buttons that it will stop the current audio file to play the next one. My problem is when I select the 2nd button for the first time everything seems to be working...it's when I attempt to click on the first button again, that it will require 2 clicks and then it stops and plays accordingly...anyone know how I could eliminate this annoying two click process?
[Code]...
View 1 Replies
Sep 1, 2010
I want a movie clip (let's call it homecontent_MC) with 100 frames play to frame 80 and stop.Then when someone clicks a button on the navigation bar (home, about, services, contact, etc...) homecontent_MC would then begin playing from it's position (frame 80) til it reaches 100, at which point it wouldn't be on screen, and the movie clip that corresponds to the navigation button press (say services_MC...) would start from frame 1 and continue til it stops at it's frame 80...
View 7 Replies
Nov 5, 2010
I got a bunch of live stream from FMLE, say: "FMLE_channel1", "FMLE_channel2", "FMLE_channel3". And then on the server side, I created several corresponding republished stream called "channel1", "channel2", "channel3".
On periodical basis, we call Stream.get("channel1").play("FMLE_channel1", -1, 10, true) every 10 seconds. Similar things were done on the second channel & third channel.Soon after the above Stream.get("channel1").play() call, I should get the following events in sequence:info :NetStream.Unpublish.Successinfo :NetStream.Publish.Startinfo :NetStream.Play.Resetinfo :NetStream.Play.Start In the above case all are happy. Clients can view channel1, channel2, channel3 well.But then after a while, one of the three channels, in most case it would be channel1, will not be viewable.
With the server trace info, I found that after the Stream.get("channel1").play() call, only the following two events exists:
info :NetStream.Unpublish.Successinfo :NetStream.Publish.Starti.e. I was missing the play.reset and play.start event.I further checked and confirmed that the FMLE was publishing all three channels fine to the server. I was able to view the "FMLE_channel1" from flash clients, but not the republished "channel1". the version is FMS 3.5.0.
View 3 Replies
Jan 22, 2011
I play games on Pogo and have never had a problem with their Flash Games until released Daily Hot Shots. It doesn't load fully and I've done EVERYTHING I know to do to get it to play. No errors show up. I can play ALL the other flash games but this one. When I right click, the name of the site's owners do not show up....I have the settings showing though Not all of the game loads and that's the problem. I've tried uninstalling and reinstalling....tried a different browser and have the same exact problem. THIS GAME WILL NOT PLAY.
View 2 Replies
Oct 11, 2009
I have five different scenes all including three different buttons. When I test the buttons in "play scene" - all buttons sounds correctly in all scenes. But when I play movie, there is sound only with one button (the same button in every scene). I have looked for differences, but this button seem to have all the same parameters as the others.
View 10 Replies
Nov 7, 2009
So this is my code so far:
on (press) { // Gives your movie a button functionsgetUrl("http://www.astahost.com");}
on (rollOver) {this._alpha=100;gotoAndPlay("Scene 2"); }
[Code]....
when i play the movie, it plays scene 2, however, scene 2, which is in my flash document, plays automatically. how can i stop this? is there some code which only makes scene 2 play when called for and not play automatically.
View 1 Replies
Jan 14, 2010
So i've made my .swf files. The only thing is they all play at full screen when i play them using my web browser. I need them to play at 548 x 408. when i open the .fla and go to properties it says the size IS at 548 x 410 but it can't be if its playing full screen.
View 2 Replies
Mar 8, 2010
I have several products I want to animate with graphics and text individualy then stack them on a time line for output with play and pause buttons. Is there a tutorial somwhere that shows you how to do this? and how do I stop the entire animation on a frame, I don't understand "not_set_yet"
View 4 Replies
Jul 29, 2008
simple one this, or so i thought! basically, i want a mc to play from start to finish (11 frames) upon rollover and upon rollout i want it to play backwards to the first frame. Accurately.
ActionScript Code:
on (rollOver) {
if (activ.currentFrame <= 11)
{
[Code]....
Currently i JUST goes to the next frame. So i need something like currentFrame +1 or something?
View 7 Replies
Sep 21, 2009
I have modified the original to include more head shots accompanied by audio clips. I have worked out the playing of the clips on release. I realize now that people may not want to listen to entire clip. Each mug shot serves as the button to hear the person talk. I do not know how to modify the button code for it to be a toggle. I guess it would need to be some kind of "play if, stop if" The only part of concern is loading playing the the audio, no changes need to be made to the rollover functionality.
mugWidth = 60; //change these if you change the size of your mugshots
mugHeight = 60; //change to your mugshot height
//instantiate sound and textformat classes
[code]....
View 2 Replies
Apr 6, 2011
Root timeline: keyframe 1, keyframe 2, etc...
-keyframe 1 has a MC "frist MC"
-keyframe 2 has a MC "second MC", etc.
-the MCs are all duplicates containing different animation, but have the same AS inside them.
The construction of the MC is:Play intro animation -> Stop and wait for key stroke. If key is "space" set variable value to 1, if else set variable value to 0, then continue to play next frame. -> Complete the animation till the last frame.In the last frame check what is the value of the variable to check which key was been hit. If it was a space (var =1) go to root and play current frame +1 (go forward), Else, go to root and play current frame -1 (go back)Its a kind of slideshow.so heres the code in the middle, after the intro animation was played:[code] The problem with var reverse is, it works well in the first frame, its beign filled with value depending on what key is being hit, But in the last frame, when the time comes to check the value, trace says its "undefined".I have tried setting up a _global.variablename = reverse and it works in both frames (the check at the end is succesful, it detects the given value), but still the last frame only plays the currentframe -1 as if always executing the "else" command, no matter what the value of var reverse is.
View 1 Replies
Jan 6, 2011
how would you play the next 5 frames if the space bar was clicked and then stop the playhead?
View 4 Replies
Jul 23, 2004
I am creating a site, and it has a animation that it has to play before loading the next section. What I cant figure out is what function I need to create so that when a user clicks on the vision button it will play the frame after stop(); which will close that section, then have it load the frame for the section that the person clicked on. The only way I can think of doing this is creating 3 different close animations for the three sections. But I figure there has to be a way to have it play the one close animation and then goto the frame which is the portfolio section or vision section (depending on the button clicked).
View 1 Replies
Jul 23, 2004
I am creating a site, and it has a animation that it has to play before loading the next section. What I cant figure out is what function I need to create so that when a user clicks on the vision button it will play the frame after stop(); which will close that section, then have it load the frame for the section that the person clicked on. The only way I can think of doing this is creating 3 different close animations for the three sections. But I figure there has to be a way to have it play the one close animation and then goto the frame which is the portfolio section or vision section (depending on the button clicked).
View 1 Replies
Apr 17, 2009
I maintain two web sites and am reasonably competent in Dreamweaver and Fireworks. Now to get into Flash.I want to produce a banner which shows a flag + Welcome in that language and have about 20 nations to cover. Can anyone please point me to a guide as to how to get this started?
View 1 Replies
Feb 19, 2010
I have two frames in a movieclip with a stop in the first. I want a script that makes is so that when you hold down the UP or DOWN arrowkey it jumps to frame 2 but if you drop the UP or DOWN key you go back to frame 1.
View 1 Replies
Aug 4, 2010
just getting the grip around the variables and im experimenting. This is what i have as a variable
money = 1000;
health = 100;
Then i have the dynamic textbox that shows them. works great, and i also have various effect that makes the two go up and down. Here's the problem, or more, how i would like to expand the concept but is stuck on. Right now both variables can go as high and low as possible (of course). Is there something i can add in that script that makes so the money variable can't go below 0. Also is there something i can add so that the Health can't go ABOVE say 500 and when health reaches zero (or a negative) this triggers _root.gotoAndPlay("gameover"); you get what im trying to achive here
View 15 Replies
Mar 23, 2010
I have a "movie player" that plays flv files using the code below (videoToPlay is the name of the file to play and is just a string). I want to use the same setup to play an mp3 file also.I tried using mySound = new Sound(); and then mySound.attachNetStream(ns);, but it gives me this error: 1061: Call to a possibly undefined method attachNetStream through a reference with static type flash.media:Sound.
View 5 Replies
Nov 4, 2010
1) What is the recommended/best practice method for loading videos (flv, f4v, mp4, etc.) from a play list. Some of the files might be on the local file system, some might be on a streaming server and uses rtmp.
2) Does the VideoPlayer.play internally use NetStream/NetConnection objects? I could get the files to play using both these methods - not sure if one is better than the other. I didn't see any references about streaming in the VideoPlayer.play method - but it does work with rtmp URLs!
3) For a long running standalone application, how do I make sure the VideoPlayer/NetStream objects are properly released/garbage collected? Right now I am closing the netstream/netconnection after playing every file - mainly because I do not know which server/file system the next video is being loaded from.
View 6 Replies
Aug 4, 2010
Ive tried to impliment everything I could find. No luck. I have an xml playlist with external .as files for an mp3 player. Here is my code. My code is below.
// Setup sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
[Code].....
View 9 Replies
Mar 13, 2009
I am trying to make an animation in which different layers (=images) come into the stage, then stay in place and other layers move in and stay as well. I have done 2 of the layers so far, converted them into movie clips, tweened them etc. When I run the cursor along the timeline, I see the desired result on the stage, ie everything comes in at the right time and stays in place. However, when I export it to view the film, only the first layer comes in, moves into place and stays there, and then nothing happens, ie the second layer never comes in.
I've tried everything I can think of, moving the layers around etc, and have deleted and redone the whole thing many times in an attempt to fix this, but I simply don't know what is wrong.
View 4 Replies