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!

CHANGING SCENES 1

Status
Not open for further replies.

cdnflash

Programmer
Jan 19, 2002
9
CA
HI,

I am relatively new to FLASH, but am learning quickly!

I am stuck! I am trying to jump from one scene to another through a "mouse event".

Here is what I want to do:

I have four buttons that animate to a position across the top of the movie. And a "screen" like a monitor is below them. I have an animation that occurs on this screen in my main scene. I want to be able to click a button up top, and have the screen display a new animation. I want to do this rather than simply change URLs.
Is a change of scenes in a mouse event the best way to do this? Maybe I should be at this a totally different way.

Here is what I did that got me stuck:

I made the main timeline, and partway through it, I put a graphic that animates for the button. Then, into the "edit in place" section for that graphic, I made the graphic for the button ZOOM out from micro-size. I made it a "button symbol" on the last of ten frames in that "edit in place section". Here is where I am trying to make the mouse event go to a specific scene, where I will have the animation that coincides with this button, which is displayed below the button, appear in the "monitor" graphic.

I am trying to put each button's activated animation, that appears in the lower "monitor" graphic, in a scene. Maybe this is the wrong way to do what I am seeking.

I have a little animation that changes the appearance of the button itself, in the MOUSE OVER section. However, outside of that series of UP-OVER-DOWN-HIT frames is where I am trying to put the scene change with a:

on (release) {
gotandplay ("profile", 1);
}

PROFILE is the name of the scene I wish to go to.

The next scene has the identical placement of the buttons and the "monitor" graphic. So I am hoping that a change of scenes will allow a smooth insertion of the particular button's information.

cdnflash !
 
A picture is worth a thousand words at least!
Post a link to your .fla, or e-mail it to me.
For address hit handle above.

You can allways righ-click your button on stage (not in edit mode), and select actions. This will bring up the Object Actions window where you should be adding the script for your button.

Regards,
new.gif
 
A lot to be corrected in your .fla.
First your preloader... The ifFrameLoaded action is deprecated in Flash 5, you should be using something like:

if (_root.getBytesLoaded >= _root.getBytesTotal) {
gotoAndPlay ("Scene 1", 1);
}

Your buttons are problematic in two ways. First you at least have one another button inside the profile button inside the movie clip. The first one is enough, and since it's inside a movie clip, to target a scene on the main timeline it should be scripted as follows:

on (press) {
_root.gotoAndPlay ("profile");
}

profile is the frame label of the first frame of your profile scene.

You should also start using an actions only layer in all your clips and main movie. It makes for better clarity!

If you want me to send you a corrected .fla, send me all the font files you've used, because since I don't have them, the display is screwed, because Flash defaults to the closest font type I have.

Regards,
new.gif
 
Wow! Thanks a million. I will go at it again probably Monday. I will get back to you if necessary. Thanks so much!

cdnflash
 
Can anyone tell me why PC's would pick the work up that has been made so far without a problem, and why a MAC would not. The man I am making this for claims his MAC computer will not load it all. And a friend of his checked it with another MAC and found the same thing occur. Yet when I emailed him the files, it worked fine. Any ideas?

thanks!

Cdnflash
 
Macs! Can live with them! Can live without them!

Can't really say... too many variables!

You mean check this on the web?
Maybe depends on what browser they're using or even your html. Can you get that info?

Maybe some cats (to my knowledge, very few!) that run Macs like PBB, can check it out also, to see what they get!

Regards,
new.gif
 
But for that, you'd have to post a link to this site!
I've got it through your e-mail, but will refrain from posting it without your permission!

Regards,
new.gif
 
You do have only 3 buttons as of now, right? Didn't you use to have 4?
And 1 other thing, you're preloader doesn't seem to be working properly. Maybe you should send me your current .fla!

Also checked your html! Could be that the table you have outside the <html> & </html> could possibly be screwing things up!

And what about your folks trying a direct link to the movie as: , do they then get to see something? If so, that may point the finger to your html!

Reagrds,
new.gif
 
Hi oldnewbie,

I thought perhaps the preloader command you gave me was the problem, so I reverted back to the old one, since the thng loaded great before I made these major changes.

But there are only three buttons for now, since I am still working on the entire thing and was going to do the fourth later.

Hey! I will try removing the table and see what happens!

And will send you the file again!
 
HeHeHe!
Why would I give bad suggestions! ;-)
My _root.getBytesLoaded thing should work fine.

As I said, although it will still work, the ifFrameLoaded action is deprecated in Flash 5...
Maybe the reason I noticed it wasn't working properly, is the fact that with a cleared cache, if you hit the second & third buttons, right when they're available, they won't show up immediately, indicating that they haven't loaded yet and still are!
Maybe you're still conditioning the playing of the movie, on the fact that the Profile scene is loadded, while the others aren't yet.
If you keep the ifFrameLoaded action, you should set it's parameters to the last frame of the last scene, so that the movie only plays when it's all loaded.

Regards,
new.gif
 
I should have said the preloader change would not work with the MAC babies. haha. Sorry for the confusion.
 
This is the script you should be using on your frame 20:

// if (_root._framesloaded>=_root._totalframes) {
// Use the above or the following...
if (_root.getBytesLoaded()>=_root.getBytesTotal()) {
play ();
} else {
gotoAndPlay (1);
}

You should also put it on your actions layer, since you have one, rather than on the loading tween.
You'll have to add 2 keyframes on frames 20 & 21 (select frame 20 and press F6 twice), and copy & paste the above script on frame 20. Frame 21 should remain a blank keyframe.

The script (below) you now have on the loading tween is definately not working especially because of that gotoAndPlay(a);
What's that (a), anyways?

ifFrameLoaded (695) {
gotoAndPlay (21);
}
gotoAndPlay (a);

And that's got nothing to do with the Mac problem!

Furthermore, the way you have this set up, you will allways get a flash frame of the loading text on subsequents visits to the site after the first one.
The way to eliminate that flash frame is to start off with the same script on a first blank frame. Drag both first frames of your loading tween layers to frame 2. Add two keyframes on frames 1 & 2 of your actions layer, and add this script to frame 1 of the actions layer:

// if (_root._framesloaded>=_root._totalframes) {
// Use the above or the following...
if (_root.getBytesLoaded()>=_root.getBytesTotal()) {
gotoAndPlay (21);
}

NO ELSE, in this case.

Regards,
new.gif
 
Wow! This is Great! I don't know why I did that (a) ... hmmmmm... I don't know WHEN I did it. ;-)

Thanks again!
 
I learned that the MAC dialup through AOL is the problem. The flash I made works. No doubt about it. But it seems that the MAC system coupled with AOL has some limits. And to be able to appeal to the majority of the people connecting online, I seem to have to be able to form the flash so that even these limited connections can see it all.

So my question is, what guidelines does anybody know about as to how far to go with FLASH to accomodate the mass market?
 
IMHO...
Mac is problem #1. (Sorry Pat!)
AOL is problem #2.
Mac with IE is problem #3.

Since AOL is actually a modified IE browser, I'll let you imagine the results of this mixture!

Just installed the free 3 months trial of the AOL browser & connection, on my PC, to test your movie.
My screen resolution is set to 1024*768 and your movie loads and looks fine!
I wouldn't know what it looks like at 800*600 or even at lower resolutions, and won't check it, because each time I change my screen resolution it f.... up my desktop, and I just hate that!

Now whether Mac users using the AOL browser on a dial-up represent a significant part of your targeted audience... That's for you to find out and confirm!

Possible workaround might be to suggest (on an entry page), that the site is best viewed at some specific resolution, with IE or NS, and that display problems may occur if using the AOL browser in combination with a Mac platform.

Regards,
new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top