HELP!HELP! I'M STUCK! How do I link a rollover?

HTML Comments are not allowed

Sorry… but your post didn’t go through. I’m not sure why… if you have to post html in your post, click on the box below your reply field which says “allow html”

as for linking a rollOver in Flash, which is what I’m assuming your doing.

on(rollOver){
getUrl();
}

or

on(rollOver){
gotoAndPlay();
}

both work fine.

Thank you for your prompt reply and sorry for the flub-up on the first posting… n-e-way…

** You can view the site at: http://ns1.medisolutionusa.com

** Here’s the problem: There are 4 png’s on the home page that increase in size as you “rollover” them. This means they already have an action (on rollover).

** Here’s the question: How do I get the png to link to a page within my site.

I know this sounds simple but I have already tried serveral different variations of the “getURL” action. I have been unsuccessuful and as a result am at my wits end.

** Here’s the code I’m trying to manipulate:

on (rollOver) {
for (i=1; i<5; i++) {
setProperty (’_root.nav.nav’+i, _xscale, 100);
setProperty (’_root.nav.nav’+i, _yscale, 100);
}
setProperty (_root.nav.nav1, _yscale, 225);
setProperty (_root.nav.nav1, _xscale, 225);
tellTarget ("…/") {
gotoAndPlay (“01on”); '//this calls another adjoining png.
}
gotoAndPlay (“press”); '// this resets the movie at frame 1.

Not sure where to fix the problem at: There are several layers and several pics…

Thanks,

John F.

These png’s I take it are inside an swf, otherwise you wouldn’t be able to use action script… so I guess my question now is… are you using Frames in your HTML pages?

ie. is this a situation where you have a navigation section made out of an swf file, and it changes things in a main frame?

I’ll do my best to answer your question.

Here’s the set-up:

I have a .swf file and the 4 rollovers are in it. Those are the one’s that I need to link to a page within my site.

Does that help?

If you need we can go to messenger and I can cut and past my code in the windows for you. Or even better have you ever used WebEx? I can share my desktop with you… If you are nice.

??? Let me know ???

Thanks,

John F.

that sounds like a come on. :wink:

So you aren’t using frames. So, when you do have the getUrl take place, it actually replaces the page your on with a new one…

ok… let me think on this for a sec… I’ll get right back to you.

I have some problems with this code. This is obviously on a button, as you can only use on(rollOver) on a button.

on (rollOver) {
for (i=1; i<5; i++) {
setProperty (’_root.nav.nav’+i, _xscale, 100);
setProperty (’_root.nav.nav’+i, _yscale, 100);
}
setProperty (_root.nav.nav1, _yscale, 225);
setProperty (_root.nav.nav1, _xscale, 225);
tellTarget ("…/") {
gotoAndPlay (“01on”); '//this calls another adjoining png.
}
gotoAndPlay (“press”); '// this resets the movie at frame 1.

A) you have your second set of “setProperty” statements, outside of the curly brackets for the “on(rollOver)” statement. This SHOULD give you an error when you try to run it. Does it?

B) what is this “tellTarget(”…/")" supposed to do?

C) if you’re linking to another page, this page with the swf will disapear. What is the point of reseting the movie at frame 1 if it’s not going to be there as soon as the url of the page changes?

Let me know about these three questions and then I should have some answers for you.

A) Actually, they’re outside the for {}, but inside the on (rollOver) {}. There are }} missing at the end of the code.

B) Isn’t that some sort of F4 Actionscript. Should be equivalent to _parent. (???).

pom 0]

From my limited knowledge, I believe / refers to _root. Its used to target the same thing. Also, why are you using SetProperty…try dot-syntax…its much easier…life has become easier for me since I embraced the “dot-syde”

instead of

setproperty(/target, _alpha, 50)

try:

_root.target._alpha = 50

the script gets much cleaner if you don’t have all that unecessary @#%$ lying around…

Yes, Zona, come and join us on the dot-syde mwahaahaa.

  1. Much cleaner
  2. setProperty is F4 syntax and F6 has just come out…

pom 0]

so why are you running a for loop? why haven’t you declared what ‘i’ is equal to? you have closed the loop to early that’s why your getting errors. the loop can’t finish itself because the setProperty is outside of it.

not having much to do with this topic, but
when it says ‘HTML Comments are not Allowed’, its not talking about regular html, its talking about <!-- and --> . So as long as you dont use those, you are fine.

depends upon the tag you use… I think if you put something like

<font></font>

in your post it wont work either.

hmm… just looked at it and I guess it does work. Either way those html’s are tricky…:slight_smile: