Flash CS3 - Button dosent work?

Thread Solved

Join Date: Dec 2007
Posts: 608
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Flash CS3 - Button dosent work?

 
0
  #1
Mar 15th, 2008
Dont ask me why BUT when I test this code in my adobe flash CS3 it works fine and the link opens fine now when I test this on my server it does not open the link...

Any Ideas?

Thanks, Regards X

Below is my code:
Graphics and Multimedia Syntax (Toggle Plain Text)
  1. button_N.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
  2.  
  3. function mouseDownHandler(event:MouseEvent):void {
  4. navigateToURL(new URLRequest("http://www.google.com/"));
  5. }
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 4
Reputation: sandraP is an unknown quantity at this point 
Solved Threads: 1
sandraP sandraP is offline Offline
Newbie Poster

Re: Flash CS3 - Button dosent work?

 
0
  #2
Mar 15th, 2008
I would try renaming the instance of your button to google_btn. Actionscript 3.0 works best with buttons and movie clips when instance names use the suffix _btn or _mc respectively.

It sounds like a minor change but it might help. Also, are you using mouse down over CLick for a special reason?

Example change:

Graphics and Multimedia Syntax (Toggle Plain Text)
  1. function nav(event:MouseEvent):void {
  2. navigateToURL(new URLRequest("http://www.google.com/"));
  3. }
  4.  
  5. goggle_btn.addEventListener(MouseEvent.CLICK, nav);

My last piece of advice is to make sure you created a separate layer in flash for the actions

Sorry if I am stating the obvious. Since I do not have the .fla file I want to cover all bases.

let me know if that helps.
-S

you also might need to create a variable to load the URL request. I will look for a past project and will post it tomorrow. But someone else reading this post might be able to give you that piece of code before then
Last edited by peter_budo; Mar 15th, 2008 at 7:02 am. Reason: Keep It Organized - please use [code] tags for easy readability
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 608
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Re: Flash CS3 - Button dosent work?

 
0
  #3
Mar 15th, 2008
Same thing no luck...

If it makes a difference the fla filed is published as n swf and then loaded by another bigger fla to play it but this should matter...

Like with the things all above, they are more correct programming then actually being right and wrong.

Tried everything above still same thing worked off server didnt work on server.

Note: MouseDown and Click both worked.

Thanks, keep the help coming.

Regards, X
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 4
Reputation: sandraP is an unknown quantity at this point 
Solved Threads: 1
sandraP sandraP is offline Offline
Newbie Poster

Re: Flash CS3 - Button dosent work?

 
0
  #4
Mar 15th, 2008
[QUOTE=sandraP;561483]Here is the variable declaration I spoke of in my last post. Written for Actionscript 3.0. Also if you are working in CS3, be mindful that you have selected actionscript 3.0 in the drop down menu within the actionscript window and script assist is turned off.

I hope that helps. Let me know.

Example change:

Graphics and Multimedia Syntax (Toggle Plain Text)
  1. var nav_req:URLRequest = new:URLRequest(http://google.com/");
  2.  
  3. function nav(event:MouseEvent):void {
  4. navigateToURL(nav_req, "_blank");
  5. }
  6.  
  7. goggle_btn.addEventListener(MouseEvent.CLICK, nav);

-S
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 4
Reputation: sandraP is an unknown quantity at this point 
Solved Threads: 1
sandraP sandraP is offline Offline
Newbie Poster

Re: Flash CS3 - Button dosent work?

 
0
  #5
Mar 15th, 2008
just a thought, AS3.0 does not handle scenes the same way as past versions of AS. i tried it on one project and could not get it to work so i gave up. So there may be something else we are missing as well with a .swf inside a .swf.

hang in there. there has to be an actionscript wiz out there that will be able to help you.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 596
Reputation: buddylee17 has a spectacular aura about buddylee17 has a spectacular aura about 
Solved Threads: 125
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Pro

Re: Flash CS3 - Button dosent work?

 
0
  #6
Mar 15th, 2008
I had a similar problem integrating paypal. It was a security feature problem. I changed my allowScriptAccess and allowNetworking param values and it fixed things. Here's what I set the values at:
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowNetworking" value="all" />
Last edited by buddylee17; Mar 15th, 2008 at 8:35 pm.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 608
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Re: Flash CS3 - Button dosent work?

 
0
  #7
Mar 16th, 2008
I made my own solution.

I went to publishing settings and change the version from Flash Player 9 to Flash Player 8.

Ive seen similar code like above to declare a button being selected.

Im thinking for long ass flash movies the new AS3 is alot better but for short sharp stuff like this "on release" is a whole lot easier.

Anyways it works now, GG Flash Player 8!

Might give flash player 9 a try some time in the near future.

Thanks, Regards X

PS: Thanks for all the help im sure ill use it in the future
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the Graphics and Multimedia Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC