I’m having a slight hiccup in trying to make a Flash Presentation.
I created a button that would go to a new movie-clip (a separate swf file) once its released. BUT I want the button to go to frame 23 of the swf file, rather than start from frame 1. Is it possible for the button to activate the swf file from the middle of the movie?
Can someone provide me with the action script (your approximation) for what I want to acheive? pretty please?
Thanks to Sput for replying to my post. I tried out your script, as well as several variations to it. Didn’t work…
I believe it ws partially my mistake… The button I created is supposed to go to a separate swf file ONLY. No extra levels involved or anthing. There is no movie clip or such involved. So far I have tried out the following scripts to get my buttons to linking swf files…
on (release) {
getURL(“typaface.swf”);
}
on (release) {
loadMovieNum(“typaface.swf”, 0);
}
But both these scripts send the button link into the FIRST frame of the swf file I am loading. Any ideas on how to send it to frame 23? Anyone? please?
do you have access to php or any other kind of serverside script? it can be done with javascript too, but its easier with php or something like that I think, but what you can do is load in the new swf in a new HTML page, then in that page append the frame to go to in the swf declaration as a query string and just have a command in the first line of the swf goto and play that frame number.
… of course it might be just as easy to have a seperate HTML for each frame you need to go to if there arent many… that will save the confusing php/js stuff.
Thank you to all the people here for replying. A VERY special thanks to Sput (again) and Senocular (interesting nick). I really thought that script you sent over would do the trick… Or even some variation of the script you sent over
The postings have gone on a unfortunately strange tangent.
There are NO movie clips involved in this button linking process. The basic thing is that I want to the button located in ‘filea.swf’ to lead the viewer straight to frame 23 of ‘fileb.swf’. Just open the URL of a separate SWF file and goto frame (23).
Just a two step thing that I need to combine somehow…
Open URL “fileb.swf”
gotoandStop (23)
A button that will (upon release) switch the window from “filea.swf” to frame 23 of “fileb.swf”
I KNOW there is a simple command for this SOMEWHERE, but I have been unable to find it.
Oh yeah, and with regards to Senocular… And I’m making a Flash based presentation (to be loaded onto a CD later). Its unlikely that this project of mine will ever be loaded onto the Internet (its just too BIG). Therefore I will not be transferring anything onto html or such. Just keeping everything pure swf.
Is there anyone who knows how to do this?
Thanks in advance
*Originally posted by Sabrina *
**The button I created is supposed to go to a separate swf file ONLY. No extra levels involved or anthing. There is no movie clip or such involved. **
Then you need levels or another movieclip.
The way you’ve been describing it before is a seperate web page with the new swf - if you want to load a new swf into the current player (such as a projector) then you have to deal with either a movieclip to load it into or a level. Replacing the current level completely (level 0) will also replace (delete) all variables therein, so you wouldnt be able to specify a frame and have it carry over.
What you can do, and what Ive done in the past is have a base ‘loader’ swf which you start out with. Essensially this is an empty swf that is just a place holder for storing variables and loading other movies in on different levels (not 0). These can all go in the same level replacing each other, but not in 0 because thats where this base swf lives maintianing constants and variables from which those movies will use to reference. Then, when you load a new movie, you have a set of commands to use whatever varaibles you need in level 0 such as a goto frame to do whatever you need to do.
start.swf may contain only one line. loadMovieNum(“first movie.swf”,1);
since its the movie starting in the projector, its loaded in level 0. That one line loads the first movie (the main movie) into level 1. This movie is the movie which you might do whatever it is youd usually do and things such as… load the second movie. This Ill say is the movie you’d want to load and have play at frame 23. So what you might have in that main swf is something like _level0.gotoframe = 23;
loadMovieNum(“second movie.swf”,1);
which 1) sets a variable in level 0 (our initial start.swf that is basically nothing) and b) loads the second movie in level 1 replacing the current movie first movie.swf with the second one. Now since you are using level 1 for your movies, level 0 remains constant and that gotoframe variable remains when the second movie replaces the original. Then, the second movie in its first frame can have gotoAndStop(_level0.gotoframe)
which will grab that variable from level 0 and go to it. In the above example of loading the second movie, you can see that _level0.gotoframe was set to be 23, so the second movie would go to frame 23. You can set this variable from any movie to load anyother movie with that goto line in it and have it play that frame.
The Fla files contain little notes about the effect and result I want to acheive. I hope this clarifies my problem. Even more than that, I hope that there’s someone here who knows the SOLUTION to my problem.
sorry sabrina…actually don’t have a clue how to do that…if you want me to show you how to make it in the same flash movie though, then I can show you!(not loading in _blank - loading the new swf in the first movie)
Hope someone else can help you!
/sput
Creating engaging and entertaining content for designers and developers since 1998.