michaelgoldsmith
asked on
Simple Flash Slideshow with Hyperlinks
I have created a very simple slide show in flash cs4. It consists of 4 slides with a classic tween effect between each slide.
What I would like to do is link each of the four slides to the webpage related to the slide.
Can anyone tell me how to do this with flash cs4?
What I would like to do is link each of the four slides to the webpage related to the slide.
Can anyone tell me how to do this with flash cs4?
ASKER
Very new to flash, but here is what I did in following your directions:
1. Added a new layer at the top named "links".
2. Highlighted the first frame and created a rectangle shape the same size as the stage.
3. hit F8 and converted to a button symbol called button1.
4. Set the alpha to 0%.
5. created a keyframe in frame 65 (the last frame if the first photo).
6. added an actions layer.
7. Pasted the code above into the first frame of the actions layer.
Now what? So far it does not work.
1. Added a new layer at the top named "links".
2. Highlighted the first frame and created a rectangle shape the same size as the stage.
3. hit F8 and converted to a button symbol called button1.
4. Set the alpha to 0%.
5. created a keyframe in frame 65 (the last frame if the first photo).
6. added an actions layer.
7. Pasted the code above into the first frame of the actions layer.
Now what? So far it does not work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oops. Add to step 7 - Name each button instance: frame 66="button2", frame 131="button3", frame 196="button4".
ASKER
Just getting back to this project today.
I followed your steps and everything looks like it is going to work, but when I preview in HTML, clicking on the slideshow does not send me to the URL.
I get the following "compiler errors":
Location: Scene 1, Layer 'actions', Frame 1, Line 1
Description: 1120: Access of undefined property method button1.
Source: button1.onRelease = function(){
NOTE: repeated for each button....
Location: Scene 1, Layer 'actions', Frame 1, Line 2
Description: 1180: Call to a possibly undefined method getURL.
Source: getURL("http://www.theURL.com");
NOTE: repeated for each URL....
Location: Scene 1, Layer 'actions', Frame 1, Line 2
Description: Warning: 1160: Migration issue: The method getURL is no longer supported.
NOTE: repeated for each URL....
I followed your steps and everything looks like it is going to work, but when I preview in HTML, clicking on the slideshow does not send me to the URL.
I get the following "compiler errors":
Location: Scene 1, Layer 'actions', Frame 1, Line 1
Description: 1120: Access of undefined property method button1.
Source: button1.onRelease = function(){
NOTE: repeated for each button....
Location: Scene 1, Layer 'actions', Frame 1, Line 2
Description: 1180: Call to a possibly undefined method getURL.
Source: getURL("http://www.theURL.com");
NOTE: repeated for each URL....
Location: Scene 1, Layer 'actions', Frame 1, Line 2
Description: Warning: 1160: Migration issue: The method getURL is no longer supported.
NOTE: repeated for each URL....
Oh yeah... I think that you need to edit your settings to publish using AS2. I believe AS3 gets rid of the "getURL" action and makes that behavior a bit more complicated.
If you need to publish in AS3 for some reason, let me know and I'll post revised code - but with such a simple slideshow AS2 should work just fine.
If you need to publish in AS3 for some reason, let me know and I'll post revised code - but with such a simple slideshow AS2 should work just fine.
ASKER
I have already switched it to AS2. Now I do not get any compiler errors, but I still can't click the slideshow and get to the URL.
HEEEEEEELLLLPPPPP....
HEEEEEEELLLLPPPPP....
ASKER
http://www.flash-here.com/tutorials/flash_hyperlink_btn.html
Followed this quick tutorial to get it all straight. Thanks for the help.
Followed this quick tutorial to get it all straight. Thanks for the help.
To create the button: Create the size/shape you need; Convert the shape to a button symbol; Edit the symbol - cut the shape from the first frame, create a keyframe on the last frame (hit state) and paste in place in that last keyframe.
Then give your button an instance name (e.g. "button1") and add the hyperlink code to your actions layer (recommended):
button1.onRelease = function(){
getURL("http://www.somesite.com");
}
Or you can attach the code to the button itself:
on (release) {
getURL("http://www.somesite.com");
}