FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Help With Flash Actionscripting





Yazz
I'm trying to remake my splashpage introduction animation from scratch, but I'm having trouble scripting the intro to do what I want. I basically want it to go to a certain URL when it's click on. An example of what I want is here. It's the intro I made before. This has been bugging me for a while... I looked at tutorials and help files, but everything I've tried ends up in failure.

Help would be very much appreciated, thanks!

-Yazz
Kaneda
Have a look at getURL Wink

http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary377.html
Yazz
Seriously, if that was my problem, I wouldn't be asking for help.

I've been trying like, 4 different mouste event handlers and none of them will let me trigger the link. If i use getURL alone, the link will show up right away, which defeats the purpose of having a splash intro.

Can someone type up a couple of examples? My invisible overlaying button is named Fri (just coincidential that my website is related to a character named Frijoles). The URL to link to is main.html, in the Middle target window.

Thanks again. And don't bother sending me to links. I've already seen them.

-Yazz
Kaneda
Yazz wrote:
Seriously, if that was my problem, I wouldn't be asking for help.


Sorry, but lots of people here do. Your level of experience with ActionScript isn't immediately apparent from username, avatar or problem description, you know...

If the button is a Button or MovieClip object, and its instance name is Fri, all it would take should be:

Code:
Fri.onRelease = function() {
  getURL("main.html","Middle");
}


If you use the "old style" of placing the event directly on the button, it would be:

Code:
on (release) {
  getURL("main.html","Middle");
}


And just to be comprehensive, the actual code you used for the original swf found on your site was this:

Code:
on ( press, release ) {
  getURL("Main.html","Middle")
}


Smile

If it doesn't work at all, you have a different problem. If main.html isn't in the same directory as the swf, try and set the base path in your param/embed tags, and be sure you're using the proper relative path - or use an absolute path.

Can't see any other possibilities...
Yazz
o.o

THANK YOU.

lol, yeah, I sorta thought that I already implied that I had gone to sites and tutorials already... When I said this:

Yazz wrote:

It's the intro I made before. This has been bugging me for a while... I looked at tutorials and help files, but everything I've tried ends up in failure.


Anyways, thanks so much for the coding. I've been trying the first one a couple different ways, I'll try the second and third one.

Also, it's not about the directory. Even if there was a directory problem, the link would still open up a blank page and tell me that main.html isnt there. But when I clicked, I got absolutely no response. I also kept getting an error about .onPress, but that wasn't even in my coding, so I didn't understand that part...

I'll try it out when I get home, right now I'm at school.

Thanks again! ^^

-Yazz

edit: Just to be sure, I'm using Flash 8... So I'm not sure if that changes anything. I've heard that Flash 5 was easiest one to work with, I'm kind of considering a downgrade now, lol.
Kaneda
Macromedia tend to be even worse than MS when it comes to backwards compatibility - as in, they won't remove even the most stupid features (read: bugs) in a new version. So, Flash 8 ActionScript-wise can be used exactly the same way as Flash 5 - by default, it will just target the swf for FlashPlayer 8 - but even that can be changed.

Notice, however, that if you don't specify the target flash version in the HTML embed/object tags, FlashPlayer 6 or 7 may still play your files published for FlashPlayer 8 and just stop at unpredictable places...

Oh, and the last example I gave is the EXACT thing that was in the .swf on your site - I decompiled it Smile So, if that doesn't work, something else is wrong.
Yazz
Kaneda wrote:
Oh, and the last example I gave is the EXACT thing that was in the .swf on your site - I decompiled it Smile So, if that doesn't work, something else is wrong.


Yeah.. about that... How'd you do that... <.<

So that if I forget this again, I can figure it out...

-Yazz
Yazz
Oookay... Well, I tried the codes you gave me, none of them worked. I concluded that something was wrong with my program. I uninstalled it, reinstalled Flash MX, and now it works.

Before I kept getting some error about "." and .onPress (even though I wasnt using Press)

So I guess I'll just use the MX version.

Thanks for your help!

-Yazz
Kaneda
Yazz wrote:
Yeah.. about that... How'd you do that... <.<

So that if I forget this again, I can figure it out...

-Yazz


Since Flash .swf is a pretty open format (Macromedia have described every byte of it, so people are free to make their own programs creating .swf files), it's also open for decompilation. Plenty of decompilers outthere:

http://www.sothink.com/product/flashdecompiler/index.htm - the one I used, since my workplace has it.
http://sourceforge.net/projects/swfrip - open source and free.
http://www.buraks.com/asv/index.html

Probably lots of others... I don't really use Flash that much Smile
Related topics
Help flash slideshow
Flash Portfolio examples
Please help.....Flash, PHp, MySql
Hello!
Flash - Photo Gallery - need help please.
Please help me!!!! HTML/Flash help needed!
Flash help!
Flash Help
Can anybody help me in making Dynamic menu bars in Flash?
Need vb.net or Flash ActionScript Help!
full flash website help
Flash Preloader Help
Help. My Flash Video is not working all the time..
Help with Flash!!!
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.