PDA

Click to See Complete Forum and Search --> : Flash question - I'm brand new!


jdeeesign
02-14-2005, 09:33 AM
I am brand new to using flash, and have made a pretty simple flash intro for a client. I was wondering...

How do I get it to automatically link to the main page after the animation is done? I will have a skip intro link, but I also want it to automatically continue to the main page after the animation is done, without the viewer having to click anything. Can anyone help? Thanks in advance!

1984
02-14-2005, 09:53 AM
actionscript on the very last frame, under navigation/browser actions, use the go to url.

Ordinary Life is Pretty Complex Stuff

1984
02-14-2005, 10:01 AM
Oh, you made me think of a few things you might wanna think of tho...
What if I go there and I wanna see the intro again? I'm gonna be so freakin pissed when I can't
And what happens when i go and reload the page, do i have to hit skip intro every time...your site is pissin me off... (I'm acting just so you know)

Ordinary Life is Pretty Complex Stuff

jdeeesign
02-14-2005, 10:15 AM
are you talking about the getURL actionscript? I tried that, and it's not working.

do i just go the last frame and insert the action
getURL(link goes here);

i'm not familiar at all with action script.
i know, i know, i need to take some classes before I do this seriously, but I just need to get past this one project

Akewz
02-14-2005, 10:21 AM
What version of Flash are you using, because in MX 2004 there is the movie clip loader which makes things a lot easier. If you're using an older version of Flash then you'll have to do it with action script alone.

http://www.denness.net/scrobblersig.php?username=Akewz

jdeeesign
02-14-2005, 10:24 AM
i'm using MX

Akewz
02-14-2005, 11:49 AM
Did you already write any action script for this?
Did you try using an empty movie clip with an onEvent handler?

The more information you can give me, the easier it will be fore me to help you.
I don't want to sit here and write out script for you if you've already tried it.

This could possibly work if you haven't alredy tried.


onClipEvent(load){
this.onEnterFrame = function(){
getUrl('http://your.swf',_blank)
}

Just to add an adendum to this - You want to put this in an empty movie clip on the final frame of your intro. Just pop that code into the action panel of the blank movie clip.
I tested the script and it worked for me.
Also, if you want the movie to continue in the same browser window just change '_blank' to _parent, also you might want to use 'yourmovie.html' instead of 'yourmovie.swf'

http://www.denness.net/scrobblersig.php?username=Akewz

Post Edited (Akewz) : 2/14/2005 7:29:50 PM GMT

1984
02-14-2005, 05:27 PM
Yeah, getURL..sorry

But this dude ^^^ is certainly the master so listen to him. :)

Ordinary Life is Pretty Complex Stuff

Akewz
02-15-2005, 12:31 AM
1984 said...
Yeah, getURL..sorry

But this dude ^^^ is certainly the master so listen to him. :)

I might be the 'master' of something, but it's certainly NOT Flash, and it's DEFINITELY not of 'my domain'.
Thanks for the vote of confidence anyhow.

http://www.denness.net/scrobblersig.php?username=Akewz

casedsgn
02-15-2005, 10:23 PM
You should just be able to put the getURL function on the last frame of your intro, it shouldn't HAVE to go on a movieClip event...?
Be sure you're putting the actual url inside parenthesis. 'www.likethis.com'.

You'd use the same function on your skip intro button..

on (release) {
getURL('http://www.somehwere.com', '_self');
}

Akewz
02-15-2005, 10:59 PM
casedsgn said...
You should just be able to put the getURL function on the last frame of your intro, it shouldn't HAVE to go on a movieClip event...?
Be sure you're putting the actual url inside parenthesis. 'www.likethis.com'.

You'd use the same function on your skip intro button..

on (release) {
getURL('http://www.somehwere.com', '_self');
}

I tried your technique just because I'm always looking to learn something new... anyway, it doesn't work.
Here's the error message I got:

**Error** Scene=Scene 1, layer=Layer 18, frame=74:Line 1: Mouse events are permitted only for button instances
on (release) {

**Error** Scene=Scene 1, layer=Layer 17, frame=75:Line 1: Statement must appear within on handler
replay_btn.onRelease = function(){

Total Actionscript Errors: 2 Reported Errors: 2

That's pretty much why I used an empty movie clip as an on event handler.
On the EVENT of the frame laoding, it performs whatever function the action script is dictating.

As far as using the script on a 'skip intro' button, I'm sure you could do it and it would work since the script is made for a button event, but wouldn't it be easier to just make a simple button and assign the url in the properties panel and just set the target destination to _self or _parent?

If I'm missing something obvious, by all means point me in the right direction, because like i said, I like to learn new things, especially if it can make something easier for me.

http://www.denness.net/scrobblersig.php?username=Akewz

casedsgn
02-15-2005, 11:13 PM
Wow.. I must have not communicated what I meant....
The script I posted was for a button.. not the timeline.
Timeline functions don't need any type of handler, they execute when the playehad hits them.
So for the last frame, you'd just put:

getURL('http://www.whatever.com','_self');

Sorry if I didn't communicate that clearly.. didn't mean to confuse anyone.

On the button script... you could do it ethier way. But if you set the link in the properties, you can't re-use that button to go to a different link. If you just slap an on(press) or on(release) function on it.. it's independent of the actual button.. so you could have 10 instances of that button on the stage all pointing to different places. Not that it really matters in this case but it's always good to design for scalability.

Akewz
02-15-2005, 11:23 PM
Ok, that time it worked.

Thanks for the tip, it certainly was much simpler than my technique.

http://www.denness.net/scrobblersig.php?username=Akewz

jdeeesign
02-16-2005, 03:54 AM
thanks guys i really appreciate it... yeah, my problem was that I wasn't putting the web address in quotes. i asked a guy i work with that's into flash, and he pointed that out for me. thanks again!http://www.graphicdesignforum.com/DesktopModules/dotNetBB/emoticons/biggrin.gif