| | |
Flash CS3 - Button dosent work?
Please support our Graphics and Multimedia advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
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:
Any Ideas?
Thanks, Regards X
Below is my code:
Graphics and Multimedia Syntax (Toggle Plain Text)
button_N.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { navigateToURL(new URLRequest("http://www.google.com/")); }
•
•
Join Date: Mar 2008
Posts: 4
Reputation:
Solved Threads: 1
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:
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
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)
function nav(event:MouseEvent):void { navigateToURL(new URLRequest("http://www.google.com/")); } 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
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
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
•
•
Join Date: Mar 2008
Posts: 4
Reputation:
Solved Threads: 1
[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:
-S
I hope that helps. Let me know.
Example change:
Graphics and Multimedia Syntax (Toggle Plain Text)
var nav_req:URLRequest = new:URLRequest(http://google.com/"); function nav(event:MouseEvent):void { navigateToURL(nav_req, "_blank"); } goggle_btn.addEventListener(MouseEvent.CLICK, nav);
-S
•
•
Join Date: Mar 2008
Posts: 4
Reputation:
Solved Threads: 1
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.
hang in there. there has to be an actionscript wiz out there that will be able to help you.
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" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowNetworking" value="all" />
Last edited by buddylee17; Mar 15th, 2008 at 8:35 pm.
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
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
![]() |
Other Threads in the Graphics and Multimedia Forum
- Previous Thread: vector shape question
- Next Thread: great icon resource
| Thread Tools | Search this Thread |
3d 10 actionscript3 adobe adobeacrobat adobereader air ajax amazon amf apple button cart childprotection cloud dashboard dell design dojofoundation dreamweaver ebay eclipse ecommerce elasticcomputecloud embed endorsement extra family flash flash-develop flashlite flex free harddrive iamthwee ibm illustrator imflash intel interactivemap javafx javascript laptop legal map micron microsoft mobile monitoringsoftware moonlight multimedia myspace nand news novell panorama pdf pedophiles photoshop photosynth php safety sandisk security shopping silverlight solidstatedrive sproutcore ssd streaming swf table ukmap unload unwanted video vulnerability web white.space xml zend zephyr zeroday





