ActionScript 1/2 :: Movieclip To Play From Different Keyframes Based On What Url Were Starting From Before
Nov 26, 2010
I have an swf file on the homepage that is the intro followed a menu. When the user types the URL for the home page from an outside site, I need the entire flash file to play from frame 1, but if you have already seen it and then clicked around to subpages within the site and then want to go back to the home page , I want the movieclip to start from a specified keyframe.
View 8 Replies
Similar Posts:
Jun 17, 2009
I have multiple movie clips on 4 labeled frames of my movie. The keyframes are as follows : People, Place, Portfolio, Possibilities
The buttons to go to each of these keyframes work, although because I have a movie (different for each keyframe) I cannot get the previous movie's audio to stop when I click to another keyframe.
Also, I cannot get the other movie to work once I am on the next page.
The movieclips are named- Btn2 -which is the movieclip that plays once clicked on the homepage. Btn3- which is the movieclip that is supposed to play once clicked (on the people page).
To see what I'm talking about- visit: [URL]
give it some time to load- then click the doorbell- let the movie play for a little bit then click on people...the door closes, but the sound continues.
Here's the actionscript.
ActionScript Code:
stop();
import flash.events.MouseEvent;
//---people button timeline change---//
[Code].....
View 1 Replies
Feb 13, 2007
I wondered how to set up a flash movie that read an xml doc and depending on the value of a variable, opened a movieclip or not. so if the xml doc had a variable "cool" that had a value of "on", flash would do something like...
if (variable read from xml) is "on"
loadmovie("")
I just don't know how to set up the movie
View 1 Replies
Aug 19, 2008
i know the pythagorean theorem for figuring out distance between 2 points.
what i don't know is how to take that equation and determine another aspect based on 2 different bits of data.
figure out the ending _y position based on the starting point, the initial angle and the ending _x position??
View 1 Replies
Apr 7, 2011
i'm working with don't supply me with any symbol/symbols that mean "and" I know || is for "or", ! is "isn't", but if I want to say something like:
if (event.keyCode == Keyboard.LEFT || event.keyCode == Keyboard.DOWN)
{
}
except instead of ||, I'm looking for a symbol that means "and" I have 8 renders of a walk cycle in 8 different directions. (stored on 8 different movieclips within the main movieclip.) I want to try making an "if" statement that plays the diagonal animations when 2 arrowkeys are pressed at once.
View 4 Replies
Jan 8, 2010
I'm using AS3, and have one simple layer with 4 keyframes If I import it to another fla file as a library item, it keeps showing me all keyframes, I don't want that I want it to show me the whole animation.
Like, if I have an animation of me swinging a baseball bat, I don't want to see all the keyframes seperately imported into the library, but I want it to be all in one piece, so that when I click play it plays all keyframes.
View 1 Replies
Jul 29, 2011
I am new to flash and creating a file with a series of 25 images. I have each image on its own keyframe in the stage1 and I have buttons for: play_btn, stop_btn, next_btn, prev_btn My next and prev buttons work ie...
[Code]...
but I am unable to get any AS3 code to work as a Mouse.Click to play the series of keyframes. Every time I try to add a gotoAndPlay to the play_btn my file just starts a continuous loop.
View 6 Replies
Sep 19, 2010
After doing some research, I found that there seem to be a lot of confusion regarding what I am trying to do.I thought this would be something that a lot of people would find it useful but very little information out there.I found a thread that did exactly what I'm trying to achieve, but I was hoping I could find some other solution in AS3 aside from using timeline animation and frame labels.[code]...
View 1 Replies
Sep 24, 2009
I have set up my project file in such a way that I have an FLV loader and a movie clip with six key frames (for my menu) on the stage. On each of the key frames I have six buttons. The way the site is supposed to work is that when you click on a different button you jump to a different key frame where an flv movie begins to play and an external swf file is loaded. I've made some progress with the coding, but the darn thing still doesn't work.
I have pasted my AS3 code below.
var mySection="company"
var mySection="services"
var mySection="films"
var mySection="news"
var mySection="donate"
[Code] .....
View 0 Replies
Oct 11, 2004
i am having trouble with my gotoAndPlay in my MC. i have An MC1 on main stage then inside it i have another MC2. Now on my MC1 i want wen it comes to frame 15 to go and play starting frame2 on MC2 so in MC1 frame 15 i put mc2.gotoAndPlay(2); But nothing happens.Oh yea MC1 has stop on the first frame. But i dont see why it wont work.
View 2 Replies
Feb 12, 2008
I have a movieclip that has a keyframe at every frame, and I'd like my code to be able to draw to the individual keyframes within that clip. I'm generating images for animation, but the code takes a few seconds per image, so the animation can't simply be generated on the fly. I want the code to draw all of the images into the movieclip and then play the animation as a loop once that's done. It seems like this would be a pretty straighforward method, but I can't get it to work. It seems that when I draw into the movieClip, it ignores the fact that I have keyframes there. Whatever I draw appears at every frame as if it's drawn onto a different layer that just has the default keyframe at frame 1. To test, I manually put drawings into the keyframes, and they loop back as expected. The only problem seems to be that the animation images generated by actionScript appear all on top of each other and held for the entire movieClip loop. The following is code that I had hoped would draw into frame 2 of the movieClip. I assume that this is naive:
clipInstance.gotoAndStop(2);
clipInstance.lineStyle(1, 0x000000);
clipInstance.beginFill(0xFFFF00);
[Code]....
View 1 Replies
Oct 10, 2011
i have a movieclip named bgMC that has 5 keyframes with a different image for every keyframes.i'd like to know if it is possible via actionscript, caurina or else to have a transition between keyframes like:
1) i use bg.gotoAndStop(1)
2) fade in the image i have in keyframe(2), if i use i use bg.gotoAndStop(2) the image is replaced istantly
View 3 Replies
Nov 4, 2009
If you have an flv of 20mb, does Flash fully load it before starting to play it? And if not, what's the difference then with streaming video?
View 1 Replies
Oct 15, 2008
I imported a swf created in After Effects to Flash CS3 to make it interactive. Flash broke the "swf" movie into a number of keyframes (apprx 65 keyframes) which when previewed, plays all the keyframes one by one. I want it to stop at first keyframe and have a button over there, which when clicked will let the next 30 keyframes run without stopping. Then stop at the 30th keyframe which will have another button to be clicked to proceed to the the next 34 keyframes without stop. I have been trying the stop(), and gotoAndPlay nextFrame, but it stops at the next frame. One more thing, do I need to convert all the imported keyframes to graphic or movieclip ?
View 2 Replies
Oct 7, 2011
if i click 'Play' Button video playing normally, after i click 'Pause' button video pause, next i click 'Play' Button video playing from starting point. what is the problem
solution pls...... Code:
[Code]...
View 2 Replies
May 26, 2011
I have three buttons, which starts three separate videos...click on button starts video, that's ok, but then video is not over, if to click again,it's not starts video from beginning. I'm talking about one video. I must push on other button and then on that again to start it from beginning.
ActionScript Code:
import flash.events.MouseEvent;
import fl.video.FLVPlayback;
vidPlayer.stop();
Object(this).1btn.addEventListener(MouseEvent.CLICK, button1);
function button1 (e:MouseEvent):void{
[Code] .....
View 0 Replies
Mar 28, 2009
Using the tutorials on the gotoandlearn main page I built a custom video player that loads the videos from an xml file and it works great. 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.
View 3 Replies
Apr 16, 2010
Adobe Flash Builder: How to make a function to play video starting from one second and ending in another? So I havein MXML simple video player tag. I need some function to play that video from second X to second Y and pause it. How to do such thing?BTW: we asume file is embeded into SWF.
View 1 Replies
Sep 2, 2011
In the transitional stage to AS3, I have 2 MovieClips onstage both with a short animation in them. MovieClip2 has the stop(); on its first frame. When movieClip1 gets to the end of its timeline I want it to start movieClip2 playing.
parent.movieClip2.gotoAndPlay(2); doesn't work.
Do I need evenetlisteners or something?
View 2 Replies
Jul 28, 2010
Im having trouble stopping or starting loaded swf files. I need to dynamically load the swf file but make sure it doesn�t play until the user requests it. The trouble is I wont know anything about the loading swf file (for example frame labels, if it has a 'stop' script in the first frame etc.) Ive attached a simplified version which I think illustrates the problem but the code is:
[Code]...
View 2 Replies
Jan 20, 2006
I have a nested MC that functions as a continuous slider; when you mouse right of center it slides one way and when you mouse left of center it slides the opposite direction. Right at center it stops. The problem I have is that I'm using this as a menu at the bottom of a .swf and there are other places to mouse on the page, which means that this menu is constantly in motion even when it's not being used. I want it to stop when it isn't being used, only because it's an MC I can't use the onMouseOut command to stop the clip. I tried making a button that targets the clip and stops it when you roll over the button but it doesn't work.
Here's the script I'm currently using:
onClipEvent (mouseMove) {
xcenter = 467.5;
speed = 1/25;
} onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
[Code] .....
View 3 Replies
Apr 5, 2004
How I can play a movie based on the url you are at? I got a swf movie included in my indexpage: index.php. With PHP different content is included in the framework based on the $_GET['page'] variable with PHP. Basically the swf's menu just uses urls like 'index.php?page=home' or 'index.php?page=contact'. Now I only want to play a movieclip in the swf if im on the homepage (index.php?page=home) and not on the other pages. Is this possible with AS?
View 1 Replies
Apr 5, 2004
how i can play a movie based on the url you are at? xample: I got a swf movie included in my indexpage: index.php With PHP different content is included in the framework based on the $_GET['page'] variable with PHP. Basically the swf's menu just uses urls like 'index.php?page=home' or 'index.php?page=contact' Now i only want to play a movieclip in the swf if im on the homepage (index.php?page=home) and not on the other pages. Is this possible with AS?
View 1 Replies
Aug 1, 2011
I am trying to play some videos from a XML based playlist. I found this, but it's for AS2: Quote:
[Code]...
The instance is named flv and the XML file flv.xml, what would be the correct way to do this in AS3?
View 9 Replies
Apr 29, 2009
So what time trying to do is play a specific frame in the movieclip based on the time of day:
PHP Code:
onClipEvent (enterFrame) {
var myDate = new Date();
var hour = myDate.getHours();
[code]....
but when I change to "gotoandPlay" the movieclip just loads from the beginning frame and seems like it doesnt check the time.
View 7 Replies
Jan 15, 2011
On Scene1 I'm trying to add some script that will continuosly recognize what the x axis value is and if it is greater than 600 it is supposed to play frame 1 of the movie, and if it is less than 600 than it is supposed to play frame 10. The code I'm using seems to work, but only at the initial startup of the movie. How do I modify this code to have it continually updating the shoot movie based on where the mouse is at on the movie?
[Code]....
View 1 Replies
Aug 29, 2006
I recently got back into animating and I need some help with my latest project. I have a number of different animations that I would like to be played on the inside of a tv, however I would like for these animations to play at certain times. For example, at 9:00 pm (real time) the tv displays the animation of the character sleeping. I'm not sure how to do this, and I'm not sure if I need an internal clock.
View 6 Replies
Apr 12, 2007
It's been a long time since I've done any work with actionscript, and alas I've forgotten nearly everything. I've tried to look for a tutorial that would explain basic animation with actionscript, but the one that I found on Kirupa was no longer there.
Basically I'd like to do this:On the stage I have a movieclip and I'd like the movieclip to move along the x-axis to a certain point and then back to the starting point again. The moving speed of the movieclip should also be adjustable.
View 8 Replies
Apr 28, 2009
I am making flash CS4-based music player with ActionScript 3. When I host the player on my site, e.g. [URL], and play an mp3 on the server of my site, e.g.[URL], it works well.
When I link to an mp3 of another site, e.g. [URL], in my local machine, it also works. However, when I host the music player in my site [URL], and play an mp3 of [URL], then it can't be played.
View 8 Replies
Apr 6, 2009
I am using Flash MX 2004, aka Flash 7, and Actionscript 1. What I have is a movie clip that plays on frame one. Its a variation of loading screen. What I want to do is make it so that when the movie clip is on its last frame (frame 100), then it switches to frame 2. NOT frame 2 of the movie clip, but frame 2 of the overall project.
Code:
if (_root.loader._currentframe == 100) {
_root.gotoAndPlay(2);
}
(movie clip is called loader)
I have also tried naming frame 2 "finishedLoading" and just "2", but it still will not go.What happens is, when the movie clip animation is finished and on frame 100, it just sits there. I had to put a stop(); in frame 1 so that the animation could play, but it stays stopped. This was all done after I tried the logical approach where inside of the movie clip on frame 100 of the movie clip, I made an "Actions" layer and on frame 100 keyframe, I put:
Code:
gotoAndPlay(2);
I also tried
Code:
gotoAndPlay("finishedLoading");
and
Code:
gotoAndPlay("2");
I have even resorted to the last resort. I put tried to make a variable so that when the movie clip is on frame 100, that "var finishedLoading" would be set to true, and then:
Code:
if (finishedLoading == true) {
//
}
Inside of the comment would be gotoAndPlay(x);
View 1 Replies