Help With Loading A Movie To A Specific Frame
Hi everyone,
This is my first post on FlashKit so I hope someone can help.
I am creating a board game for a client in Flash MX 2004, I can get the single player version to work flawlessly, but the problem occurs when I'm trying to make player 2 work.
Each player and the spinner associated with it is it's own movie clip. The board for the game is the main timeline. There are also independed animated movies for each space on the board that each player MC calls up depending on its position.
I can make the game switch back and forth between player 1 and 2 but the issue I keep running into is that when the switch occurs the movie clip for each player starts over at frame one.
The question is how do I store the current frame for each movie and have it recall that frame when the other players turn is done.
I thought of using a variable such as:
onframe = getProperty("MCname", _currentframe); MCname being the name of the movie clip.
But how do I recall that variable and make each player MC go back to the particular frame, which will change with each turn.
This is my final hurdle on this game so any help would be greatly appreciated.
Thanks in advance.
Mkorbar
FlashKit > Flash Help > Flash ActionScript
Posted on: 11-30-2006, 10:57 AM
View Complete Forum Thread with Replies
Sponsored Links:
Loading Movie To A Specific Frame
Hi,
I have a movie "first.swf" that provides a jumping off point for three other movies.
My Goal: When the user selects one of the three movies in the first.swf by clicking on a button, the first.swf is unloaded by the second.swf selected. When that second.swf finishes playing it automatically is unloaded by the return of the first.swf, but now at a specified frame.
My Trouble: Is the script placed at the end of the second.swf for the automatic reloading and navigation to a particular frame of the first.swf. So far the first.swf reloads perfectly, but it starts playing from frame number one, totally ignoring line 3.
Script placed in the last frame of the second.swf:
1. unloadMovieNum (0);
2. loadMovieNum ("first.swf", 0);
3. gotoAndStop (50);
All help will be greatly appreciated.
Corl
View Replies !
View Related
Loading A Specific Frame Of A Movie?
I have a website that is almost entirely in flash. I have separated each page of the site into it's own flash animation.
I'm wondering if it's possible to load a specific frame of an animation or does the loadMovie option just load the first frame of the movie?
In other words, in the about section of this website (about.swf) there is a button to view info about a book. The information about the book is in a separate animation that is in products.swf, Scene 3, frame 1.
Can a getURL action or LoadMovie action get the user to the products animation, scene 3, frame 1??
Hope I'm describing this correctly!
Thanks!
Zoe
View Replies !
View Related
Loading Movie To Specific Frame
I have split a file into three movies (because of size) which use back and forward buttons. Using the forward button from one to the next is not a problem because it starts at frame one, however, using the back button is a problem because it starts at frame one. Is there a way to tell it to load the movie and start at a specific frame label?
View Replies !
View Related
Loading A Movie To A Specific Frame...
Is it possible to load a movie to a frame???
I'm making a website that loads movies into empty movie clips.
I want to know if I can tell a movie to load... and then go to a frame number... all with one command...
the code i'm using is this...
contents.loadMovie("movie.swf");
Is there any code that can load the movie and send it to a specific frame??? I don't think it is possible... but I know so little in the world of flash... so maybe it is...
Thanks for the help
- Mikey
View Replies !
View Related
Loading Movie W Specific Frame
Is it possible to load a movie telling in which frame you want it beggins from?
I have 3 buttons loading the same .swf, but I need that this .swf beggins in diferent positions ( frames ) deppending on which button you press.
- button 01 loads ex.swf starting play from frame 1
- button 02 loads ex.swf starting play from frame 20
- button 03 loads ex.swf starting play from frame 30
If you know this please tell me the code.
Tks a lot
View Replies !
View Related
Loading Movie In A Specific Frame
Hi everybody, i need to load a movie into my container, i'm using this AS:
_root.createEmptyMovieClip("container", 1);
loadMovie("home.swf", "container");
container._x = 280 ;
container._y = 100 ;
it's work ok, but i need to load the movie on frame 3. Because on frame 1&2 i got a preloader.
Can somebody tell me how can i modify the AS above, to load the movie on frame 3.
Thanks!
View Replies !
View Related
Loading A Movie To A Specific Frame
not been here for a while so I hope someone can help me
what I am trying to do is load interface_introtst.swf to a specific frame.
but i can seem to get it to go to frame 26!
here is my code so far
Code:
on (release) {
unloadMovie(1); //unload level1 swfs
loadMovie("interface_introtst.swf", 0);
preloadMovie = setInterval(preloadTime, 10);
function preloadTime() {
loaded = _level0.getBytesLoaded();
total = _level0.getBytesTotal();
if (loaded>0 && loaded>=total) {
clearInterval(preloadMovie);
_level0.gotoAndStop(26); // got to frame 26 of interface_introtst.swf.
_level0.mountains.walkingsprite.staticsp._visible = true;
_level0.mountains.walkingsprite.spriteani3._visible = true;
_level0.mountains.walkingsprite.spriteani2._visible = true;
_level0.mountains.walkingsprite.libsprite._visible = true;
_level0.mountains.walkingsprite.staticsp._visible = true;
_level0.mountains.walkingsprite.spriteani4._visible = true;
_level0.mountains.walkingsprite.spriteani3._visible = true;
_level0.mountains.walkingsprite.spriteani2._visible = true;
_level0.mountains.walkingsprite.libsprite._visible = true;
_level0.mountains.walkingsprite.staticsp.gotoAndStop(1);
_level0.mountains.walkingsprite.spriteani4.gotoAndStop(1);
_level0.mountains.walkingsprite.spriteani3.gotoAndStop(1);
_level0.mountains.walkingsprite.spriteani2.gotoAndStop(1);
_level0.mountains.walkingsprite.libsprite.gotoAndStop(1);
}
}
}
thanks devshed users
View Replies !
View Related
Loading A Specific Frame In Another Movie-clip
Hello,
I have the main menu in a movie-clip called first.swf. Then I have the whole site content in another movie-clip, second.swf. Depending on what choise the visitor makes in the menu, I want a specific frame of second.swf to be loaded.
Is this possible, and if so how is it easiest achieved? I don't want to split up second.swf into several smaller swf:s.
Anny suggestions are sincerely appreciated!
View Replies !
View Related
Loading And Going To A Specific Frame In A Loaded Movie
Hello, please bear with me as I explain what I'm trying to do for a travel website:
On my main timeline, I have two frames, 1) preloader; 2) the website movie clip.
The website movie clip has 5 frames, one frame per page (e.g., fr. 1= Home; fr. 2 = Destinations; fr. 3 = FAQ, etc).
On fr. 1 of the website movie clip, I have a short cut to go to different parts of fr. 2, which is Destinations. For example, I have a list of Destinations to click on from the Home page, like "Africa."
All the contents of fr. 2, the Destinations page, is dynamically loaded. I have a separate swf called "destinations.swf" containing about 50 different locations, assigned to 50 different frames. (i.e., fr. 1 = Hawaii; fr. 10 = Norway, fr. 30 = Africa, etc).
Once you are in a Destination (e.g., frame 10 of "destinations.swf"), I call out to different pieces of contents onto the info boxes I have for each destination. For example, going to fr. 30, Africa, will call out to "africafacts.swf" and "africamap.swf").
The Destinations Page (fr. 2 of website timeline) also has the destinations shortcut, and all the above functions work properly without problem. What I can't do is make the shortcut from the Home Page (fr. 1 of website timeline) load specific frames of an external file, "destinations.swf".
Note: I'm not using multiple Scenes or Levels - should I be? I'm a designer and never really learned how best to use Scenes or Levels; have done without using them this whole time. (gasp?)
Here's what I want to do.
When you click on "Africa" from my Home page, I want it to:
1) go to Fr. 2 of the website movie clip
2) load "destinations.swf"
3) go to the "Africa" frame number (e.g., fr. 30) on "destinations.swf"
I can go to Fr. 2 of the website movieclip, load the "destinations.swf" just fine. I can't get the loaded movieclip to go to a specific frame according to each destination (e.g., fr. 10 if Norway was clicked on the short cut; fr. 30 if Africa). I can only get it to load and play the frame 1 of "destinations.swf."
I'm not sure if I'm phrasing this correctly, but how do I call out/load a specific frame number on an external movieclip?
Sorry for the meandering explanation - I have a feeling that my architecture is wack, but I'd really like to avoid having to reconstruct the basic structure of the site.
Thank you for your time and help in advance!
Macgirl
View Replies !
View Related
Loading And Going To A Specific Frame In A Loaded Movie
Hello, please bear with me as I explain what I'm trying to do for a travel website:
On my main timeline, I have two frames, 1) preloader; 2) the website movie clip.
The website movie clip has 5 frames, one frame per page (e.g., fr. 1= Home; fr. 2 = Destinations; fr. 3 = FAQ, etc).
On fr. 1 of the website movie clip, I have a short cut to go to different parts of fr. 2, which is Destinations. For example, I have a list of Destinations to click on from the Home page, like "Africa."
All the contents of fr. 2, the Destinations page, is dynamically loaded. I have a separate swf called "destinations.swf" containing about 50 different locations, assigned to 50 different frames. (i.e., fr. 1 = Hawaii; fr. 10 = Norway, fr. 30 = Africa, etc).
Once you are in a Destination (e.g., frame 10 of "destinations.swf"), I call out to different pieces of contents onto the info boxes I have for each destination. For example, going to fr. 30, Africa, will call out to "africafacts.swf" and "africamap.swf").
The Destinations Page (fr. 2 of website timeline) also has the destinations shortcut, and all the above functions work properly without problem. What I can't do is make the shortcut from the Home Page (fr. 1 of website timeline) load specific frames of an external file, "destinations.swf".
Note: I'm not using multiple Scenes or Levels - should I be? I'm a designer and never really learned how best to use Scenes or Levels; have done without using them this whole time. (gasp?)
Here's what I want to do.
When you click on "Africa" from my Home page, I want it to:
1) go to Fr. 2 of the website movie clip
2) load "destinations.swf"
3) go to the "Africa" frame number (e.g., fr. 30) on "destinations.swf"
I can go to Fr. 2 of the website movieclip, load the "destinations.swf" just fine. I can't get the loaded movieclip to go to a specific frame according to each destination (e.g., fr. 10 if Norway was clicked on the short cut; fr. 30 if Africa). I can only get it to load and play the frame 1 of "destinations.swf."
I'm not sure if I'm phrasing this correctly, but how do I call out/load a specific frame number on an external movieclip?
Sorry for the meandering explanation - I have a feeling that my architecture is wack, but I'd really like to avoid having to reconstruct the basic structure of the site.
Thank you for your time and help in advance!
Macgirl
View Replies !
View Related
Loading Specific Frame From External Movie
Hello!
I have no idea if what I am writing now will make any sense, but I will give it a try anyway. I am pushed by a deadline and I need to find a solution for my problem:
I am building a presentation in Flash. It is quite complicated, but I am not using any actionscript - just Stop, Play, Go back, etc.
There is a section Photo Gallery which is a list of thumbnails. Clicking on a thumbnail should open the photo in a bigger format.
I need some kind of solution which can help me avoid importing 100 preview images.
So, is it possible (and how does it work) to create an external movie with all preview images imported one after another in 100 frames and by clicking a thumbnail from my main movie to load the corresponding preview photo (frame number) from the external movie?
Let's say in my main movie I click on thumbnail number 3 and I load the external movie's frame #3 where the corresponding preview photo is placed?
View Replies !
View Related
Loading A Specific Frame Of Swf File Into Movie
hello,
I am tring to do the following (if there is a better route, i would love to hear it)
I have created a file with rollovers on the buttons. I want a bit of text to come up for each of the buttons as you rollover them.
I have created a seperate swf file for these chunks of text and have added a script to each button to load this external swf on rollover.
This works fine but I cannot get it to load a specific frame of the "imported" swf file containing my text for the rollovers.
here is what i have put in the actions:
on (release) {
gotoAndStop(60);
}
on (rollOver) {
loadMovieNum("portfolioLabels.swf", 100);
}
on (rollOut) {
unloadMovieNum(100);
}
thanks!
View Replies !
View Related
Loading External Movie From Specific Frame Number
Hi all
i want to know how i can load an external movie from some specific frame , for example i have two movies
"main.swf" and "one.swf"
now i have one button place in "main.swf" i want that when a user click on button, it will load "one.swf" from its 10th frame
i hope that u understand my problem
take care
View Replies !
View Related
Specific Html Page Triggers Specific Frame Of The Flash Movie
I have been playing with flash and html and wonder if any of you have a bright idea on how to do this.
I have a flash movie, which I call from html but depending on which part of the html page I call it from I want to start it at a particular frame and not always from the beginning.
I have created a variable within the movie in action script and given it a different value for each of the frames I want to start the movie at, and want now to designate the value I give to that within html so that the movie “jumps” to the correct frame. Is this possible or am I totally crazy??
View Replies !
View Related
Help Load A Movie (and Frame) On A Specific Frame In My Timeline
I need to Load a movie and go to a specific frame within that loaded movie.
I know how to do this "on press & release" commands but how do I get it to load when a certain frame is reached in my timeline.
Example. When finished preloading it plays frame 25. When it gets to frame 25 I wan't a movie to load and start on a certain frame.
If you need more info or I am not making myself clear, please let me know.
Thanks in advance.
View Replies !
View Related
Loading A Specific Frame In A .swf
I have loaded another .swf movie into my original movie using the "get URL command. The problem I am having is: I want the movie to start from a specific frame in that movie. Is there any way to target a specific frame in the loaded movie and play from that point on? I am trying to skip the first few frames of the loaded movie.
View Replies !
View Related
Loading SWF On Specific Frame
Hello, I'm building a site that I'd like to be primarily Flash but will have some frequently updated graphic & text content which I think will be better maintained in HTML.
I'd like the majority of the site to be in Flash, fitting to screen, and was planning on structuring a different scene for each 'page' (ie contact, about us, etc.) and then building a condensed (shorter) navigation bar on top of an HTML page for the frequently maintained content. However, I need a way so that if they choose contact, it doesn't just bring them back to the home page, but specifically into the homepage and to the contact section.
I feel like I'm overlooking a simple solution. Is there an easy way to load the page to a specific scene, or is there a better way of structuring this site?
Thanks for your help!
View Replies !
View Related
Loading Swf Into A Specific Frame
Button 6 resides in main.swf. When you press button 6, it loads pictures.swf into a level using the following syntax.
on (press) {
loadMovieNum("photographers.swf", 2);
loadMovieNum("pictures.swf", 3);
unloadMovieNum(4);
}
The pictures.swf loads and automatically we see the picture housed on the first frame. I want to be able to go to a specific frame (let's say frame 6 in this case) in the pictures.swf. How can I control this from the button 6 in the other fla.file?
Thanks in advance for any help you can spare?
View Replies !
View Related
Loading To A Specific Frame
Hello~
The webpage I am working in is one move. I want to be able though to create an html file that will start the document from a certian frame (not from the beginning). How do i do this without breaking up the whole flash file.
Thanks
Josh
View Replies !
View Related
Loading External Swf To Specific Frame
I'm SO sorry to post this again, but I've lost my previous information. Forgive me!
How do I go about loading an external swf, from a button, and having it go to, say, frame 45 instead of frame 1?
Right now, my buttons have the following code in them to load the external movies:
on (release) {
_root.emptymc.loadMovie("who.swf");
}
Thank you very much!
~Vikkie
www.explorecore.com
View Replies !
View Related
Loading A Specific Frame From External Swf
This is a FlashMX problem. I posted in the wrong section of the forum last time. ooops!
I'm trying to get to a frame label in an externally loaded swf but it just doesn't wanna work. This code works right up until the line that calls the gotoAndPlay....part. The external swf I call always opens in the first frame which is not what I want.
It just doesn't seem to call the frame label in the external swf at all.
rNum = random(5);
_root.createEmptyMovieClip("movieHolder",2);
movieHolder.loadMovie("ext_rnd_btn.swf");
_level2.movieHolder.gotoAndPlay("frameLabel_0"+rNu m);
Can anyone help me please?
View Replies !
View Related
Loading Sound On A Specific Frame
Hi,i have used this code in order to play a sound within my site:
mySound = new Sound();
mySound.attachSound("end");
The problem is, flash loads the sound at the start of the whole movie instead of waiting until the frame in which this code is on and loading it. Meaning instead of having a nice loading page its a blank page for about 3 minutes.
Please help!
thank you
Joe
View Replies !
View Related
Loading Movies To A Specific Frame
Is it possible to load in a movie to a specific frame? I am currently loading a movie from a button with:
on (release) {
unloadMovieNum(1);
loadMovienum("Is.swf",0);
}
This works perfect, but I'd like to add usablility by directing the button to a specific frame within that new movie. I've tried:
_level0.gotoAndPlay(10);
after loadMovienum in the previous code but it doesn't do anything different. The movie always starts up on frame 1.
In the end I'd like to have multiple buttons serving as navigation buttons specifying different frames of the new movie.
Am I close or is this not even possible? Thanks!!
View Replies !
View Related
Loading A Text In A Specific Frame
hy there! i followed the kirupa forum about transitions between SWF's, but have one problem now. dont know how to load a dinamic text in a text_MC, but make it apear only in the midframe of the background mc...
i have a dropdown menu who loads the BG's to the container_MC in the main timeline (its a movieclip too) who has the following code in the button:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "bg2";
_root.contentor.loadMovie("bg2.swf");
} else if (_root.currMovie != "bg2") {
if (_root.contentor._currentframe >= _root.contentor.midframe) {
_root.currMovie = "bg2";
_root.contentor.play();
}
}
}
on (release) {
_root.scroller.loadText = new loadVars();
_root.scroller.loadText.load("EQUIPA.txt");
_root.scroller.loadText.onLoad = function() {
_root.scroller.text = this.TEXTO;
};
}
i know this second part is wrong, but its the best i could do :S
how do i make it unload the preview text, and load a new one when the bg finishes the intro animation (gets to the midframe)?
http://cosmos.oninetspeed.pt/pantas/main.fla - for the main file
or
http://cosmos.oninetspeed.pt/pantas/ - to view the site
thanks in advance for any post!
View Replies !
View Related
Loading Movies To A Specific Frame
Is it possible to load in a movie to a specific frame? I am currently loading a movie from a button with:
on (release) {
unloadMovieNum(1);
loadMovienum("Is.swf",0);
}
This works perfect, but I'd like to add usablility by directing the button to a specific frame within that new movie. I've tried:
_level0.gotoAndPlay(10);
after loadMovienum in the previous code but it doesn't do anything different. The movie always starts up on frame 1.
In the end I'd like to have multiple buttons serving as navigation buttons specifying different frames of the new movie.
Am I close or is this not even possible? Thanks!!
View Replies !
View Related
Loading A Text In A Specific Frame
hy there! i followed the kirupa forum about transitions between SWF's, but have one problem now. dont know how to load a dinamic text in a text_MC, but make it apear only in the midframe of the background mc...
i have a dropdown menu who loads the BG's to the container_MC in the main timeline (its a movieclip too) who has the following code in the button:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "bg2";
_root.contentor.loadMovie("bg2.swf");
} else if (_root.currMovie != "bg2") {
if (_root.contentor._currentframe >= _root.contentor.midframe) {
_root.currMovie = "bg2";
_root.contentor.play();
}
}
}
on (release) {
_root.scroller.loadText = new loadVars();
_root.scroller.loadText.load("EQUIPA.txt");
_root.scroller.loadText.onLoad = function() {
_root.scroller.text = this.TEXTO;
};
}
i know this second part is wrong, but its the best i could do :S
how do i make it unload the preview text, and load a new one when the bg finishes the intro animation (gets to the midframe)?
http://cosmos.oninetspeed.pt/pantas/main.fla - for the main file
or
http://cosmos.oninetspeed.pt/pantas/ - to view the site
thanks in advance for any post!
View Replies !
View Related
LoadMovie-Loading To Specific Frame?
I am desperatly new to all of this, so try not to laugh too hard. I am sure when I get an answer I will feel even more foolish than I do posting the question, but here goes.
I have a page with an empty movie clip that is my target for loading many other external swf files. As recomended elswhere in the newbie forum I am doing this in place of one big swf file with many scenes.
My question is: is there an action script that will load a swf file and immediatly play from a specific frame.
For example my main nav page has an intro that I would like to skip when someone returns there from a subsequent page. I also have a demo reel with 3 tv spots on it and I would like to present people with the option of going to a specific tv spot.
I have tried:
on (release) {_root.MyMovieHolder.loadMovie("MyMovie.swf","MyScene","MyFrame");
}
and other variations, but the loaded movie always plays from frame one.
I have done a bit of searching through the forums and tuts with no result. I can only assume it is too simple a question.
Any help would be appreciated.
B.
View Replies !
View Related
Loading A SWF File To A Specific Frame Label
Hiya...
I have a cd project, with a main SWF movie, that loads multiple SWF files from a navigation bar, as the user interacts with it. I'm using Flash MX...
I need to load a SWF file, and have the movie go to a specific Frame Label in the file - ie, I want to load first.swf at the "FSF_Overview" frame label...
I know there is a way to do this using loadMovie and targets, but I dont know how to do it. Can anyone advise? Please help!
View Replies !
View Related
Loading A New Swf AND Moving To A Specific Named Frame.
I know how to load in a new swf file but what I haven't been able to figure out how to move the play head to a specific named frame.
The situation:
User is in swf#1.
User clicks button.
Swf#2 replaces swf#1 AND playhead moves to named frame.
Is it possible to pass a variable from swf#1 to swf#2 before swapping them out so that onLoad code in swf#2 could check the variables value and determine where it needs to go?
View Replies !
View Related
Problem Loading Page Into A Specific Frame.
Hi there,
Scenario:
I want to use a swf file as the navigation tool in html, I decided to use a frameset. but I can't get the Flash buttons work as planned.
Here is the code in the swf wich is loaded in the top frame (topFrame)
The button should open the page in the main frame but instead it opens in a new window. ?????
//**************************************************
//**************************************************
function gotoSHOP(event:MouseEvent):void
{
var request:URLRequest = new URLRequest("shop.html");
navigateToURL(request, "mainFrame");
}
mcShop.addEventListener(MouseEvent.CLICK,gotoSHOP) ;
Please help.
View Replies !
View Related
Loading Specific Frame Of External .swf File
Hello!
I am attempting to load the same .swf file into three different scenes of my movie. The external .swf has three frames, and in each of the three scenes, it will need to stop on a different frame. I am loading the .swf into an empty movie clip by referencing the movie clip's instance name. I am using actionscript 2.0 and working in Flash CS3 -- but due to some other script I am using, the file is saved out as Flash 8.
Thanks in advance for your help!
View Replies !
View Related
Loading Swf And Targeting Specific Frame Action...
Hi,
I have successfully (after much trial and error) been able to target an externally loaded swf file into and empty movie clip AND target a specific frame in that clip. The problem is is that I am trying to make a an animation go in and out of the frame of the movie seemlessly. The external swf file (lets call it drop.swf) I have made is a box that drops down, stops, and when another button is hit, it retracts back up. IT works fine for one button, but when another button is hit and that swf file is on the "down" frame in dropo.swf, it doesn't play from that specified frame, it seems like it has quickly reloaded the entire drop.swf file again and THEN plays the frame in which I instructed to play from. The result is that the is a blank hiccup in the animation instead of a seemless transition. Does this make sense???
HELPPP!
thanks,
thebestlee
View Replies !
View Related
|