Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mc question 3

Status
Not open for further replies.

disfasia

Programmer
Apr 20, 2001
378
CA
I have finally fixed some of the problems in this site:


However, there remain a few still. One of them, you might notice immediately is that the mc which comes up upon rollover disappears when the button is hit and a window unscrolls. I have tried many different stunts to remedy this and still nothing happens. I actually would think that loading the mc onto a separate level would do the trick, but I do not know how to do this.

The .fla is at:


Also, any other criticism you might have is greatly appreciated. I am trying to learn Flash (properly) and though I have designed many sites, I still have so much to learn.

Thanks in advance to any help and thanks to all who have guided me so far!

Regards,
 
I think your probelm, (if you want to call it a problem) is coming from the fact you have everything in one fla.

maybe you should try putting your MC1 clip in a differnt flas and call in its swf using loadmovie.

on (release)
loadMovie ("mc1.swf", "blankclip");
}

it's tricky to get everthing alaigned right but it should load the swf into an empty target named "blankclip" on top or under your button.

hope this helps, keep playing around with it.

you'll get.

good job.

jef
 
Haven't looked at your last .fla for your button problem,
but this would take care of your overlapping soundtracks:


And Wangbar, if you read this, I did use the associative array bit rather than eval() to switch off the currently playing track when another button is pressed:

on (press) {
if (current_level == 6) {
stop ();
} else {
_root["_level"+current_level].gotoAndStop(1);
_level6.gotoAndPlay(5);
current_level = 6;
}
}

Regards,
wink4.gif
ldnewbie
 
Thanks Jef and Oldnewbie!

One question more, however: how do i load the swf with a specific frame in mind (for instance, the second frame) using the parameters you laid down above, Jef?

on (release)
  loadMovie ("mc1.swf", "blankclip");
}

Thanks again!
 
Just add: (change for your .swf, level(9) & frame(99))

on (release)
loadMovie ("mc1.swf", "blankclip");
_level9.gotoAndStop(99);
}

It should work...(if you know the level of the movie)





Have Fun...

Sharky99 >:):O>
 
Yeah Old, I was playing around with it last night and discovered the same thing - I was going to post it this morning!

Basically the array notation stands in for dot notation - thats why the things you tried earlier didn't work because it was the same as trying...

_level.5

But, since _root is referencing the main timeline from the current movie...

_root["_level1"]=_level1

Which has given me an idea.... back later.
 
Didn't work...

Had a sudden thought that "[]" notation might work faster than "." (bearing in mind that we know "/" does).

It's the same speed however, and this surprised me, this notation:

_root["menu"]._x=100

is consistently about 200ms faster per 20000 iterations than:

_root[menu]._x=100

Weird huh?
 
Oldnewbie,

Thanks for the help! I actually had trouble with the script and then I figured out something that was actually much easier. For each button I wrote:

on (press) {
stopAllSounds ();
_level3.gotoAndPlay(2);
}
 
sharky,

thanks for the tip...the only problem is that i am having great difficulty with this script...and why the number 99?

thanks and regards,
 
I have a new problem related to another site (an older site). This site was working perfectly, until I decided to put a preloader on it. I only added the preload scene and it loads the film properly. Then when I go to a button which is scripted...

on (release) {
_root.gotoAndStop(2);
loadMovie ("prg.swf", "emptymc");
}

...the screen goes blank. Why is this and what can I do to fix it?

Regards,
 
Probably goes to frame 2 of the main timeline and stops!
What's on frame 2 of the main timeline?

Regards,
wink4.gif
ldnewbie
 
Hello disfasia,

I've just done some tests with a movie I made and I think your problem is the "_root". I think you don't need it here. just try:

on (release) {
gotoAndStop(2);
loadMovie ("prg.swf", "emptymc");
}
If this doesn't solve your problem I guess the problem is in the movieclip that is being loaded.

regards, goaganesha
 
goaganesha,

your theory is correct. however, i am now having a problem with the base of my move: i have one keyframe with the page with info, the second keyframe with a blank space onto which other flas are called. the problem is that when i call them, now they show up bu the first and second frames are combined...the fla is at


I have fiddled with this to death and am now surrendering to the mercy of the deities...

any help with this is greatly appreciated! What a conundrum!
 
I thought it'd be easier to understand here it is again


on (release)
loadMovie ("mc1.swf", "blankclip");
_level9.gotoAndStop(99);
}


you just have to change you movie name "mc1.swf" the level

_level9 and the 99 which is the target frame...

Have Fun...

Sharky99 >:):O>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top