Return To Frame 1 On Timeline After Video Is Complete
Hello all,My apologies beforehand if this is too noob, but I'm desperate. I have a simple, 2 frame FLA file with a button on the first frame going to frame 2 with a progressive download video, FLV Component, ready to play. The goal is after the video is complete I simply need the swf to return to frame 1 and its button. I see some solutions out there, especially for net streaming and such but I can't seem to pinpoint my specific problem. I'm having a real difficult time figuring out this task. Flash 8, AS2. Please, please, help...Thanks.
General Flash
Posted on: Mon Oct 20, 2008 8:28 pm
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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!
Attach Code
import fl.video.VideoEvent; // needed to listen for video events
stop();
function myListener(evt:VideoEvent) {
play();
}
FLVPlayback.addEventListener(VideoEvent.COMPLETE,myListener); // "COMPLETE" must be capitalized
FLVPlayback.source = "counting.flv"; // use "source" instead of "contentPath"
FLVPlayback.play();
Return To Frame After Video Finished Playing
I am working on a project with some high school students: We have created a touch-screen kiosk where you can view videos created by students (all have been converted to FLV files and linked with a MediaPlayback Component). If you click on a button you go to a specific frame in the containing movie clip where the selected video plays.
How can I send the users back to the beginning frame of the containing movie clip (the frame contains the instructions about what to do), after the FLV video finished playing or after the mouse has been inactive for more than 20 minutes?
Exit Out Of Video And Return To Stage Frame 1
Ive manged to create a flash player that incorporates a video using a online
tutorial with the code below.
All is working well but at the end of the video I want to exit out of the
video and return to the stage at frame 1. The reason being is; before a user
hits play an interface image (containing info) is displayed. When they hit
the play button the video appears and plays over the interface image.
problem is at the end of the video the layer containing the image is still
covered by the video. when the video finishes I need a line of code to exit
and return the player to the original state without the presecence of the
video layer.
any ideas? thanks in advance
Brett
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
rewindButton.onRelease = function() {
ns.seek(0);
ns.play();
}
playButton.onRelease = function() {
ns.play("modular.flv");
}
pauseButton.onRelease = function() {
ns.pause();
}
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
var duration:Number;
ns["onMetaData"] = function (obj) {
duration = obj.duration;
}
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 200;
loader.scrub._x = ns.time / duration * 200;
}
var scrubInterval;
loader.scrub.onPress = function(){
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit, 10);
this.startDrag(false,1,this._y,198,this._y);
}
loader.scrub.onRelease = loader.scrub.onReleaseOutside = function () {
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus,100);
this.stopDrag();
}
function scrubit() {
ns.seek(Math.floor((loader.scrub._x/200)*duration));
}
Return Function Once LoadClip Is Complete.
Ok, I think this will prob. be simple for you AS experts out there, here's my code:
[CODE]
function loadPic(whichPic):Void {
var i:Number = 0;
var pic:String;
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadProgress = function(target,loaded,total){
trace("loading:"+total+"bytes");
}
mclL.onloadInit = function(){
trace("finished loading");
}
mcl.addListener(mclL);
switch (whichPic)
{
case "steam":
pic = "flash/flashImage-stream.jpg";
break;
case "house2":
pic = "flash/flashImage-house2.jpg";
break;
case "house3":
pic = "flash/flashImage-house3.jpg";
break;
case "balcony":
pic = "flash/flashImage-balconey.jpg";
break;
}
mcl.loadClip(pic,mainImage);
}
[/CODE]
What I want to do, is force the function to ONLY return once the file has finished loading. How can I do this??
Return Function Once LoadClip Is Complete.
Ok, I think this will prob. be simple for you AS experts out there, here's my code:
Code:
function loadPic(whichPic):Void {
var i:Number = 0;
var pic:String;
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadProgress = function(target,loaded,total){
trace("loading:"+total+"bytes");
}
mclL.onloadInit = function(){
trace("finished loading");
}
mcl.addListener(mclL);
switch (whichPic)
{
case "steam":
pic = "flash/flashImage-stream.jpg";
break;
case "house2":
pic = "flash/flashImage-house2.jpg";
break;
case "house3":
pic = "flash/flashImage-house3.jpg";
break;
case "balcony":
pic = "flash/flashImage-balconey.jpg";
break;
}
mcl.loadClip(pic,mainImage);
}
What I want to do, is force the function to ONLY return once the file has finished loading. How can I do this??
Wait Until Complete Some Function And Return Result
Hello,
I am new comer in as and flex, My problem is next
:during invoking some function I should get data from server side and
then return result
override flash_proxy function getProperty(name:*):* {
this.remoteObject.source = BOOK_SOURCE;
var callOperation:AbstractOperation =service.getOperation(LOAD_METHOD);
callOperation.addEventListener(ResultEvent.RESULT, resultMethodLoad);
callOperation.send();
return result;
}
private function resultMethodLoad(e:ResultEvent):* {
return (e.result as ArrayCollection);
}
how I can to stop current thread invoking while get information from server and return result of resultMethodLoad
without looping
Thanks
Return A Obj From A Class, After A URLLoader.addEventListener(Event.COMPLETE,onJSON);
Hey all,
coment below
ActionScript Code:
loadJSON.init("data.json");//run from Doc Class
function parentTrace(decoded)
{
trace(decoded);
}
loadJSON.as
ActionScript Code:
package
{
import com.adobe.serialization.json.*;
import flash.display.MovieClip;
import flash.events.*;
import flash.display.*;
import flash.net.URLRequest;
import flash.net.URLLoader;
public class loadJSON extends MovieClip
{
public static function init(jsonFile):void
{
var loader:URLLoader=new URLLoader;
loader.addEventListener(Event.COMPLETE,onJSON);
loader.load(new URLRequest(jsonFile));
}
public static function onJSON(e:Event):void
{
var jsonData:String=e.currentTarget.data;
jsonData=jsonData.replace(/
/g,"");
var decoded:Object=JSON.decode(jsonData);
stage.parentTrace(decoded); // this does not work
//i just want decoded to be push back to where the class was called after the file load.
}
}
}
Return To Main Timeline
I am trying to move from a mc back into the main timeline with a button. How can I do this?
Weird Return To Timeline Bug
I'm having a strange thing happen. I am loading external swf files into the main movie. At the beginning of each swf I have the code:
dialogue1 = new Sound(EMI01);
dialogue1.loadSound("MP3s/EMI01.mp3", true);
And at the end I have:
dialogue1.onSoundComplete = function(){
_root.gotoAndPlay("dialogue2");
}
stop();
I have about 10 swfs - all with the exact same code. Now, my problem is that some of them are returning to the timeline as expected, and others are not. Any ideas? I am copying the same code for each so I don't understand why some are working and some are not. On the main timeline I have several frame labels for each swf with this code attached:
if(this.mcContainer == Number(this.mcContainer)){
loadMovieNum("dialogue1.swf",this.mcContainer);
} else {
this.mcContainer.loadMovie("dialogue1.swf");
}
I am going a bit mental here trying to work this out - I really hope someone can help!
Return Input Text In New Timeline
I am looking for a tutorial that explains how to return input text into the dynamic text box. Currently I have it working when it is on the same timeline but I need it to work when I have the input text and dynamic text on different timelines.
Any help would be great.
Angel
Return Input Text In Different Timeline
I am looking for a tutorial that explains how to return input text into the dynamic text box. Currently I have it working when it is on the same timeline but I need it to work when I have the input text and dynamic text on different timelines.
Any help would be great.
Angel
Return To Main Timeline Not Working
I have followed a zillion threads about returning to the main timeline from an swf but can't figure out what I am doing wrong.
I have an external swf loaded into an mc on the maintimeline.
When the sound is finished playing at the end of the external swf I want to return to the main timeline.
My code in the external swf is this:
stop();
mySound.onSoundComplete = function() {
_root.gotoAndPlay ("movie", "explore");
}
(where "movie" is the scene and "explore" is the frame label).
Nothing is happening.
The odd thing is that if I write...
stop();
mySound.onSoundComplete = function() {
_root.gotoAndPlay (1);
}
...it works (it goes to the main timeline, but not to the place I want).
I am going completely mad and really have searched every thread to see what I'm doing wrong. Please help!!!
Go To Next Scene When Video Complete
I have created a "video project" in which I have 3 scenes.
Scene 1 is the animated introduction to Scene 2 which is an imported video (.flv). The end desire for this project is that the intro plays, after the intro, the video automatically plays and then when the video is complete the ending credit scene plays.
I have sucessfully actionscripted scene 1 when over to play the video by using the nextScene(); command, however, I do not know how to actionscript the video scene to paly the ending credit scene when the video is complete. I have tried using nextScene() but it doesn't work.
I do NOT want to use buttons...so I'm not looking for an "on release" command. I just want the last scene to immediately start playing as soon as the video stops.
Thanks.
On(complete) Video Not Working?
I have a external flv, on the video i have:
Quote:
on (complete) {
this.autorewind =true;
this.play();
}
This is working fine and is looping ok. But if i replace this code with:
Quote:
on (complete) {
this.gotoAndStop(1);
}
it doesn't go to frame 1, just sticks?
Video Complete Listener
I have something wrong with my video code in terms of when it completes playing it needs to go to a frame labeled "intro". please see the attached code. This code is the code for 1 of my 4 video frames in the movie, the only thing that really changes is the file to load.
FYI the video instance is named "video".
Also how can I update the code to center the videos.
I am setting up a kiosk with 4 buttons and 4 videos, it plays one video at a time. Currently the 4 videos are loading from the same spot on the screen even if I move the video instance and resize it for each in there own respective frames, the problem is they are 4 different sizes
TIA
palnudb
Attach Code
import flash.geom.Rectangle;
var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns = new NetStream(connect_nc);
stream_ns.onStatus = function(p_evt:Object):Void
{
if(p_evt.code == "NetStream.FileStructureInvalid")
{
trace("The MP4’s file structure is invalid.");
}
else if(p_evt.code == "NetStream.NoSupportedTrackFound")
{
trace("The MP4 doesn't contain any supported tracks");
}
}
stream_ns.onMetaData = function(p_info:Object):Void
{
for(var propName:String in p_info)
{
output_txt.text += propName + "=" + p_info[propName] + "
";
}
video._width = p_info.width;
video._height = p_info.height;
}
video.attachVideo(stream_ns);
stream_ns.play("POTC3_720i.mov");
var mySound:Sound = new Sound();
mySound.setVolume(10);
mySound.attachSound(stream_ns);
fullScreen_mc.onRelease = goFullScreen;
function goFullScreen():Void
{
trace("Scaling");
var scalingRect:Rectangle = new Rectangle(video._x, video._y, video._width, video._height);
Stage["fullScreenSourceRect"] = scalingRect;
if(Stage.displayState == "normal")
{
Stage.displayState = "fullscreen";
}
else
{
Stage.displayState = "normal";
}
}
var myListener:Object = new Object();
myListener.complete = function(){
// action to execute
gotoAndPlay(intro)
};
video.addEventListener("complete", myListener);
On Complete Video Trigger
Hi,
Can anyone please tell me why this code does not work
ActionScript Code:
import mx.video.FLVPlayback;
stop();
player.play("sa80.flv");
trace(player.state);
player.addEventListener("complete",getAds());
trace(player.state);
function getAds() {
this.gotoAndPlay("ad1");
}
Basically what I want is on completion of the video to make the the playhead go to the frame labelled ad1.
The video plays fine until I add the the addEventListener complete which moves it straight to ad1 without showing the video.
What am I doing wrong here?
Thanks for your help.
How To Trigger Return To Main Timeline After End Of Nested MC
I'm developing a Flash presentation and need assistance.
In my main movie, I have two scenes: preloader and Scene1. In Scene1, I have a nested MC called Transition on a stop frame.
On the stop frame, the Transition MC plays. On the last frame of the Transition MC, I want actionscript to return to Scene 1, and to a frame label called "space".
Right now, I have the following code on the last frame of the Transition MC:
gotoAndPlay("Scene1", "space");
This is not working. The head goes to the preloader scene, and not the "space" frame label.
What am I missing? Any coding hints would be greatly appreciated.
Thanks in advance,
Button In Movie Clip To Return To Main Timeline
This is similar to the question just posted. I have a movie clip with buttons in it. When a button is pressed I want to exit the movie clip and go to Scene 2 and what ever frame corresponds to that button.
I scripted a button:
on(release) {
gotoAndStop ("scene 2", 1);
}
This works when you are in the movie clip pressing the buttons but on test movie nothing happens.
I tried
on (release) {
unloadMovieNum(0);
gotoAndStop ("Scene2", 1);
}
on test movie the screen goes blank. Apparently it unloads the movie clip but does not go to scene 2 or anywhere else for that matter.
Thank you for any ideas you can give me.
How To Trigger An Event On Video Complete
I am trying to build my first AS 3.0 project
using examples from O'relliy. I'm a noob, so bear with me.
I have loaded an FLV using the NetStream class. I added an Event
Listener find out when the video has finished playing, probably not the right method. After the
video finishes, I'd like to load a static image and a replay button.
What should I use to trigger these things to load? What should I use to load them?
Many thanks in advance.
Jamie
Attach Code
Here is my script:
//From http://safari.oreilly.com/1596713461 Ch 11 Loading Video
// Create the Net Connection
var videoConnection:NetConnection = new NetConnection();
// Set it to null unless connecting to a server
videoConnection.connect(null);
// Create the Net Stream and pass in the NetConnection
var videoStream:NetStream = new NetStream(videoConnection);
// Have the NetStream play the video
videoStream.play("flv/fishClip.flv");
//From Ch 11
//Create the Object
var metaListener:Object = new Object();
//Associate it with onMetaData
metaListener.onMetaData = onMetaData;
//Associate it with videoStream (NetStream)
videoStream.client = metaListener;
// EndFrom Ch11
// Create a new Video object
var video:Video = new Video(735,350);
// Attach the NetStream to the video
video.attachNetStream(videoStream);
// Put the video on the stage
addChild(video);
//From http://safari.oreilly.com/1596713461 Ch 11 Controlling video
playback
function onMetaData(data:Object):void
{
//Nothing
}
// Here is where I get lost
videoStream.addEventListener(NetStatusEvent.NET_STATUS,
statusHandler);
function statusHandler(event:NetStatusEvent):void
{
trace("Listener Added!")
{
switch (event.info.code)
{
case "NetStream.Play.Start":
trace("Start [" + videoStream.time.toFixed(3) + " seconds]");
break;
case "NetStream.Play.Stop":
trace("Stop [" + videoStream.time.toFixed(3) + " seconds]");
break;
}
}
}
Go To Frame On Sound Complete
Can someone please help a pitiful newbie?
I'm trying to get a movie (frame 1 action script) to utilize the "onSoundComplete" method to advance the movie to frame 2.
Here is the code that ISN'T WORKING -- aaargh!!
my_sound.onSoundComplete = function() {
gotoAndStop("2");
};
I know... uh, I think I'm close.
Thanks in advance.
Go Back To Frame One After Flv Is Complete
Hi
I think this is probably pretty simple to do, however im struggling a bit...
I have a fla file...
It is 2 frames
Frame 1 = Dynamic still photo
Frame 2 = dynamic flv with small video
Everything works 100% except...
Once the flv has finished playing, i would like to go back to frame 1.
Please can someone assist with this little bit of ActionScript.
Im using actionscript 2
Thank you in advance.
Delon
[CS3] Component Video - Complete - EndJump Code
I am using a Component Video in frame 1 with a STOP frame. I am using Progressive download from my website to play the video.
After the video plays, I would like to gotoAndStop in frame 2.
This sounds like super simple code...but the only results that I am getting is a looping movie that skips over the video.
ANY code out there that can get this problem solved quickly?
Upload Progress/complete Frame
I am looking for the codes and/or movies to:
-create a status bar for a file upload
and
-actionscript to jump to a frame after upload is complete
Thanks
Show Frame Before Function Is Complete?
Hello,
I have a two frame movie. On the first frame is a button with the code:
Code:
_parent.gotoAndStop(2);
On the second frame, I want to show iterations of a calculation as the calculation is running. Here's the code for frame 2:
Code:
stop();
calculate();
function calculate() {
for (var f = 1; f <= 30000; f++) {
resultsField.value = "Completed " + f + " of 30000 iterations.";
}
}
The problem I am having is that frame 2 doesn't show until the calculate() function is completed. So, instead of seeing the resultsField advance through the 30000 iterations, I just wait on frame 1 until the function has completed and then I see the final 30000th iteration on frame 2.
Is there a way to show the iterations on frame 2 as the iterations are taking place?
Attached is the .fla with the example.
Thanks for your help!
Start Playing From A Frame After This Flash Is Complete
Hi,
.Fla Link
How can i modify this flash so that after the object (or in my case several objects whereby i copy/pasted/renamed the actionscript sections) has been moved the flash starts to play from a different frame...so that i can enter a "well done" kind of message.
Thanks
<param name="movie" value="http://www.xadnet.com/files/drag_and_drop.swf">
<param name="quality" value="High">
<embed src="http://www.xadnet.com/files/drag_and_drop.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="303" height="302">
[CS3] Problem Advancing Frame After Nest Mc Complete.
A couple of problems with finding the right script to advance to another frame in the main timeline after a nested mc completes. The main timeline consists of an action layer and a graphic layer that is 1 frame long -- within which are several layers of various mc's that animate. I've created the script to start the nested mc's and it works fine. Interestingly though, when I change the main graphic to an mc, then all the nested mc's play endlessly over and over again. hmm.
well anyway, what i'd like to see happen is once menu_mc (nested within the main graphic) is triggered and plays... create a goToAndStop command to the next frame on the parent timeline. Thanks much for any thoughts for this very newbious newbie!
so, here is the as3:
function onMouse_Over(event:MouseEvent):void
{
cat_mc.play();
}
cat_mc.addEventListener(MouseEvent.MOUSE_OVER, onMouse_Over);
function onMouse_Out(event:MouseEvent):void
{
cat_mc.stop();
}
cat_mc.addEventListener(MouseEvent.MOUSE_OUT, onMouse_Out);
function onClick(event:MouseEvent):void
{
pictureframe_mc.play();
menu_mc.play();
cateyes_mc.play();
}
cat_mc.addEventListener(MouseEvent.CLICK, onClick);
cat_mc.buttonMode = true
Buttons In Movie Clips Return User To Specific Frames On Main Timeline
Hi
I'm fairly new to Flash 5 and have a problem / query I was hoping someone out there could help me with.
I have several movie clip symbols on specific frames on my main timeline. At the end of the first movie clip's timeline I'd like the user to be able to click a button within the movie clip which will return them to a specific frame on the main timeline, and therefore start playing a different movie clip symbol.
Is this possible... and if so how's it done??
Thanks in advance!!
FLV VIDEO - Return To Start
I've loaded video using the flv object and ActionScript 2.0. When the video finishes playing, what method do I use to make it stop at the beginning of the video?
I Just Want To Return To A Frame.
I'm not certain about how to say this correctly. From the end of a movie, I want to loop back - not to the beginning, but to another frame. I labeled the frame I want to loop to, but I have been unable to find the correct code to get back there. I have tried several goToAndPlay scenarios, but must be getting the conditional wrong. Thanks.
Problem With Preloader Not Navigating To Correct Frame When Complete [renamed]
Ok. Hi guyz.
I made a peice of flash for my website. Where there is an intro and then i click the enter website button. After that this box comes down over the screen. And in this box there is the preloader. In the preloader the actionscript tells it to go to the root at frame 9. But when I play this file then it does not work properly. Can someone please tell me how to make it work properly and what actionscript is needed.
Problem With Preloader Not Navigating To Correct Frame When Complete [renamed]
Ok. Hi guyz.
I made a peice of flash for my website. Where there is an intro and then i click the enter website button. After that this box comes down over the screen. And in this box there is the preloader. In the preloader the actionscript tells it to go to the root at frame 9. But when I play this file then it does not work properly. Can someone please tell me how to make it work properly and what actionscript is needed.
Return 2 Last Frame Of Movie?
hi there!
i've built this site:
http://www.frickletonfineart.fsnet.co.uk
and have the buttons as a seper8 flash movie that sit ontop of the other pages, and change as u go to different pages. the problem is when u return to the home page it reloads the buttons so they flash.
i tried to do a 'if frame is loaded' conmmand to send u 2 the las frame of the home page movie when u return, but that jus works like a preloader and sends u straight 2 the las frame when u first enter the site.
I'm sure theres an easy way 2 do this..
cheers!
sarah
PS also looking 4 a way 2 stop the page flashing white as it loads the 1st fullscreen page...any ideas??
Return To Previous Frame?
To smart people:
I am creating a tutorial in Flash, simple interface, and I am stuck.
I am a very new coming Flash person. (2 months) I have created a movie that I want to return to the previous frame from a given set of 9 buttons.
I have a "scrollPane" filled with movieClip "a" on frame 1, the first nine buttons vertically scroll the scrollPane to a selected location. The tenth button jumps to the second frame where the a scrollPane is filled with movieClip "b". That is as far as I have gotten.
I want to be able to click any of the first nine buttons in the second frame and return to the first frame following the script associated with the button.
Remember, I am very new to actionscripting and am just guessing at what the code might be. I have tried many varioations of statements and code. Here is a sample of the code I tried on the nine buttons:
on (release) {
if(_currentframe==2);
gotoAndStop(1);
tb1_cp.vPosition=204;
}
Also, how do I post my .fla in this message so you can see it?
Joe
[CS3] AS3 - Cannot Return To Frame 1 On Mouse Over
Why cant i return to frame 1, when i mouseover the movieclip?
My code is like this:
var go:int = Math.round (2+Math.random()*1);
gotoAndStop(go);
search_mc.addEventListener(MouseEvent.MOUSE_OVER, search);
search_mc.addEventListener(MouseEvent.MOUSE_OUT, startMC);
function search(event:MouseEvent):void {
gotoAndPlay(1);
}
function startMC(event:MouseEvent): void {
gotoAndPlay(go);
}
if (go == 2) {
addEventListener(Event.ENTER_FRAME, textMC1);
}
if (go == 3) {
addEventListener(Event.ENTER_FRAME, textMC2);
}
trace(go);
function textMC1(event:Event) {
if (this.text1_mc.foo == 1) {
this.text1_mc.foo = 0;
this.cursor_mc.play();
removeEventListener(Event.ENTER_FRAME,textMC1);
}
}
function textMC2(event:Event) {
if (this.text2_mc.foo == 1) {
this.text2_mc.foo = 0;
this.cursor_mc.play();
removeEventListener(Event.ENTER_FRAME,textMC2);
}
}
addEventListener(Event.ENTER_FRAME, cursorMC);
function cursorMC(event:Event) {
if (this.cursor_mc.currentFrame == 100) {
this.fade_mc.play();
removeEventListener(Event.ENTER_FRAME,cursorMC);
}
}
addEventListener(Event.ENTER_FRAME, fadeMC);
function fadeMC(event:Event) {
if (this.fade_mc.foo == 1) {
this.fade_mc.foo = 0;
gotoAndPlay(go);
removeEventListener(Event.ENTER_FRAME, fadeMC);
}
}
Thanks for your help!
Return To Previous Frame
Hi,
So I have five buttons which contain S1 animation for roll over then S2 for roll out and S3 where the hit area is missing and the button is not clickable.
So I want on release the animation for Button 1 to stop at S3, so the button to be not clickable and when I click Button 2, Button 1 to return at frame 1
Here is the code. What else I need to add to return the button on frame one when another button is selected
on (rollOver) {
gotoAndPlay("s1");
}
on (releaseOutside, rollOut) {
gotoAndPlay("s2");
}on (release) {
this._parent.gotoAndPlay(3);
//Movieclip GotoAndPlay Behavior
this.gotoAndPlay("s3");
//End Behavior
}
Return To Top Of Script In Same Frame
how do i change the state of a button in the same script?
in other words, when i click it runs through a snippet of code. when i click it again it starts from its original state.
Attach Code
// all run fine except running the button
// AFTER it returns to its orignal state
// original state
spread4_mc.onRelease = function () {
destiny_subtext_mc.onEnterFrame = this.myOnEnterFrame;
}
// secondary state
spread4_mc.myOnEnterFrame = function () {
destiny_subtext_mc._alpha -= 14;
if (destiny_subtext_mc._alpha <= 0) {
delete destiny_subtext_mc.onEnterFrame;
destiny_subtext_mc.removeMovieClip();
// back to original state
bottom_btn_mc.spread4_mc.onRelease = function () {
attachMovie("destiny_subtext_mc","destiny_subtext_mc",4, {_x:110, _y:-274});
destiny_subtext_mc._alpha = 0;
destiny_subtext_mc.onEnterFrame = function () {
destiny_subtext_mc._alpha += 14;
if (destiny_subtext_mc._alpha >= 100) {
delete destiny_subtext_mc.onEnterFrame;
Flash Return To A Certain Frame In A 'different' Swf
I'm just wondering if this is at all possible.
I have a movie called 'msc' which works on about 9 frames, a different page on each frame.
On frame 8 there is a page called 'portfolio', this page has a link that goes to another swf file in another html page called 'textcall' which is in another folder.
What I want to know is, is it possible for me to navigate back in one click to frame 8 of the first swf movie from the textcall html page?
Return Frame Label
anyway to get the framelabel name from the currentframe...bean looking deep...think the answer no...anyone confirm this or not?????
'video Basics' How To Return The Time Code?
hello everyone,
I have done all the available 'video basics' and would like to learn how to work a bit more with the time code object of the NetStream Object.
Seems all the better flash players retrieve the 'total time' of the video playing and where you are 'currently playing'...
Any/all suggestions are welcome
thanks in advance
Stop Movie/Return To Frame
Here's what I have done.
click button > on release goto and play frame 70.
Here's what I need to do now.
Once that movie reaches its last frame, automatically go away and start playing a movie clip.
any suggestions?
Stop MC, Return To Frame 1, Play Other
Hi everybody! Does anyone have a good idea to solve the following?
I'm using Flash 5.
Main timeline has 6 animated MCs. In each animated MC are 2 buttons. Each animated MC controls a static MC (6 total). When one of two buttons in myMC is pressed, myMC1 plays. Pressing the buttons also triggers the mouseDown for myMC which makes the static MC (name1) visible. myMC stops on its last frame and the static MC remains visible.
//Animated MCs Actionscript
onClipEvent (mouseDown) {
if (_root.myMC1.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.name1._visible = true;
}
}
//Button Actionscript
on (press) {
play ();
}
What I want: When the mouse presses one of the buttons, I want myMC to play, the static MC to become visible. myMC should stay on its last frame and the static MC should be visible until another button is pressed.
I've included some graphics.
Thank you for your attention : )
Zuk
Keyup(on Release ) To Return To Frame 1?how?
hi...can anyone help...i have a movieclip of a walking character which has its direction and movement controlled by actionscript via the direction tabs on the keyboard ...my problem is this ...i want my character to revert to frame 1 (a still image) when the keypresses are released...im trying to get my head around the add.listener action but i fear im doing it wrong can anyone help or suggest the right way!!much appreciated
Return To First Frame When Idle For X Seconds
Hi,
I've got my final show exhibit thingy coming up at University, and want to include a website I've made. As I'm not going to be there, for the entire duration of my show, I'd like the website to reset itself every 2 minutes or so, if idle, so that the start of the website is always showing, when a new visitor views it. Hope that makes sense.
Does anyone know how I'd achieve this?
Nice one!
Tiiming Event To Return To Frame 1
I am working on a a movie-map that reveals information about the county when you press and release it. I want the screen to return to the main screen, (frame1) after the screen is idle for over 60 seconds. I have tried various "If" conditions in actionscript, but I cannot figure out how write the condition (paused for more than 60 seconds) or (idle for more than 60 seconds)
Here is what I have tried:
Code:
if (idle.time>60) {
gotoAndStop(1);
}
am I getting close or am I way off base? How about just putting a timer in to make the movie return to frame 1 whenever it is idle for more than 60 seconds? does anyone know how to do this?
Getting A Button To Return To Certain Frame In Over State
First, the example: http://www.theinsaneasylum.com/bevansdesign/demo.html
I've got a button set up this way:
Up State: Plain blue dot. Does nothing.
Over State: Blue dot grows, fades away, showing image. Doesn't loop.
Down State: Image spins in place continuously.
Flash's default behavior is to go back to the Over State once you've released your mouse button, but I'd like to have it go to the last frame of the movie clip I have on the Over state instead, so it doesn't do the zooming out thing again. Is there any way to do that?
Thanks for your help!
EDIT: And now that I think about it, it would be nice if I could have another movie play when you Mouse-off it.
Return To First Frame When Idle For X Seconds
Hi,
I've got my final show exhibit thingy coming up at University, and want to include a website I've made. As I'm not going to be there, for the entire duration of my show, I'd like the website to reset itself every 2 minutes or so, if idle, so that the start of the website is always showing, when a new visitor views it. Hope that makes sense.
Does anyone know how I'd achieve this?
|