-
Help to add button and link it to another page within flash animation
Good Evening,
I would like to ask for a help!
I am working on flash website for my wife and really struggling …. I would like to create a button on e.g. Home page (Page 1 – Movie Clip) with a link which will open another page within the flash animation e.g. Contact (Page 6 – Movie Clip). So far I have added a button “Enter” to Home page with link is not working. I am not sure what script is needed to be put there …
Template was created in Flash MX2004, I am using Flash Pro 8.
Could someone have a look at flash file (www.svadobnedekoracie.eu/html/flash.fla) and help please ?
Testing website is uploaded here: www.svadobnedekoracie.eu/html/
Thank you very much for your help!
Dan
-
Client Software Programmer
button_name_here.onRelease = function() {
getURL("http://www.yoursite.com", "_blank");
}
-
Hello Alloy Bacon,
thank you for your reply.
I have added the below to the button I have placed to page 1 movie clip:
button2.onRelease = function() {
getURL("http://svadobnedekoracie.eu/html/", "_blank");
}
button2 is the name of button
But there is an error message:
**Error** Symbol=page1, layer=Layer 3, frame=1:Line 1: Statement must appear within on handler
button2.onRelease = function() {
Total ActionScript Errors: 1 Reported Errors: 1
Any idea what I am doing wrong?
Flash file can be downloaded here: www.svadobnedekoracie.eu/html/flash.fla
-
-
Prid - Outing
Hi,
usually templates are made in a rather complex and organized manner which can lead to a lot of nested codes and many factors to consider even when trying to execute the slightest action -- thankfully in your case, the template relatively simplified, and after analysing your templating a bit, the easiest solution I've come up with is to put this code on your button:
Code:
on(release){
_root.gotoAndPlay("page6");
}
I haven't tested this code properly, so keep an eye out for possible errors that may occur subsequently, but hopefully this is enough and does the trick for you As you can see, the transition to the other page isn't as smooth as the rest of the template, but this is the simplest code to fix your problem, so hopefully it'll do
It probably goes without saying, but just change the number of the page to whatever suits your needs, like "page2", "page3", etc.
If you want an explanation for why this works and what you did wrong, then feel free to ask.
I hope this helps you
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
Originally Posted by Nig 13
Hi,
usually templates are made in a rather complex and organized manner which can lead to a lot of nested codes and many factors to consider even when trying to execute the slightest action -- thankfully in your case, the template relatively simplified, and after analysing your templating a bit, the easiest solution I've come up with is to put this code on your button:
Code:
on(release){
_root.gotoAndPlay("page6");
}
I haven't tested this code properly, so keep an eye out for possible errors that may occur subsequently, but hopefully this is enough and does the trick for you As you can see, the transition to the other page isn't as smooth as the rest of the template, but this is the simplest code to fix your problem, so hopefully it'll do
It probably goes without saying, but just change the number of the page to whatever suits your needs, like "page2", "page3", etc.
If you want an explanation for why this works and what you did wrong, then feel free to ask.
I hope this helps you
Thank you sooooo much, it is working :-)
-
Prid - Outing
Glad I could be of help -- I hope your wife likes the website as it is wonderful
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
Me wife love it but unfortunately it looks like I will need to redesign it or create mobile version as it is not accessible by mobile phones as iPhone/Android.
-
Prid - Outing
Oh, that is such a shame Apple refuses to support Flash, so none of their mobile devices will be able to run Flash files -- as for Android, I do believe it should work, but I could be wrong. To re-create such an amazing website in something like HTML5 to support mobile devices would be quite a challenge, as Flash is unmatched when it comes to how easily you can add interactivity to a website. But I hope you find a solution for that though, all the best
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
Senior Member
if you convert your scripts to as3 (thus keeping the artwork) you can then package this as an app using AIR and publish in ios/google stores.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|