View Full Version : get bookmarkscript using flash CS3 actionscripting!

09-01-2008, 12:17 AM
1) Script Title: Add to bookmarks

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex9/addbook.htm

3) Describe problem: I'm using the above script and it works well with my other buttons, but at the moment i want to use it with a .swf file
Basically its a movie to say "CLICK HERE to bookmark us" but im told i cant link it in dreamweaver and i cant find a way too. So, i have to write some actionscript in flash. So after spending all day looking for tutorials i can only find ones that show me how to link buttons to a URL and not to my javascript.
Here is the code I'm try to use to open the add to bookmark in FlashCS3 Actionscript 3.0:
//---start of script---\\
import flash.events.MouseEvent;
var getBookmark:URLRequest = new URLRequest("javascript:bookmarksite('title_of_site', 'url_of_site')");

//--- button property change---\\\

book_btn.addEventListener(MouseEvent.CLICK, bClick);

function bClick(event:MouseEvent):void{
//---end of script---\\

The button instance is called book_btn.
The errors are as follows:

SecurityError: Error #2051: Security sandbox violation: file:///C:/Users/2cute4u/Desktop/Sites/nameofsite/images/clickbook.swf cannot evaluate scripting URLs within file:///C:/Users/2cute4u/Desktop/Sites/nameofsite/index.php (allowScriptAccess is ). Attempted URL was javascript:bookmarksite('titleofsite', 'urlofsite').
at global/flash.net::navigateToURL()
at clickbook_fla::MainTimeline/bClick()

Thanks for your time.

09-01-2008, 11:58 AM
30 views and no clues? :(

09-02-2008, 09:29 AM
bump 4 me

09-03-2008, 08:42 PM
no clues whatsoever? waaaaaaaaaa!!!!!

09-05-2008, 06:41 PM
thanks for all ur help

09-07-2008, 07:37 PM
nobody uses flash here?