Flash gurus: couple questions

I am designing (or attempting to, anyway) a Flash website, and keep running into problems with the programming side of things. Couple questions:

1> how in the world do you set up a “loading” screen to pre-load the site? I’ve never found a tutorial that covers this, and you’d think it would be one of the most common questions. :stuck_out_tongue:

2> I’m setting up a sub-navigation which consists of a series of scrolling buttons within a movie clip symbol. But how do I get the buttons to affect things on the main timeline instead of its own?

3> Corollary to that: is there anyway to make a button which loads a specific movie clip symbol into the main movie in a specific location on the stage? Or am I better off simply having it move to a frame on the main timeline with the movie clip already in place?

www.autumneve.com/gallery/ if you need to look at what I’ve done so far.

TIA.

Hello - first what version of flash are you using?

The following is for flash 5 or MX.

1.)
A preloader for a flash movie is quite easy - if you are not using load movie to load external clips, sounds & jpegs (Flash MX).

Create your preloader movie clip an put it in the time line in the first frame.

In the first frame - as an action type:
stop();

As a action on the preloader movie clip.

onClipEvent (enterFrame) {
if (_root._framesloaded==_root._totalframes) {
_root.play();
}
}

2.) Your main timeline is _root, _level0 (if you are loading movies into other levels) or _parent - if the movie clip is inside of the main timeline.

To get to main time line to stop with one button
attach the action
on (release) {
_root.stop();
}

To restart the movie the action on the button would be

on (release) {
_root.play();
}

3.)
Depending on the version of Flash you are using - the answer is different.

Place the object in the time line & simply hide or show it depending on your need.

in MX or 5 - one of the easier ways of doing this is to attach the action to the movie clip to hide it. (give the object a variable name - so you can affect it - for example lets say it is named frank).

onClipEvent (load) {
this._visible=false;
}

on the button you wish to use to see the clip add the action

on (press) {
frank._visible=false;
frank._x=100;
frank._y=200;

}

One of the best ways to learn flash is by looking at other peoples files.

Check out flash kit ( http://www.flashkit.com )

Download the source files from other people and learn from those.
Good luck.

Sorry, I realized after I was in bed last night that I forgot to mention which Flash I’m using… it is Flash 5.

Thank you. This helps a lot. Do you know of any other Flash tutorial sites? Flashkit is where I got the scrolling buttons.

No prob,

The main resource I use is newsgroups news:macromedia.flash & news:macromedia.flash.actionscript

You can access them via http://groups.google.ca/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&group=macromedia.flash

Also check out: http://www.actionscripts.org/tutorials.shtml

This page also has a few good samples:

http://actionscript-toolbox.com/examples.php

The macromedia site also has quite a few good tutorials & samples in the support section.
http://www.macromedia.com/support/flash/tutorial_index.html

I hate programming.

I am having problems with it now. I have a subnavigation movie clip within the main movie that has a series of thumbnail buttons. In order for the buttons to call up the appropriate page/frame within the main movie, I’ve used this as the object action:

on (release) {
_root.gotoAndStop(4);
}

This all works fine EXCEPT when someone clicks a button which takes you to a previous frame – e.g. if you’re looking at frame 15, and click the button to go to frame 10. In that case, a shutter-click sound accompanies the move to the new frame, even though said shutter-click is in no way associated with either the button or either frame in the main movie.

The shutter-click is ONLY associated with the first frame of the pre-load movie clip, which exists only in the first frame of the main movie. This movie clip has the following object action on it:

onClipEvent (enterFrame) {
if (_root._framesloaded==_root._totalframes) {
_root.play();
}
}

And I can’t for the life of me figure out how the sound is jumping from one sub-clip to the other. And it ONLY happens when backing up through the main timeline – if you clicked through from frame 10 to frame 15, the sound isn’t there. Removing the sound completely works, but I’d rather not do that.

Any ideas? The shutter-click on the pre-load is nice, but more than once is bloody annoying. How can I get it to stop?