Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 22nd, 2011, 08:15 PM
mojocoder mojocoder is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2011
Posts: 1 mojocoder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 10 sec
Reputation Power: 0
Flash CS5 - Make a flash video a link in CS5.5

Hello all,

This has probably been asked before but I didn't find anything in my searches for the text in my title. I am a newb in the flash world, I normally do PHP and JSP, but I have one website that I am working on that has a flash video logo. The only thing they want me to change about the video is to make it a link to the index page of the site. I can not figure out for the life of me how to do this. Could someone please lay the steps out in a simple fashion for me. I have found a few tutorials online but none of them were for CS5.5 and none of them have all the steps for the version they are for. They were all missing something and I can't figure out what that something is as I have no training in Flash. Please help me.

Any help will be greatly appreciated.

Thanks,

mojo

Reply With Quote
  #2  
Old September 23rd, 2011, 05:48 AM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 6,663 Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 14767 Folding Title: Novice Folder
Time spent in forums: 1 Month 1 Week 3 Days 20 h 10 m
Reputation Power: 3163
Facebook MySpace
Hi, the navigateToURL function is what you are after.

How you implement it kinda depends on how your stage is setup. The easiest catch-all way is:
  • Draw a large rectangle over the top of all your logo content. Right click that and choose "Convert to Symbol". Give it a name and set the dropdown to MovieClip.
  • Select the new rectangular MovieClip on the stage and open the Properties panel.
  • You will see a blank text field with the words "<Instance Name>" written in it. Let's call the clip home_link.
  • Still in the properties panel, expand the "Color Effect" section and set the dropdown to "Alpha", then drag the slider down to 0. This will make the rectangle transparent so you can't see it but it can still be interacted with.
  • Now select the keyframe that the rectangle sits on in the timeline and open the ActionScript panel.
  • Paste in this code and change the link to your homepage:
  • Code:
    import flash.net.navigateToURL;
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    
    // This line makes it have the hand cursor when the mouse is over the rectangle.
    home_link.buttonMode = true;
    
    // Sets up the event listener so that when the rectangle is clicked, goHome is called.
    home_link.addEventListener(MouseEvent.CLICK, this.goHome);
    
    function goHome(event:MouseEvent):void
       {
          // Link to go to and the window/frame name to load in i.e. _self, _blank etc.
          navigateToURL(new URLRequest("http://www.example.com"), "_self");
       }
__________________
Quis custodiet ipsos custodes?

Reply With Quote
  #3  
Old September 23rd, 2011, 09:55 PM
rtstone rtstone is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2011
Location: Kansas
Posts: 14 rtstone User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 10 m 42 sec
Reputation Power: 0
Error

I seem to get the following errors when I try this:

The class or interface 'MouseEvent' could not be loaded.
The class or interface 'flash.net.navigateToURL' could not be loaded.

Any ideas what these errors mean?

Please help me.

Reply With Quote
  #4  
Old September 24th, 2011, 03:58 AM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 6,663 Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 14767 Folding Title: Novice Folder
Time spent in forums: 1 Month 1 Week 3 Days 20 h 10 m
Reputation Power: 3163
Facebook MySpace
It either means you didn't copy and paste the import statements or that you are using ActionScript 2. I assumed you were using ActionScript 3 since you made a point of saying you are using CS5.5, you can check that by doing File->Publish Settings->Flash and then seeing what is selected in the ActionScript dropdown.

Reply With Quote
  #5  
Old September 24th, 2011, 08:56 AM
rtstone rtstone is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2011
Location: Kansas
Posts: 14 rtstone User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 10 m 42 sec
Reputation Power: 0
Thanks you have been very helpful

I am sorry the original video was created by someone else and I am just trying to edit it. I purchased CS5.5 because it was the latest and it would be able to work with any of the previous versions.

I confirmed that the video appears to be using 2.0 by following your instructions. I am sorry for the confusion I just do not know anything about Flash and I surely didn't know it would be this hard. Will you please help me?

If I were using action script 3.0 I know your instructions would have worked as I was able to find everything you were describing and complete all the steps. Since I understand nothing about flash what do I have to do differently for action-script 2.0 versus 3.0?

Oh, and thank you very much for being so detailed you are the best!

Reply With Quote
  #6  
Old September 24th, 2011, 09:28 AM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 6,663 Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)Tann San User rank is General 33rd Grade (Above 100000 Reputation Level)  Folding Points: 14767 Folding Title: Novice Folder
Time spent in forums: 1 Month 1 Week 3 Days 20 h 10 m
Reputation Power: 3163
Facebook MySpace
hehe, not to worry. All the steps are the same except the last one which uses different code. Here's the equivalent in ActionScript 2:
Code:
home_link.onRelease = function():Void
   {
      getURL("http://www.example.com", "_self");
   }

That replaces all of the code I wrote in the previous post including the imports. So to be ultra clear, don't use any of the previous code, just use the bit I just wrote ^_^

Reply With Quote
  #7  
Old September 24th, 2011, 08:53 PM
rtstone rtstone is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2011
Location: Kansas
Posts: 14 rtstone User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 10 m 42 sec
Reputation Power: 0
Thanks

Thank you that worked! You are awesome!!!!

Reply With Quote
  #8  
Old April 27th, 2012, 02:05 PM
osmildmay osmildmay is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 3 osmildmay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m 23 sec
Reputation Power: 0
... link not linking !

Hi Tann San,

I have used your code (using AS 3.0), and when the flash animation is run the mouse hand changes when hovering in the correct place, however when I click nothing happens - it just does not link to another page!

I have tried moving the slider to "HIT" and just about everything I can think of!

Please advise - help would be greatly appreciated!.

Many thanks.

osmildmay

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Flash CS5 - Make a flash video a link in CS5.5

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap