Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

I need a code to add a bookmark to favorites and/or make a shortcut appear on the desktop.

Posted on 2004-09-23
3
Medium Priority
?
158 Views
Last Modified: 2010-04-03
Hello-

I'm working on a project for work and the client wants me to have a button where you click on it and the site gets bookmarked under favorites.  Do any of you know how I would do this in Flash?  They would also really love it if an icon would appear on the desktop to where when the clicked it it would take them to the certain page.  Again- any of you know how I could do that through flash.  Any help you guys could give me would be greatly appreicated.  Thanks!
0
Comment
Question by:ritmy
1 Comment
 
LVL 4

Accepted Solution

by:
mrdilliard earned 500 total points
ID: 12134663
You can't place an icon on the desktop...that's kind of a security risk. Imagine being able to save any file you wanted on the user's desktop...we'd all have plenty more spyware.

The bookmark is possible, but you'll be calling a javascript function from Flash.

Place this Javascript in the <head> of your page the flash movie's on.
<script language="JavaScript"><!--
function addBookmark(url,title){
   if (document.all) {
      external.AddFavorite(url,title);
   }
}
//--></script>

In Flash, you then just need a function to call the javascript:
mcButton.onRelease = function(){
     var url = "http://www.google.com/";
     var title = "The best search ever";
     getURL("javascript:addBookmark(\"url,title\")");
}

See if that works for you.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question