PDA

View Full Version : syntax help



vader
November 11th, 2003, 05:46 AM
what is the syntax of targeting a scene from one swf to another?
lets say i have a 2 swf file and i want to target a scene frm the second swf file named "games". tnx

blah-de-blah
November 11th, 2003, 05:49 AM
There isn't :-\ You'd havta use if statements on the new swf to determine the scene. This all depends on what you want to do..

vader
November 11th, 2003, 05:56 AM
ic. tnx for the reply.

blah-de-blah
November 11th, 2003, 05:56 AM
If you're still stuck i can help you on it :)

vader
November 11th, 2003, 06:05 AM
ok. tnx coz i really need to link this swf to a scene in another swf file. is there another way aside from using if statement?

blah-de-blah
November 11th, 2003, 06:15 AM
ok well why do you need it to go to another scene firstly??

pom
November 11th, 2003, 06:15 AM
Frame labels are better than scenes...
yourClipInWhichYouLoadTheSwf.gotoAndPlay("theLabel") ;

vader
November 11th, 2003, 06:21 AM
coz i have a main page for my games that is located on a scene in the first swf and the games itself that is residing on another swf. i need to link the games to the main game page, that's why i need to know the syntax. coz that is what i wrote in my flowchart.

blah-de-blah
November 11th, 2003, 06:33 AM
Oh this is school work i'm assuming :-\

Yea frame labels are better, but if you want to do that, on the first frame of the first scene in the new SWF, put:

_root.gotoAndPlay ("sceneName", 1)

I'm still confused about why you want to do this but it is your thing...

vader
November 11th, 2003, 06:39 AM
yah, school work. hehe. tnx for the help dude. appreciate it so much,

vader
November 12th, 2003, 06:14 AM
elo! it's me again. what i did is put this action on the first frame of the first swf which has a name of "index.swf".

loadMovieNum ("games.swf", 1)

and then put this code

_visible = false;

on the first frame of the games.swf

then on the movie index.swf i put a button that will make the loaded movie visible. it worked on the first time you click the button but on the second time the movie doesnt load anymore, by the way the code on the button is

on (release) {

unloadMovieNum(0);
_level1._visible = true;
}


is there a problem in my code??? tnx

blah-de-blah
November 12th, 2003, 06:18 AM
try:


on (release) {
_root.createEmptyMovieClip ("newMC", 1)
newMC.loadMovie ("games.swf")
}


because you want it to load on the click of a button right??

vader
November 12th, 2003, 06:22 AM
yes i want to load it using a button, and i also want the current movie loaded on level 0 to be unloaded that's whay i am loading games.swf on level 0 also. is it possible to load a new movie on a level that already contain a movie? tnx

blah-de-blah
November 12th, 2003, 06:25 AM
Does the code i gave you work?? i never tried it, but anyways if you want to unload it...try:

newMC.unloadMovie ("games.swf")

that should work i think...

vader
November 12th, 2003, 06:27 AM
i'll try it when i get home. tnx dude

vader
November 18th, 2003, 02:17 PM
ei! it work fine dude but i have another question, what is the syntax if lets say i only what to print a certain portion of my swf movie, lets say the i only want to print the canvas of a drawing application?

blah-de-blah
November 19th, 2003, 03:03 AM
print as in make it go on paper???? i'm not sure but if everything fails just printscreen it...:)

vader
November 19th, 2003, 12:54 PM
yep! dude! as in hard copy. is there an action script command for print that can calculate the print area of the movie?

blah-de-blah
November 20th, 2003, 07:37 AM
well i've never printed anything from flash, but i'm pretty sure theres not print command for AS :-\