Confirmation of my stupidity. Please help me!

I have two .swf files: swf1 and swf2.

I am trying to get a button in swf 1 to load frame 5 in swf2.

Listing my attempts a coding what must be the simplest function in the world would crash your browser.

Anyone care to donate a reply to this needy flasher?

Thanks.

Im sure you’ll get help soon. Im sure you already know, but it is a load movie command with other junk Im sure. And I have confirmation of my own stupidity with how messed up that message was last night…I, for the life of me, still cannot figure out what frellin messed it up so badly–wierd. Chalk it up to stupidity–Anyways, welcome to Kirupa Quandry, glad to have ya here. Fun board!

pj
|I

lol… Why do people insist on calling that stupidity?? It’s ignorance… and there’s a lot more honor in that. Don’t be hard on yourselves over such a thing… no matter how frustrating it gets.

As for the question… I’m a little confused by your mixing of terminology.

Are you attempting to load swf2 into swf1, or do you have two swfs loaded into levels and you’re trying to have one tell the other what to do; or do you have two swfs embeded in separate code on an html document, and you want one of them to tell the other what to do?

I guess I approach it from the standpoint of ignorance being a blissful opportunity to learn more and I am far from blissful. I’ll plead ignorance rather than stupidity if the answer isn’t as obvious as it seems it should be (heh).

Rigel, thanks for the welcome.

upuat, i’ll try and clarify:

i have a buton in “first.swf” that, when clicked should load “second.swf”. These are currently two separate .swfs - 1 scene in each, located in the same directory.

that much is easy enough with “loadMovieNum (“second.swf”, 0);”

what I’m trying to figure out is how to load “second.swf” and have is start playing from a certain frame - say 5.

The end result will be a CD presentation.

After reading your post, it occurs to me that my problem could be the organization of my files (?)

I hope that’s clearer. If not let me know + i’ll try again.

Thanks!

you can’t put in the first frame of swf 2 a goto statement

gotoAndPlay(5);

??

Let me answer by giving you further information:

The first .swf is the main interface of the project = main.swf
After a brief intro sequence it ends with (among other links) a link to project 1 = proj1.swf.

Project 1 is a separate swf file because there are a lot of bitmapped images in it. After proj1.swf finishes it’s brief intro, there is a button that links back to the the Main interface (main.swf).

When the button is clicked in proj1.swf to return to main.swf, I need it to return to frame 5, which is main.swfs end state, by passing the introduction sequence.

I can’t put gotoAndPlay(5); in the first frame of main.swf because it is the first movie played and will jump to frame 5 on the first run, skipping the intro on the first time around…

Hence, the dilemma.

I’m beginning to think that chances are really good I’m doing something fundamentally wrong here in the set up of my project. Is there a better way to manage and cross-control separate swf files?

Thanks for sticking with me on this.

nope, I don’t think that you have any flaws…

you could try this. When you try to loadmovie command… try it with this syntax

loadMovie(“main.swfs?gotoVar=5”);

then in main.swf on frame 1, have an if statement that says

if(gotoVar==5){
gotoAndStop(gotoVar);
}

using a ?something=something at the end of the address you are calling with either getUrl, loadVariables, or loadMovie, will send that variable to the file that is being opened.

upuaut8.

i decided to create a couple of simpler fla’s and upload them for your download and review after attempting to use the code in your last post without success…

once i did, and reviewed the sample site online, it worked!!!

although i’m confused as to why this would be the case, my confusion is overwhelmed by my satisfaction and thanks for your efforts in helping me out with this problem!

i’ll leave the dir for anyone else w/ similar issues to save the hassle of our beating through the description:

home.teleport.com/~quadpod/thanks/

thank you ad infinitum upuaut8!!!

lol

I always forget to mention that. I do have an edited post around here somewhere on this subject. That only works online as it has to be a browser viewing the files on a server, for it to actually pass those variables to the new swf.

During creation and test phases, I usually have something in the first line of the first frame of the movie that I’m loading the variables into like so…

  • theVariableThatWillBeLoaded=whateverItEquals;*

This ensures that whatever is loading this movie, if it has called out to it with a ?=klfdshgklj those variables will be loaded, by this simple set variable statement.

Later, at upload time, I slash these out with comment tags like so.

  • //Comment tags delete anything that is to the right of them from swf production.*
  • //in this case the variable that I have loaded using a ?=something statement*
  • //in file name “blablabla.swf”*
  • //theVariableThatWillBeLoaded=whateverItEquals;*

now none of that will be in the swf. It doesn’t take any room in a produced peice, but, it does explain when you have the file open in Flash, what the code is for, and why it’s commented out.

Reusability is again the key. If I want to retool this FLA, I need to know that it’s getting some code from somewhere else.

Granted in this simple an example, you’re not likely to forget what’s going on… but imagine a site with 200 swfs and associated pics or html, or xml…
… as you go on you’ll need comment tags… use em now, cause they only help. :slight_smile: