PDA

View Full Version : Actionscript/HTML


Wed-G
2008-04-10, 09:39 AM
I need flash help.

Making a website for my towns fire department and I'm making a flash splash screen. I need the enter button to proceed to the index page.

Any idea how I would do that? No matter how hard, I'd like to do it. I've seen it done before.

Lenny
2008-04-10, 09:40 AM
Which version of ActionScript are you using?

I only because ActionScript 3.0 doesn't support code beneath buttons, whilst ActionScript 2.0 does.

WetWired
2008-04-10, 10:53 AM
Why don't you just set the focus on a link to the index page in HTML?
<a id="thelink" href="index.php">Click here or press enter to continue</a>
<script type="text/javascript">
<--
document.getElementById('thelink').focus();
//-->
</script>

IE7 requires a click to accept keyboard input to a flash object, anyway, so just doing it with JS and HTML is a better solution.

Chruser
2008-04-10, 01:15 PM
getURL(url [, window [, "variables"]]) should be of some avail, e.g.:

on(release) {
getURL("www.zelaron.com", "_blank");
}

to open www.zelaron.com in a new window when clicking the relevant button(s).

onRelease=function(){ as the first line may be of some avail as well. I haven't touched AS2.0 in a while, and I never learnt AS3.0 properly.

Wed-G
2008-04-10, 01:24 PM
Why don't you just set the focus on a link to the index page in HTML?

Well, it's an interactive splash page. That's why I'd like the button to be in the clip.

And the code you provided, Chruser, helped to open in a new window, but I want it to open in the same window. (EDIT: changed the "_blank" and it works fine.)

Thanks.