Loading Movie After Frame Played...
Terrible Terrible Title...
Here's the problem: I have one area on my main movie for the content of the website, it is easily accessed through _root.content. I have a movie (home.swf) loaded into "content".
On my main page, I have a button and I want it to play a part of home.swf and then when that is finished, load a different movie into "content". I have been successful in the first part but not the second.
Here is the working script for the button to make "main.swf" play a certain frame:
on (release) {_root.content.gotoAndPlay("next");}
This makes the current movie (home.swf) loaded in "content" to play from the frame labeled "next."
What I want now is that when the movie in "content" gets to the frame labeled "end", I want it to tell it to:
_root.content.loadMovie("bio.swf");
But I don't want to put the script in the movie loaded in "content," I want to put it in the button. Is there a way to do this?
Thanks a bunch,
Rob
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 10-19-2006, 06:48 AM
View Complete Forum Thread with Replies
Sponsored Links:
Once A Movie Has Played, How Do I Get It To Skip To The Last Frame If It Reloads?
So I built a webpage in both Flash and HTML (flash components nested in HTML tables).
I have an intro movie that plays directly into the homepage (all one movie). The movie ends with the homepage - which has links to secondary (HTML) pages.
Here's my question. When I go to the secondary pages, everything is fine, but if I click the "back" button the browser I end up playing the intro all over again, when all I want is the last frame, where the intro movie ends and is the homepage.
Is there a way for the movie to jump to the very last frame once the intro has already been played once?
As a temporary fix, I created an intermediate page between the intro movie and the secondary pages - an actual HTML "homepage" with flash components in it. It looks exactly like the last frame of the intro movie - but the client didn't like the "jump" blip that it created when the browser had to load another HTML page, he wanted to keep the intro to homepage segue smooth.
Is there an actionscript that I can put on the first frame that will sense if the movie has already played once, and jump ahead? Or am I doomed actually have to build the whole site as flash movie - something I really don't want to do.
Thanks for any input...
oh yeah, i'm running MAC OS X 10.3.9, Flash MX Professional 2004 Version 7.0
View Replies !
View Related
Last Frame Played
Like most people I reference frame labels, but I might reference the same label from two different spots in my timeline. Is there a way to call the last frame played so that I can set different parameters based on where the user came from?
View Replies !
View Related
Wrong Frame Being Played
Hey,
When i tell the root to goto frame 4, it plays frame 3 :s
how is this possible???
this is my code:
in a movieclip:
code: if (_root.player1health<=-100) {
_root.gotoAndPlay(3)
}
frame 3 of _root:
code: gotoAndPlay("Gameover",1)
greetz
Xaero
View Replies !
View Related
Check If Frame Has Played?
Is there a way to write an IF actionscript statement that checks to see if a frame (50 for example) has played, and if so then to skip to a different frame. I want to only play frame 50 once and all other times the action is started, skip to a different frame.
Thanks.
View Replies !
View Related
[F8] How To Reference A MC On A Frame Not Yet Played
If, from the root timeline, I wish to change the alpha of a movieclip with in a movieclip I just use something like:
_root.parentMC.childMC._alpha = 0;
But that doesn't work if childMC is located on frame 2 of parentMC, and parentMC is currently paused on frame 1.
Is there a way to change a property of the childMC BEFORE moving the playhead of it's parent?
(I could change alpha after loading the frame, but it don't seem to work.)
Thank you!
View Replies !
View Related
Go To Next Frame After Video Is Played
Hey everyone,
I'm looking for a very simple actionscript that will go to the next frame in my timeline after an FLV video has completed it's playback. I've found a bunch of different scripts but I can't seem to get any of them to work. I've tried the media.complete command, but that seems to be used for looping a video.
Any help is appreciated.
-mg
View Replies !
View Related
Go To Next Frame After Video Is Played
Hey everyone,
I'm looking for a very simple actionscript that will go to the next frame in my timeline after an FLV video has completed it's playback. I've found a bunch of different scripts but I can't seem to get any of them to work. I've tried the media.complete command, but that seems to be used for looping a video.
Any help is appreciated.
-mg
View Replies !
View Related
Checking Last Frame Played Possible?
Is it possible to check the last frame played in ActionScript?
I want to execute an animation sequence depending on what the last frame played was or where the playhead was originally just before the animation sequence.
Is this possible? is there a workaround using "_currentframe"?
Any help is appreciated!
View Replies !
View Related
Remebering Last Frame Played
hi,
I have a main movie that loads a flash intro movie into _level 50. I want people to be able to click on a button that loads something else into level 50 and when they click on another button it reloads the intro movie back into level 50 and plays from the last frame they saw.
Please help,
thanks
View Replies !
View Related
[F8] Check If A Movieclip Has Played And If So, Go To Frame X
Hi all,
I have a movieclip activated by a button. I want to be able to check if the movieclip has been played once and if so, skip to the end frame of said movieclip.
I've set a variable in the main timeline:
var introPlayed:Boolean = false;
And then, at the end of the movielip in question:
introPlayed = true;
And then on the button which activates the movieclip I've got:
on(release) {
_root.main_mc.gotoAndStop("phone");
gotoAndStop("phone");
if (introPlayed == true) {
_root.main_mc.phone_mc.phonesub_mc.gotoAndStop("in troplayed"); //end frame of movieclip
}
}
but it doesn't work!
Is the fact that my movieclip is rather buried deep, part of the problem?
Thanks in advance!
ScareBBear...
View Replies !
View Related
I Want Frame 2 To Be Played When These 2 Clips Overlap
First of all, is Flash MX 2003 using ActionScript 1 or 2?
second, I need AS help badly.
k, so I created 2 movie clips, and allowed one to be dragged. I gave it code:
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.stopDrag();
if (this.hitTest(_.goal)) {
gotoAndStop(2);
}
}
}
_.goal is the other movie clip. I want frame 2 to be played when these 2 clips overlap, but it wouldn't. What's wrong?
Thanks greatly in advance
Helplessman
View Replies !
View Related
Cue To Next Frame After Flash Video Is Played.
Basically, I have a video that I have converted to flash video using the encoder. I have imported this video into the first frame of my project. After the movie plays, I would like it to cue a frame with a picture. I will then stop the project on that picture....and that will be the end of it.
I did place a cue point at the end of my video when I encoded it. I thought I could then give an action script command at this cue point to send it to the next frame which would be my picture.
Two problems:
1. Not sure of the cue point action script to give for the "event value" so that it will go to the next frame.
2. My project basically consists of two frames. The first frame has my whole movie, the second from has my ending image. I need to know what script to add so that the project starts with the movie, plays it all the way through, then goes to the frame with the image.
I hope this makes sense.
View Replies !
View Related
Cue To Next Frame After Flash Video Is Played.
I posted the last question concerning the image showing up after the picture was played. The anwer I was given did work.
Now I went and complicated things. I would like to move into a tweened set of frames instead of just one frame. what would the script look like for that.
here's was I did for the single frame:
var vidList : Object = new Object();
vidList.complete = function() {
nextFrame(); //or whatever action you want
}
vid.addEventListener ("complete",vidList);
stop();
View Replies !
View Related
Control Flash Frame Played From Html Page
Is there a way to control a flash movie from the webpage you are on? I have a single swf that is just a slide show but the client wants the flash movie to start on slide "x" and so on depending on what page you are on in the site.
So at home page it will start on frame 1("start") and on the menu page the swf needs to start at frame"x"("menu")
Any suggestions?
Thanks for your time.
Chris
View Replies !
View Related
Loading A Frame In _root And Also Loading An External Movie Problems.
First of all, hello everyone and nice to meet you
I have been hacking at a problem for a couple of days now and I am in need of help to solve it. Please excuse my noobishness, but I have a lot to learn when it comes to flash.
Here is my scenario:
I have my main movie (_root)
In the actions layer of my main movie I have:
Code:
this._lockroot = true;
I have a button that loads a new external movie at the end of which I want to load a particular frame in the main movie. I call this from the external movie:
Code:
on (release) {
_root.gotoAndPlay(610);
}
Everything up to here works brilliantly....But my problem arises when I also try to load an external movie onto level 5 at the same time as I am instructing the main movie to play frame 610 from an external movie. I want the external movie to call frame 610 in main, and also load a new external movie on level 5 in the main movie. I have tried about every way of loading movies that I can think of but I can never get the external movie to load along with frame 610 of the main movie. I even tried _root.loadMovieNum("myexternalmovie",5) right after my first root call, like this:
Code:
on (release) {
_root.gotoAndPlay(610);
_root.loadMovieNum("myexternalmovie",5)
}
Is that possible or do I have to approach this entirely differently? Thanks for any responses
View Replies !
View Related
How To Create E-mail With Flash Movie Played On Arrival Automatically (movie Should B
Hi,
I am looking for simple but working solution to send Flash movie as a part of e-mail. I would like to send Flash movie with e-mail (part of e-mail itself or as attachment) and it should start playing as soon as message is downloaded. I was using HTML page as stationary (script was downloaded from the net, with embedded movie as object). It worked perfectly fine as long as I was sending email to myself and it played within Outlook or Netscape. But on other computers with appropriate player was installed nothing happened despite enclosing Flash movie to e-mail.
I believe that it should be simple solutions. Can anybody direct me to place where I find right script or advise how to point flash player to sent movie and make it play.
Best regards
Jacek
jklimasz@bigpond.net.au
View Replies !
View Related
If Movie Played
I have a grid of four images. On each image there are 4 fours that correspond to image 1,2,3,4
HOw would i go about coding the following:
If you press #2 the image shifts over to image 2.
If you press image three it shifts to image 3
If you are on image 1 and you press image 1 nothing happens.
etc etc
thanks
evan
View Replies !
View Related
Frame By Frame Loading Movie
I need to have a loading movie advance in relation to the frames it has loaded. I can get a "Bytes" preloader to work when I'm loading a movie, but when I have miltiple frames in the timeline it only wants to load the first frame then try to play and load as it goes. I used to
use "IfFrameLoaded" on the odd frames with a "GoTo" on the evens to advance the loading movie (Flash5). Anyways, sorry it's so long. If someone can help me it would be greatly appreciated.
View Replies !
View Related
How To Get Url Action After Movie Is Played? Please Help
Dear flash desingers,
i want to put in a action script in my flash movie, after the movie is played, is has to go to a defferent url (as i next page) , i know in action script you have to put in "get url" but not with the script "on (release)" because you don't have to click on it. it must go by it's self after the flash movie is played.
How do i do this?
Do i have to ad an stop action somewhere, if so where. If possible can anny one give me the comeplete action script code. because i'm at a real los. My site is currently working with a "refresh" code that refreshes the site in a couple of seconds that you put in your self in the HTML code, but thats not what i want. It has to be in the flash action script.
I saved al the movies i made on my site in an *.FLA so they can easely be edited.
PLEASE someboddy help me!!!!
View Replies !
View Related
Loading A Movie (within A Movie) & Assigning A Random Start Frame
Flash 5
Hello everyone.
After taking almost a year off from web programming Im relearning flash :0
I haven't gone past the basics with Flash 5 and have a couple projects coming up.
The routine I wish Flash 5 to do should be something simple to explain I hope for a vetrin user.
1) Flash Movie A (180 x 60) loads Flash Movie B (60x60) into left most space (say slot 1) and then randomly tells Flash Movie B to start at a particual frame (random(8). Each frame is a simple image with an actionscript Stop; command).
2) Flash Movie A fades in 1st Flash Movie B at slot 1.
3) Flash Movie A loads another Flash Movie B in the middle space (slot 2) and once again randomly tells Flash Movie B to starts at a particual frame (random(8) (just a static picture like in 1).
3) Flash Movie A fades in 2nd Flash Movie B at slot 2.
4) Flash Movie A loads another Flash Movie B into the far right space (slot 3) like the others (tells Movie B which random frame to start at).
5) Flash Movie A fades in 3rd Flash Movie B at slot 3.
My feeble mind is having a problem telling:
1) Where to tell Flash Movie A to position each load of Flash Movie B.
2) How to tell Flash Movie B I wan't it to start at a random frame.
I have the fade in and fade out set
also.... slightly more complex.. Does anyone have experience in doing somethnig similar to this and setting a variable to define which random numbers were selected for each slide so they will not repeat. (i.e. after loading slot 1 it will also define 'slot1' at the same time it creates that random number for slot1 and so on).
TIA
Dan
View Replies !
View Related
Recognize A Movie Clip Already Played
Hello. I need a good solution to a movie that plays a movie clip once, and then after it has played it never plays again.
The stop();
feature will not work here because my movie is going back to a separate page, and then starting the movie over again. Adding stop to the end is useless and adding it to the front will not play the movie.
Thank you in advance,
Christian
View Replies !
View Related
Check If Movie Has Played Before, .. If So Stop.
I have a movie loaded into a header (which is loaded every time a new page is browsed). This movie spouts out a pop up window after 30 seconds then stops. This works except of course every page time this loads afresh it spouts out a new one.
Is there some sort of way to check if movie has been played (say within a 4 hour period) and if it has not to play (do not spout out the pop up)?
Any help would be appreciated.
EDIT....
This is Flash5, thanks
View Replies !
View Related
Movie Played When Model Has Been Dressed
I'm creating a "dressing up" game using the drag and drop functionality, I need a movie clip to appear when the right combination of clothes are dropped onto the model. There will be several movie clips to be played depending on which combination of clothes are selected.
Any thoughs would be greatly appreciated.
View Replies !
View Related
Play Movie Once Sound Has Played...
Hi,
I have a basic flash movie with a graphic that fades in to a keyframe. At this point the movie stops and a sound plays through actionscript coding (shown below). How do I set the movie to continue once the sound clip has finished? At the moment the movie continues once the audio starts playing.
Code:
stop();
//Play Internal Sound Behavior
if(_global.Behaviors == null)_global.Behaviors = {};
if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
if(typeof this.createEmptyMovieClip == 'undefined'){
this._parent.createEmptyMovieClip('BS_daddy',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.daddy = new Sound(this._parent.BS_daddy);
} else {
this.createEmptyMovieClip('_daddy_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.daddy = new Sound(this.BS_daddy);
}
_global.Behaviors.Sound.daddy.attachSound("daddy");
if (true) {
_global.Behaviors.Sound.daddy.start(0,1);
}
//End Behavior
play();
I have used the code (shown below) but it tells me when test the movie "There is no property with the name 'daddy'."
Code:
Sound.daddy.onSoundComplete = function(){
play();
}
Any ideas...
View Replies !
View Related
Play Movie Once Sound Has Played...
Hi,
I have a basic flash movie with a graphic that fades in to a keyframe. At this point the movie stops and a sound plays through actionscript coding (shown below). How do I set the movie to continue once the sound clip has finished? At the moment the movie continues once the audio starts playing.
Code:
stop();
//Play Internal Sound Behavior
if(_global.Behaviors == null)_global.Behaviors = {};
if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
if(typeof this.createEmptyMovieClip == 'undefined'){
this._parent.createEmptyMovieClip('BS_daddy',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.daddy = new Sound(this._parent.BS_daddy);
} else {
this.createEmptyMovieClip('_daddy_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.daddy = new Sound(this.BS_daddy);
}
_global.Behaviors.Sound.daddy.attachSound("daddy");
if (true) {
_global.Behaviors.Sound.daddy.start(0,1);
}
//End Behavior
play();
Thanks
View Replies !
View Related
Movie Continues After All Sounds Played...
[Flash CS3/AS2]
I have this...
Code:
waveNoise1 = new Sound();
waveNoise1.attachSound("waveNoise1_snd");
this.waveNoise1_mc.onRollOver = function() {
waveNoise1.start(0,1);
};
Is there a way to detect if this sound has been played, and then (and only then) will the movie continue to the next frame.
p.s. can this be applied so that multiple sounds have to be played through once to continue?
View Replies !
View Related
Help Needed With Loading A Movie (and Frame Number) Within A Movie
i would like to make a function (?) that checks a variable constantly throughout a movie.
the function would check a variable (mood) which is initialised at 50.
depending on what mood is (checked by using an if statement?), i would like to load a movie that is placed within my main stage, specifically a frame (labelled something like "Happy", "Sad", "Normal").
i have no idea where i would put the function, having sort of only just worked out how to initilise the value for "mood", no idea how to load a movie within a movie to a specific frame number, and no idea how to write that all in an if statement.
any light shed on this would be appreciated like you'd no believe (project is due in 48 hours).
thanks in advance.
View Replies !
View Related
Can A Loaded Movie Only Be Played By Hitting A Button?
I use LoadMovie("test.swf", "TargetInstance") in a preloader. In the last frame of the preloader, the action script is: gotoAndStop ("Main", 1);
Note: The "test.swf" that is loading has a Stop() in the first frame.
The Scene named "Main" is one frame long with a MC with the instance name of "TargetInstance" and a button to start the clip.
The Button script is:
on (release) {
TargetInstance.Play();
}
This plays the clip just fine. My question is how can I get this clip to play automatically without using a button? I have tried putting: TargetInstance.Play(); in the actionscript of the frame, and that does not work.
View Replies !
View Related
Want To Find The Name Of Current Movie Being Played On The Stage
For my application I plan to load movie from a particular folder.Is there any way to find through action script code, which movie is being played on the stage?Like,suppose I have linked a particular .swf file called "eye.swf" to a button on the stage.When the user presses the button the movie starts playing on the stage.There are lot of buttons on the stage of similar nature.So the problem I am facing is that I am not able to retrieve imformation about the movie currently being played on the stage.Is there any way to get that information?Please Reply.
View Replies !
View Related
|