Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Flash Mx ?

Flash Mx ?
Thread Tools
davidott
Fresh-Faced Recruit
Join Date: Jul 2004
Location: chicago
Status: Offline
Reply With Quote
Aug 10, 2004, 01:05 PM
 
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!
     
derbs
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Aug 11, 2004, 07:13 AM
 
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.
     
ameat
Dedicated MacNNer
Join Date: Feb 2001
Location: Manhattan
Status: Offline
Reply With Quote
Aug 11, 2004, 08:43 AM
 
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...
     
davidott  (op)
Fresh-Faced Recruit
Join Date: Jul 2004
Location: chicago
Status: Offline
Reply With Quote
Aug 11, 2004, 08:50 AM
 
Thank you both very much for the replies, I will try these methoda out today.
     
davidott  (op)
Fresh-Faced Recruit
Join Date: Jul 2004
Location: chicago
Status: Offline
Reply With Quote
Aug 11, 2004, 03:09 PM
 
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 Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:06 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,