PDA

View Full Version : Please Help! -- dynamic links and button states --


dotkrawler
04-11-2004, 05:29 AM
It seems like I'm really close to this, but I can't figure out my problem...

I've attached my file for any who can help...

OK, I made a movieClip that contains some buttons. This movieClip is to act like a multiple state button, witch it does. Then I wanted to use a few instances of that clip as buttons that would link to a few outside pages. However, if I simply put an on(press) action to the movieClip instance, that the buttons inside the clip no longer work, but I did find a way around that by using a function in the root timeline.

I want this function to determine which Clip is pressed and get a URL based off of witch Clip is selected.

So, in order to know which Clip is being selected I made a variable "selected".
(which is traced, so you can see that it is being set properly)

Now, here's the kicker, it seems that it works, but only after the Clip has either been selected twice, or is selected once, then a different Clip selected.

It seems to be delayed???? Always falling one click behind, even though when I trace the "selected" variable it's always correct.

FYI while looking at the scripts, button01_mc should open a new window with image.html , and button02_mc should open a new window with image2.html. And if you can help me get the script right, each numbered button should open a corresponding image.html.

Thanks for taking the time to lend your thoughts on this....

dotkrawler
04-11-2004, 05:30 AM
Sorry, here's the file...

Ruben
04-11-2004, 08:00 PM
Sorry, you're being a bit unclear [in my opinion at least ;)]...

Just explain what your goal is, how you've tried to do this and what you know went wrong...

- Ruben

dotkrawler
04-11-2004, 08:42 PM
Crap! unclear? really? I was trying to be as clear as possible, too much I guess.

My goal is to make a set of buttons for my portfolio section that does:
- Keeps track of the current, visited, & unvisited buttons
- onPress gets URL
- onOver loads an image into a target_mc

I did my best explanation above.

I don't know what went wrong.

:o

Ruben
04-12-2004, 08:16 AM
Alrighty then, check the attachement... If you need some explanation or anything, just scream like your mama is forcing you to wear her panty's, right??

Cheers - Ruben

dotkrawler
04-12-2004, 02:48 PM
Hey thanks for your help thus far, this script works fine, but there is one more thing I need it to accomplish. Each button has to trigger it's own unique URL link on press and on over.

Accomplishing this is where I got stuck on my attempts.

Thanks again...

dotkrawler
04-12-2004, 03:07 PM
Ahhhhhhh! Phuck It All!!!!

I figured it out, stupid ****...

In my first post I mentioned that it seemed to be a "click" behind,

So instead of triggering the script on mouseDown , I used mouseRelease and it cured the delay problem.

thanks anyway, I appreciate you taking the time to help.

CyanBlue
04-12-2004, 03:27 PM
Please watch out for what you type here...

Just because you didn't use four letter words, that doesn't meant that you can say whatever you want to say... We have children in the forum as well...

Consider this as a friendly advice, and don't make that happen again...

Ruben
04-12-2004, 03:36 PM
CyanBlue: :eek: Might take that advice myself ;) Though it WAS the first line of a REALLY GREAT song...:p [Slipknot - Surfacing]

Dotkrawler: I don't know what you're talking about...Why make things all difficult and stuff...Just goto the script-layer inside of the buttonClip and add this little piece of code with the onRelease or onPress function:

if (id == 0){
getURL ("page0.html");
}else if (id == 1){
getURL ("page1.html");
}else if (id == 2){
getURL ("page2.html");
}
// etc etc etc


Cheers ;) - Ruben