ActionScript 3.0 :: Button To Switch On A Video?
Jun 7, 2011
I'm very basic at flash, but sofar I've created a little portfolio page with a video background as a front page. I want to add a button to the background which will turn of the current video and play another video and when the button is pushed again it will play the first video again.[URL]
here's my as for the videobackground:
import VideoBg;
var videos:Array=new Array('videos/bird_short.f4v');
var num:uint=1;
[Code].....
View 11 Replies
Similar Posts:
Jul 29, 2010
What is the best way to switch a video to fullscreen from a button in AS3? Like the fullscreen button in FLVPlayback component - I'm aware the FullScreen tag needs to go into the HTML...
View 1 Replies
Oct 2, 2008
I am working on a video player that will have different Languages. The problem that i am have is that i can get the video to switch but i cant get the video to switch back. I have uploaded the file and here is the code that i have have a problem with.
lang.onRelease = function() {
if play = English)
{
[Code].....
View 1 Replies
Aug 9, 2010
I've got an animation with an embedded flv video in a graphic on my main timeline. The embedded video has been scaled down as I enlarge to its full original size later on in the animation. I've been racking my brain and looking all over the place for a possible solution but is there a way to switch smoothing to true for an embedded video? I've tried the old smoothing = true for the embedded video instance but it has no effect. Annoyingly the video is smoothed out nicely on the stage but when I create a swf the smoothing switches off.I don't want to separate the flv from the main fla for numerous reasons .
View 1 Replies
May 26, 2010
I have a function videoList which I want to sort through my video URL's in my XML, using a switch/case method. The for loop in each case is bringing back all videos in the XML. How can I get just the videos for a particular case? Example: Introduction has one video, Our Work has none and Our Services has 5.
[Code]...
View 4 Replies
Aug 18, 2010
why dynamic streaming taking too much time to switch video from lower bit rate to higher bit rate and vice versa. I am doing dynamic streaming in following ways -
var param:NetStreamPlayOptions = new NetStreamPlayOptions();
param.oldStreamName=oldStream();
param.streamName=newStream()
[code]....
I am using duel buffering and that is 3 seconds when video starts and 10 seconds when "NetStream.Buffer.Full". Video taking approximately 30-50 seconds to switch video and when I am calling the above code.
View 6 Replies
Feb 18, 2009
I have made a button to function like a switch in that it has both an on and off state. However, I can only get it to switch between the on and off state once when it's pressed, with nothing happening after it has been turned off.The code is as follows:
Code:
switch1.onPress = function() {
switch1.gotoAndStop("on");
_root.onEnterFrame = function() {
[code]....
is there a way to make it so that the switch works continuously, not just one time?
View 1 Replies
Jul 23, 2011
never really used checkBoxes much and wondering what the best AS2 is to use one as a "switch" ?
i.e. place a checkbox which is default unchecked and if the user checks it {do something} and if the user then unchecks it {undo that something}.
I'm thinking about the _alpha of a button or an MC as an example / test.
Check the box: anMC = _alpha 100, unchceck the same box: anMC = _alpha 50.
I'm happy either way with code on the checkbox or an even listener on a frame (preferred) but would like to learn how to use checkBoxes as a switch.
View 2 Replies
Nov 19, 2003
I am really new to Flash n Actionscript and have been dropped in to make a switch that will make a light come on in the first click and off on the second, on on the third and off on the forth etc... I have created the switch as a button and the light on/off as two movie clips....
What coding would i be looking to add to make this switch work...
Previously I have been given this... but its not working
//this is for the button (switch)
on(release) {
if (_root.light_on:active == 1) {
setProperty("_root.light on", _visible, "1");
_root.light_on:active = "0";
} else {
_root.light_on:active = "1";
setProperty("_root.light_on", _visible, "0");
}}
//This is for the light on
onClipEvent (load) {
active = "1";
setProperty("_root.light_on", _visible, "0");
}
View 7 Replies
Dec 17, 2003
Here's a really easy (Not so easy for me) question for you. First person to answer rules the. I have a button that switches a variable from 0 to 1.
on (press) {
_root.pageone = 1;
}
I want the same button to switch the variable off. I've been trying "if else", but my syntax is rubbish. How do I code this statement On Press Button > if _root.pageone = 1 change to 0 > if _root.pageone = 0 change to 1.
View 2 Replies
May 18, 2011
I'm a designer struggling to learn advanced actionscript. It's quite a challenge,
One of the challenge i'm having right now is: I have my main timeline(swf). i'm loading in 2 separate swfs into two separate holders on the main stage/timeline/swf. whatever it's normally called. One of the loaded swfs is a menu and the other is a page. Basically i'm designing a learning application. The menu alllows you to jump to a specific place in the course rather than a next button of sorts which is also in the course.
When a different page is loaded i need for a button(movieclip) that's located in the menu swf to swith out with a new button that's located off the stage somewhere.(these buttons are located in the menu swf off stage) so i need the loaded page swf, to talk to the other loaded swf(menu) everytime it or another page is loaded. I've seen simular references to having a loaded swf talk to the main timeline swf but i haven't been able to find a reference for two loaded swfs thats loaded inside holders, to talk to each other.
View 1 Replies
Nov 19, 2003
n Actionscript and have been dropped in to make a switch that will make a light come on in the first click and off on the second, on on the third and off on the forth etc... etc...
i have created the switch as a button and the light on/off as two movie clips... what coding would i be looking to add to make this switch work...
previously i have been given this... but its not working
//this is for the button (switch)
on(release) {
if (_root.light_on:active == 1) {
[Code]....
View 7 Replies
Feb 21, 2010
Hi,I'm trying to use NetStreamPlayTransitions.SWITCH to create a multi angle view that switches between video streams. The issue I'm having is that NetStream.Play.TransitionComplete is called only after the buffer for the video before it is used up(this makes sense when using SWITCH to go between bandwidths but that's not what i'm using it for). Is there a way to force this switch before the buffer of the previous video is used up?
I've looked into SWAP but I can't really find any documentation on it. What I ideally would have happen is the next video in the array is triggered, that video is buffered and when there is enough to play it the stream switches to that one. SWITCH works really nice because there is no jump in switching when it's played but I just don't want the buffer to play out before the switch.Is there a way of maybe clearing the buffer of the playing video before i call SWITCH so it transitions quickly?
View 4 Replies
Jan 30, 2010
I'm pretty new to this and racking my brains on the following problem: I have a movieclip-button, with 3 states (normal, over and clicked). I want to disable the functions in actionscript 3 that switch between the normal and over-states after the button is clicked, and not enable these functions for this button until another button is clicked. What's the best/ simplest way to do this?
View 5 Replies
Jan 25, 2011
Is there a way to switch in a full screen mode without a button?
I tried like this but it's not working:
function setFullScreen():void { if (stage.displayState=="normal") { stage.displayState="fullScreen"; stage.scaleMode=StageScaleMode.NO_SCALE; } else {
[Code]....
View 1 Replies
Jul 22, 2010
Any reliable full screen code for actionscript 2.0. I have search but can't get any thing that works proper. I just need a button type toggle that switches the screen to full screen and back.
View 1 Replies
Mar 9, 2006
I'm making a flash banner for a client, it has a button to switch between backgrounds, however, how do I say something like
[Code]...
View 7 Replies
Jun 18, 2007
I want to make a simple SWITCH statement with Button._name as variables for CASE
so i got this code:
Code:
Button.addListener(_root);
_root.onRelease = function() {
[Code]....
View 2 Replies
Jul 7, 2004
I want to implement having a movie clip randomly change color.How can I make my movie clip randomly switch colors with a push of a button??By the way I'm using flash MX and I am still intermediate when it comes to coding.
View 3 Replies
Jul 18, 2011
The stop button plays as expected. The play/pause button plays as expected. The issue is when you press pause which will cause the play button to appear, then press stop. the video automatically plays and it shouldn't. I have bolded the control button script for convenience.
[Code]...
View 1 Replies
Dec 7, 2009
I have created my first flash video and wish to allow the visitors to play the movie themselves instead of having the movie play automatically also have a stop or pause button too.
View 2 Replies
Oct 30, 2011
What I'm trying to do is create a program that, depending on 2 variables, multiplies another variable by a static number. Heres the code I have so far:
[Code]...
View 1 Replies
Dec 10, 2003
I want this on an MC:
[AS]
i = 0;
switch(thing){
case 0:
[code]....
Basically what I'm wondering is, will I lose the value of i in the first switch once I'm out of the switch? Can the second switch read the 1st switch?
View 8 Replies
Oct 29, 2011
Im trying to create a program that, depending on 2 variables, multiplies another variable by a static number. A friend suggested I use case/switch instead of if/else statements,which is what I was using before.
[Code]...
View 1 Replies
Feb 23, 2011
I'm trying to create a simple "universal" media player which presents the same user interface (or as similar as possible) for video and audio playback. Unfortunately, FLVPlayback seems not to be able to handle audio files as far as I can tell, so I'm using a Sound and SoundChannel.
My video playback is handled using an FLVPlayback component which is "wired" to standard controls on-the-fly when needed. What I want to do is wire them to the Sound / SoundChannel when I'm playing a sound so that the same UI widgets work in both cases. I'd like to avoid building all my components from scratch because the FLVPlayback component does a lot of nice stuff "for free" but it's starting to look tricky.
The standard PlayPauseButton is a MovieClip with two layers, one containing the Play button (and with the instance name play_mc) and the containing the Pause button (pause_mc). Inside one of these is a movie with some code like this:
stop();
this.upLinkageID = "PauseButtonNormal";
this.overLinkageID = "PauseButtonOver";
this.downLinkageID = "PauseButtonDown";
[Code]....
View 1 Replies
Mar 30, 2011
when the video reaches 1 minute, a button appears. is there a way to hide the button again if the user uses the seek bar to go back to the 30 second (or any time before 1 minute) point?
View 2 Replies
Feb 13, 2009
I want to put a button on my video, I see it all the time, just don't know how to do it.
View 1 Replies
Nov 30, 2009
I am trying to load a video which is in the same folder as the flash file using a buttons but its not loading.
Here is the code I am using:
_root.Cross.onRelease = function() {
_root.gotoAndStop(9);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
Gamevid.attachVideo(ns);
ns.play("gta.flv");};
View 7 Replies
Jun 14, 2011
I'm working on a simple Video player that plays upon click. Than, once the movie is done playing, the oplay button re-appears and you can re-play the movie.I'm trying to add a Pause button when a user puts a mouse over a movie.. So, the pause button should appear once the Mouse is over the Movie and dis appear when the MOuse is moved..Below is the script so far:
import fl.video.*;import flash.display.MovieClip;
var myVideo:FLVPlayback = new FLVPlayback();var playbtn:playBtn = new playBtn();var staticpic:staticPic = new staticPic();
[code].....
View 4 Replies
Jan 22, 2009
I'm trying to work on a flash project. Essentially, when I press a button it initiates a video symbol. Once that video symbol is loaded, there are 3 buttons to choose from. When I click one of the buttons, it should do a gotoAndPlay. Instead, what does happen is I click the first button:
[Code]....
View 1 Replies