divinedesigns1 Posted January 25, 2012 Share Posted January 25, 2012 hey guys first off, sorry if i have not reply to some of my post, i been a little busy. secondly, i just started back using flash and the on(release) doesnt seem to be working, does this function work in flash cs4? because i mask my logo and was going to make the logo into a button, so i used this script on(release){ getURL ("http://www.divinedesigns1.us");} Is this correct? Link to comment Share on other sites More sharing options...
Ingolme Posted January 25, 2012 Share Posted January 25, 2012 Are you using ActionScript 2 or 3? And is the object type "button"? Link to comment Share on other sites More sharing options...
divinedesigns1 Posted January 26, 2012 Author Share Posted January 26, 2012 Are you using ActionScript 2 or 3? And is the object type "button"? sup fox, and im using as3 and the logo is a button type Link to comment Share on other sites More sharing options...
Ingolme Posted January 26, 2012 Share Posted January 26, 2012 I don't believe ActionScript 3 allows that syntax. You should switch to ActionScript 2. In ActionScript 3, you'll have to access the object from a script in the main timeline and use addEventListener. Link to comment Share on other sites More sharing options...
Alluring Posted January 27, 2012 Share Posted January 27, 2012 DDs1, here is some helpful scripting for AS3: btn_8.addEventListener(MouseEvent.MOUSE_DOWN, nav_8); function nav_8(event:MouseEvent):void {navigateToURL(new URLRequest("REPLACETHISWITHYOURURL"), "_self");trace("should work . . . ");} You can remove the second statement (trace("this should work ...") After putting this code on it's own layer, you must select the object (your button) and rename the instance name "btn_8" or it will not work. Well that and replacing the text with the URL you would like to navigate to. (REPLACETHISWITHYOURURL) It's much more involved than 2.0 so Ingolme's advice is good and if you're new, you should go with that instead. 3.0 is pretty hard to get used to even if you're really good with 2.0. Link to comment Share on other sites More sharing options...
divinedesigns1 Posted January 30, 2012 Author Share Posted January 30, 2012 DDs1, here is some helpful scripting for AS3: btn_8.addEventListener(MouseEvent.MOUSE_DOWN, nav_8); function nav_8(event:MouseEvent):void {navigateToURL(new URLRequest("REPLACETHISWITHYOURURL"), "_self");trace("should work . . . ");} You can remove the second statement (trace("this should work ...") After putting this code on it's own layer, you must select the object (your button) and rename the instance name "btn_8" or it will not work. Well that and replacing the text with the URL you would like to navigate to. (REPLACETHISWITHYOURURL) It's much more involved than 2.0 so Ingolme's advice is good and if you're new, you should go with that instead. 3.0 is pretty hard to get used to even if you're really good with 2.0. Alright thanks, i actually figured it was the addeventlistener you had to use thanks tho Link to comment Share on other sites More sharing options...
divinedesigns1 Posted January 30, 2012 Author Share Posted January 30, 2012 I don't believe ActionScript 3 allows that syntax. You should switch to ActionScript 2. In ActionScript 3, you'll have to access the object from a script in the main timeline and use addEventListener.thanks foxy Link to comment Share on other sites More sharing options...
Alluring Posted January 31, 2012 Share Posted January 31, 2012 You're welcome Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.