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: