I need a simple digital clock, but did not find any such standard component. Then using Timer and Date class I tried to create a Digital Clock in ActionScript.
Solution
I used Timer and Date class to implement this clock. The clock also has the functionality to dispatch events for (every second, every minute, every hour). This clock can be extended to add other functionality as well.
Place simple social networking share buttons on my website
Solution
Created a simple JavaScript file with the corresponding HTML links to share my website on popular social networking websites without including a "count"
We are creating a form which we would like end-users to be able to fill out in Reader, save, and distribute to others via email. However, we've found that those opening the pdf on iPhone cannot view the text fields. We tried adding a flattenPages javascript to a hidden button, but it won't work in Reader. We're not very versed in javascript but are willing to learn to make this work. Thanks!
Solution
What's needed is a PDF viewer on the iPhone that supports forms.
How does apply work? In this short video we will take a short tour of the basic ways to work with apply. In less then 5 minutes you can get the advantage of this advanced coding strategy.
Solution
It is very easy. Apply in a way gives you under the hood access to a function enabling you to send to it your parameters as an array. Very useful in some scenarios that we will explore in the video on this page.
You need the ability to call JavaScript functions from the Creative Suite SDK (CS SDK) and vice versa.
Solution
In the following code, I'll explain how to use HostObject to communicate between JavaScript and the CS SDK. This will involve embedding your JavaScript in your swf and defining interfaces for communication between the two different contexts. Note, this recipe will not cover using CSXSInterface.evalScript but that is another viable method for communicating from the CS SDK to JavaScript.
The biggest question of most developers i encounter is this: this a good time to learn flash? is it to late to join the party? Is the next party going to be in flash or a different language is swiftly coming to take over (JavaScript?HTML5?)?
Solution
I know knowing things is important but what is the most bang on the buck? I'm going to attempt to prove how and why flash is still king when it comes to the most fun,profitable, and time effective platform to work on. Does that mean HTML5/Javasciprt is out? no not at all Flash isn't in the same play ground as Javascipt is and we will look into what that means as we explore a personalized perspective of web/dev history.
The SharedObject class is used to read and store limited amounts of data on a user's computer or on a server. Shared objects offer real-time data sharing between multiple client SWF files and objects that are persistent on the local computer or remote server. Local shared objects are similar to browser cookies and remote shared objects are similar to real-time data transfer devices.
Solution
See the sample code below for examples on how to use utils code to save, get or delete data.
You want to print a PDF file directly from AIR without displaying it to the user and using your own custom button (not the default PDF control bar).
Solution
Open the PDF document you want to print in Adobe Acrobat Pro. Add the JavaScript code to your document and save it. Create an HTML page that contains a JavaScript function and embed the PDF document. In your Flash (or Flex) file add a button that prompts the user to print the document. Add the ActionScript 3.0 code that communicates with the HTML page. Publish your AIR file (making sure you include the HTML and PDF files). Test your AIR app.
I have 4 images that I want to have in one space on my web page. I want the images to refesh every 5 seconds, giving my audience a look at what I can provide. Can this be done? (Recipe request posted by Helen Griffiths)
Solution
Displaying a series of images is easy to do with JavaScript. Insert the first image in the web page as normal, and give it an ID. You can then change the image automatically by creating a JavaScript array of image names.
This site is produced in partnership with O'Reilly.