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{
navigateToURL(getBookmark);
}
//---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.



Reply With Quote

Bookmarks