Link to home
Start Free TrialLog in
Avatar of crazycharlie
crazycharlie

asked on

Changing Movieclip frames from HTML

I'd like to be able to control which frame my movie clip is on based on the onmouseover and onmouseout functions of an href. Can this be done?

Thank you.

Ch@rlie
ASKER CERTIFIED SOLUTION
Avatar of negatyve
negatyve

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of crazycharlie
crazycharlie

ASKER

I have the id and name attributes set on the object and embed tags (id="targetMovie", name="targetMovie") and have the javascript called from an external .js file.  The javascript looks like this:

function FlashMethod(clip, frame)
{
     var IE = navigator.appName.indexOf("Microsoft") != -1;
     var movie = IE ? window.targetMovie : window.document.targetMovie;
     movie.TGotoFrame(clip, frame - 1);
}

This is what I have in the HTML portion:

<a href="javascript: void(0);" onmouseover="FlashMethod('_root.MovieClip','2');" onmouseout="FlashMethod('_root.MovieClip','1');" onfocus="this.blur();"><img src="../../images/information.gif" alt="Definition" width="12" height="12" border="0" /></a>

I don't get any errors, but for some reason, it's not incrementing the .swf.

Ch@rlie
Actually, I just figured it out.  Since I'm only progressing the frames in _root, that's what I used for the clip variable call.

Thank you!

Ch@rlie
negatyve,

This isn't working in IE on the Mac.  Do you know of a workaround for that?

Thanks.

Ch@rlie
>Since I'm only progressing the frames in _root, that's what I used for the clip variable call.

perfect!

>This isn't working in IE on the Mac.  Do you know of a workaround for that?

actually, nothing. it's a known and unsolved issue: http://www.macromedia.com/support/flash/ts/documents/browser_support_matrix.htm
Okay.. I thought it might have been, but wanted to be sure anyway.

I appreciate all the help and quick responses.

All the best,

Ch@rlie
>All the best,

to you..

cheers!

nega