|
|
Flash Mx ?
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2004
Location: chicago
Status:
Offline
|
|
I have 10 red dots in a horizontal line.
I make the 10 red dots into a movie clip that fades from 0% transparency to 100%
I then make each of the 10 red dots a button that goos to a different scene within the file.
When I publish the site, the 10 red dots fade in nicely and the individual red dots have the up, down, over affects that i assigned, BUT the buttons do not work. They do not "go to" and "stop" at the scene I specified.
Any ideas as to what I am doing wrong be great.
THANK YOU!
|
|
|
|
|
|
|
|
|
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status:
Offline
|
|
that's an annoying problem with flash, because the buttons are in a movieclip, they can't control where the main timeline goes to. You need to add a function on the main timeline.
On your main timeline, create a new empty layer and call it "actions". Then click on the keyframe and add this code:
function gotoHere(theScene,theFrame) {
gotoAndStop(theScene,theFrame);
}
and then in your buttons, instead of
on(release) {
gotoAndStop("scene1",1)
}
use this:
on(release) {
_root.gotoHere("scene1",1);
}
obviously change the "scene1" to the proper name of the scene you want to go to.
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Feb 2001
Location: Manhattan
Status:
Offline
|
|
using the method that derbs proposed is technically bad form; you would run into problems if importing your movie into another movie, as the scope of _root changes in different contexts.
since your buttons are nested in a movie clip (which should be assigned an instance name), the timeline that they immediately reference is that of the movie clips and not the main timeline of your movie.
if you're assing code directly onto the button, you should use:
Code:
on(press) {
_parent.gotoAndStop("scene_name");
}
or if you assign instance names to both the movie clip and each button, you could do something like this (which makes code management a lot easier):
Code:
movieClipName.buttonName.onRelease = function() {
_parent.gotoAndStop("scene_name");
};
you can then do all sorts of stuff to handle code generation, such as keeping the names and scene targets of each button in an array and then looping over it to assign the above code...
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2004
Location: chicago
Status:
Offline
|
|
Thank you both very much for the replies, I will try these methoda out today.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jul 2004
Location: chicago
Status:
Offline
|
|
anyone know what this entails.
i am trying to set up an FTP access point that will direct people enter a username and password in order to be granted access to the FTP server, where they can then upload and download files.
similar to the MJ@WORK link on this page:
http://www.murphyjahn.com/english/frameset_intro.htm
is this difficult to set up?
thanks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|