Using Actionscript (.as files) libraries in HTML/Javascript code

I'm trying to make use of the following Asynchronous
JPEGEncoder encoder.
http://blog.paranoidferret.com/index.php/2007/12/11/flex-tutorial-an-asynchronous-jpeg-enc oder/
In my html/javascript application. I've read the link
http://help.adobe.com/en_US/AIR/1.1/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7ed9. html
but it doesn't explain how to use .as files ? or how to form
.swf files !!
the original source for the JPEGEncoder contain two files:
JPEGAsyncCompleteEvent.as and JPEGAsyncEncoder.as
how to use them in HTML pages ?

The source is here:
http://blog.paranoidferret.com/files/Tutorials/Flex/JPEGEncoding/srcview/JpegEncodingTutor ial.zip

Similar Messages

  • How can I run a .bat file from an html/javascript adobe air installation package?

    I write an html/javascript code which works completely true
    but when I made the installation package by air-sdk
    it dosent work properly
    my code is:
    <html>
    <head>
        <title>Hello World</title>
              <script type="text/javascript">
            function appLoad() {
                air.trace("Hello World");
        </script>
    </head>
    <body onLoad="appLoad()">
        <h1>Hello World</h1>
              <br />
    <button onclick="window.open('file:///C:/Windows/notepad.exe')"> Launch notepad </button>
    <button onclick="window.open('file:///D:/opennotepad.bat')"> Launch batnote </button>
    </body>
    </html>
    Chapter 5: Creating your first HTML-based AIR application with the AIR SDK

    Seems to be security violation. You can't execute bat or cmd

  • How to add html/javascript code to all my pages at once

    dear adobers,
    i want to add a javascript code that records my site's visitor count, but in order to do that i have to place it on every single page...so, is there a way i can do that externally like adding it in my style.css or something else that saves time ? please help

     or ⌘ key
    http://en.wikipedia.org/wiki/Command_key#The_origin_of_.22.E2.8C.98.22 - command key (Wikipedia)

  • Using !-- javascript code -- in an XSL file?

    Hello folks,
    Here is what I am trying to do:
    I have an XML file and an XSL file.
    I pass theese to the Oracle's XSL/XML
    processor and get an HTML file which
    contains a javascript code and CSS code
    in the comment tag
    <!-- code goes here -->.
    OK, but when I use the &;lt; it gets
    converted into &;#60; thus preventing
    the javascript and css (in the resulting
    html file) to work?! It is viewed properly
    but when I open the page source the
    corresponding character is not < but
    &;#60;
    My question: Is there any workaround to this
    problem? Do I always have to use the &;lt; for < char.? Some other chars also
    get converted (as single quot. - &#39 .
    Is there any other way to do this? Could you
    send me some example xsl file demonstrating
    a solution to this problem? Thank you so much
    in advance!
    Georgi

    Feel free to download the PDF Options Editor : http://abracadabrapdf.net/download/PDFoptions-editor.pdf.zip
    It allows to edit options for placed PDF into InDesign layouts.

  • Can I use Struts Validator Plugin's html:javascript tag?

    Hi:
    Is it possible to incorporate the client-side validation using Struts Validator
    Plugin's tag <html:javascript>?
    i.e.
    1) Insert the following tag to A.jsp and define a taglib:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <html:javascript formName="aForm" staticJavascript="true"/>
    2) Define validation.xml as follows:
    <form-validation>
    <formset>
    <form name="aForm">
    <field property="aField"
    depends="required">
    <msg name="required" key="FieldMissingError"/>
    </field>
    </form>
    </formset>
    </form-validation>
    3) Insert the onSubmit event in aForm:
    <netui:form action="SubmitAForm" style="border-width:1px;" onSubmit="validateAForm(this)">

    Instead of writing something like this -
    <p class="logos">Logo1<a href="...></a></p>
    <p class="logos">Logo2<a href="...></a></p>
    <p class="logos">Logo3<a href="...></a></p>
    <p class="logos">Logo4<a href="...></a></p>
    <p class="logos">Logo5<a href="...></a></p>
    <p class="logos">Logo6<a href="...></a></p>
    Why not have something like this -
    <div id="logodiv">
    <p>Logo1<a href="...></a></p>
    <p>Logo2<a href="...></a></p>
    <p>Logo3<a href="...></a></p>
    <p>Logo4<a href="...></a></p>
    <p>Logo5<a href="...></a></p>
    <p>Logo6<a href="...></a></p>
    </div>
    with CSS like this -
    #logodiv p { ... }

  • How to upload JPEG files using ActionScript 3.0

    Hi all,
    It's very urgent.
    I am new to ActionScript. Presently, I am working on
    ActionScript3.0. I am using flash 9.0 and the code I ned is for
    ActionScript3.0.
    I have a combo-box on the stage with a few items in the
    combo-box and also have corresponding JPEG/PNG image files.
    My goal is :
    I need to display the appropriate image onto the stage based
    on the selection of the item in the combo-box. So, please I need
    ActionScript code or procedure to handle this using
    Event-Handling mechanism of MouseEvent.
    I need help.. Please help me.... I am new to the
    ActionScript and flash environment.
    Thanks a lot in advance.....
    Srihari.Ch

    Hi kglad,
    Once again thanx for your help. I had one more problem for
    which I need a solution.
    As you know,I am new to ActionScript 3.0 and flash.
    Presently, I am using Adobe flash CS3 and working with it using
    ActionScript 3.0.
    I need code (or) procedure for developing an application in
    such a way that, When I click on a button present
    on the stage, I should get execute an HTML file(say,
    Hello.html) which is present in the local hard-disk in the same
    folder as with the flash file.
    I had developed HTML file and flash file.
    I am attaching the JavaScript code which is getting executed
    in flash:
    So, the java-script file is not getting executed .Instead, it
    is displaying a browser with a blankpage. So, I need the
    ActionScript to get executed.
    Please, help me.... It's very urgent....
    Thanks in advance.

  • DW CS5 use ActionScript files without Flash

    Our websites must avoid requiring a Flash download in the client browser.
    Can we use Dreamweaver CS5 with ActionScript files (.as) without requiring Flash in a browser?
    For example, DW CS5 menus include File -> New ... -> ActionScript,
    but I cannot find literature or examples on using .as with Dreamweaver.
    thanks,
    Bruce

    ActionScript is the backbone for Flash applications (FLV or SWF).
    Unlike HTML & JavaScript, ActionScript is not a web programming language per se.  It is a Flash programming language.  And while some web devices support Flash many others do not.
    If your site cannot use Flash then your ActionScript will need to be replaced with a suitable web alternative.  Perhaps jQuery or Ajax (JavaScript & CSS).
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Is it possible to use my music files in both my girlfriend's and my separate Itunes libraries through our seperate user accounts?? I want to import my music into her library with out copying the files onto my hard drive a second time....

    Is it possible to use my music files in both my girlfriend's and my Itunes library's through our seperate user account?  I want to import my music into her library without copying to my hard drive a second time.....

    Would any of these help you?:
    http://www.apple.com/itunes/inside-itunes/2011/05/two-ways-to-share-media-librar ies-through-itunes.html
    http://www.apple.com/itunes/inside-itunes/2011/01/keeping-multiple-itunes-librar ies-on-a-single-computerif-you-share-your-computer-with-others-and-you.html

  • How to Use Mobile Service in HTML/JavaScript Application

    The Windows Azure Mobile Service is a back end tool for mobile applications. It supports various platforms, such as Windows Store, Windows Phone 8, iOS and Android. The Windows Azure
    Mobile service can also support HTML/JavaScript. This article helps you to get a basic idea of how to use the Windows Azure Mobile Service in HTML/JavaScript applications.
    Let us start with a Quick startup project provided by Microsoft. A Quick startup is a simple demo project that can help us to understand how to use the Windows Azure Mobile Service with HTML/JavaScript. So let's start from the Quick startup project.
    Login into in the Windows Azure portal and use the following procedure.
    This article assumes you already have a Windows Azure account and the mobile service is enabled in your account.
    1. Create a new Windows Azure Mobile Service
    Click on the +New button from the left corner and select Compute -> Mobile Service and then click on the "Create" button.
    The Windows Azure portal popup creates a mobile service wizard when you click the Create button. Windows Azure asks you to enter the mobile service name as shown in the following image:
    Select the database options and region for your mobile service and click on the "Next" button.
    Once your mobile service is successfully created, the portal will show all your mobile services as shown in the following images.
    Ok! We have created a new mobile service successfully. Let's move to our subsequent steps.
    1. Quick startup Project 
    As we all know, the Windows Azure Mobile Service can support many platforms such as Windows Store, Windows Phone 8, iOS, Android and HTML/JavaScript. This article only tells us about the new HTML/JavaScript platform that is recently added to the Windows Azure
    Mobile Service.
    In the image above, we are in the quick startup page where the Windows Azure Mobile Service allows the user to choose their platform. I have selected the HTML/JavaScript Platform.
    In the image above, we found 3 quick steps that can allow us to run <g class="gr_ gr_74 gr-alert gr_gramm Grammar" data-gr-id="74" id="74">a HTML/JavaScript</g> sample project. 
    1. Create Table: In this step the user needs to create a table that can used by the sample project, once you hit the create TodoItem Table button. The Portal will create a TodoItem table in your mobile service. You
    can check this table by clicking on the data tab(menu).
    2. Download and run your app: In this step the user needs to download the Quick startup project that is provided by the Windows Azure portal. Click on the "Download" button and download the project. You will
    see the following files in the quick startup project.
    The Server folder contains some files to setup this project locally. The user should run the file from the server folder corresponding to their OS. I am using Windows OS so I ran the <g class="gr_ gr_80 gr-alert gr_spell ContextualSpelling ins-del multiReplace"
    data-gr-id="80" id="80">lanch</g>-<g class="gr_ gr_79 gr-alert gr_spell ContextualSpelling ins-del multiReplace" data-gr-id="79" id="79">windwos</g> file to setup this project locally in
    IISExpress.
    Press r and enter the key, you will see IISExpress started. Do not close this Windows and open your browser and request the http://localhost:8000/ page.
    Enter the Item name and click on the add button. Your Item will be added to the TodoItem table.
    3. Configure your host name: This step is a very important step for any HTML/JavaScript application that uses the Windows Azure Mobile Service. In this <g class="gr_ gr_83 gr-alert gr_gramm Punctuation only-ins
    replaceWithoutSep" data-gr-id="83" id="83">step</g> the user must register their website name in the Cross-origin resource sharing (CORS). By default, "localhost" is added by the Windows Azure Mobile Service
    so your quick startup project can run without making any CORS setting changes. The user can add their website domain name by clicking on the configure tab (menu).
    The user can add as many website domain names as needed.

    are you asking a question or did you just post a tutorial here? you might want to post it as a blog post or wiki entry instead.

  • AIR apps developed using HTML+Javascript

    Hi…
    I am working on Adobe AIR.
    And now I have 3 options to develop AIR applications 1)Flex
    2) Flash 3) HTML+javascript.
    But can you please explain me when do I exactly use Flex Or
    HTML+JS Or Flash.
    One of the reason I know is Flex used for Rich UI
    applications
    Is there any list of requirements for which one of the 3
    option is most suitable to use.
    And I have some more questions.
    1) Can AIR applications(developed using HTML+Js) invoke a web
    service running on a different server
    2) Can AIR application(developed using HTML+Js) detect the
    connectivity of USB drive (I have developed 1 application that can
    detect the Network connectivity and periodically reports the status
    I want the same in case of USB(plug & play) connectivity)
    3) I have one AIR application that has one HTML form on click
    of button I am posting the form Data to Java Servlet using
    “air.sendToURL()” as shown
    <script src="AIRAliases.js" />
    <script>
    function sendURL()
    var url = "
    http://localhost:8080/InvokingServlet/Registration";
    var variables = new air.URLVariables();
    variables.username = document.f1.username.value;
    variables.password = document.f1.password.value;
    var request = new air.URLRequest(url);
    request.data = variables;
    air.sendToURL(request);
    alert("Data has been added to Remote DB...");
    </script>
    The data goes to Servlet and then Servlet thru Jdbc
    Connectivity adds the data to database “MySQL” database
    named “user”
    If I read the data from database and print in Servlet it
    displays that to “tomcat server window(log)” But I want
    the data from Servlet to send back to HTML page where I can display
    it on the same HTML page where user entered his details. So even if
    I put the result into some Scope like session or request, but Can I
    read that it in HTML+Javascript page .
    [email protected]

    quote:
    Originally posted by:
    pravinpatil23
    But can you please explain me when do I exactly use Flex Or
    HTML+JS Or Flash.
    This question gets asked about once a week. You
    can find my latest answer
    here
    and a little searching will dig up more opinions.
    quote:
    Can AIR applications(developed using HTML+Js) invoke a web
    service running on a different server
    An AIR application isn't hosted on a server, so all web
    servers are "foreign" to your AIR application. An AIR app does get
    downloaded from a server, most of the time, but it doesn't maintain
    some kind of special connection to that server.
    Because of this, there are no cross-domain restrictions in
    AIR like you have in a regular web browser.
    quote:
    Can AIR application(developed using HTML+Js) detect the
    connectivity of USB drive
    AIR does not allow low-level system access, and has very
    little in the way of platform-specific capabilities. So, you'd have
    to use a high-level, platform-agnostic way of checking for the
    drive, such as by looking around to see what files are available.
    Things like USB insert notifications are way outside the scope of
    AIR.
    quote:
    I want the data from Servlet to send back to HTML page where
    I can display it on the same HTML page where user entered his
    details.
    That question isn't on-topic here. Ask on a forum dealing
    with JSP servlets.

  • When to use Flex Or Flash Or HTML-Javascript

    I am Experimenting with Adobe AIR. I know AIR Applications
    can be developed either using Html-Javascript Or Flex Or Flash.
    But can anybody HELP me understand when do i exactly use Flex
    or HTML-JS.
    Well i know one of the reason to use Flex is to build
    RIA's.What are the other Possible reasons ?? can i draw a Decision
    Boundry between them??

    The best reason to choose one tool over the other is that you
    have something working in that language already, and are just
    extending it into the AIR world.
    If you're starting a new project, you then have to balance
    tools you have and know how to use against the strengths of the
    tools. A tool you don't know has to have some pretty compelling
    strengths to make you take the time to learn it, unless you're just
    doing it for fun. If not for fun, the effort has to pay off, yes?
    Very generally speaking, here are the strengths of the tools,
    as I see it.
    For HTML + Javascript, just look at what you see on the web
    today. People are pushing browsers pretty hard these days with web
    apps, so that gives you a good first-order idea of the power of
    this tool set. The AIR environment does give you some more power,
    not just in the AIR APIs, but also in having a single modern
    browser to develop for, so you don't have to limit yourself to IE6
    compatible code. Still, it's not yet the equal of the other tools
    in some areas.
    Flash's main advantage over the others is in applications
    with lots of graphics and animation. The reason for this is purely
    because that's what the Flash authoring environment is geared to
    produce. It's not got a very good ActionScript editor, and as a
    consequence there's a practical limit on how much code you want to
    write in a given project. It's not a question of whether you
    can write a 20,000 line ActionScript program within the
    Flash environment, it's a question of whether it's better done in
    another tool.
    One of the best "other tools" when you end up with lots of
    code is Flex. With the "Builder", you get Ecipse, and without, you
    are presumably using some other worthy programming environment.
    But, you give up the graphic and animation tools from Flash, and
    you give up a lot of the simplicity of HTML + Javascript.
    You can combine them, of course. You could build a whizzy GUI
    control in Flash to use in a Flex application which is hosted
    inside a web page, for instance.

  • How to create and use Data Vault with HTML/JavaScript (SAPUI5) for Mobile Apps?

    Hello,
    I am creating a demo Enterprise Mobile App, for cross platform and I want to use the Data Vault.
    I am not able to figure out how to implement the Data Vault with HTML/JavaScript i.e. SAPUI5 for cross platform mobile apps I have a tutorial, but it is for Android based apps. Where as I want it for iOS as well. I guess, in this case, implementing the Data Vault using SAPUI5 over HTML and JavaScript would be  better.
    If anyone has any links or sample code to implement Data vault in HTML/JavaScript (SAPUI5) or specific for iOS apps, it would be great.
    Thank you.

    Hi,
    This is the "SAP Mobile Documents" community, so this seems to be the wrong place for asking your question related to Data Vault / SAPUI5.
    Maybe you should post your question here: http://scn.sap.com/community/developer-center/front-end.
    best regards,
    Ingo

  • How to load other obejects in flash file after intro using ActionScript 3.0

    How to load other obejects in flash file after intro using ActionScript 3.0 or any other method all in same fla file. see blow intro screen shot ,this one playing repeatedly without loading other fla pages .only way to load other pages is click on Skip intro .see second screeshot below .i need that site to load after intro .
    see codes already in
    stop();
    skipintro_b.addEventListener(MouseEvent.CLICK, skipintro_b_clicked);
    function skipintro_b_clicked(e:MouseEvent):void{
    gotoAndStop("whoweare");
    There is another script there
    /* Simple Timer
    Displays a countdown timer in the Output panel until 30 seconds elapse.
    This code is a good place to start for creating timers for your own purposes.
    Instructions:
    1. To change the number of seconds in the timer, change the value 30 in the first line below to the number of seconds you want.
    var fl_TimerInstance:Timer = new Timer(1000, 30);
    fl_TimerInstance.addEventListener(TimerEvent.TIMER, fl_TimerHandler);
    fl_TimerInstance.start();
    var fl_SecondsElapsed:Number = 1;
    function fl_TimerHandler(event:TimerEvent):void
              trace("Seconds elapsed: " + fl_SecondsElapsed);
              fl_SecondsElapsed++;
    i have no knowledge about these thing ,any help really appreciated .

    Ned Murphy Thank you very Much .It is working .Great advice

  • How to include external javascript file in an html

    hello
    i've an html file placed in apache/webapps/test folder this html file includes an external javascript file placed at same level
    i'm includind the file as
    <script src="file1.js"></script>but the file does not gets included
    but when the sam folder "test" is paste outside apache the html file including the external file runs properly.
    Thank You

    flounder wrote:
    cotton.m wrote:
    What's really pathetic is that this is your third cross post on this same stupid off topic topic.
    You are really a dumb f&#117;ck you know that?If they knew that they were a dumb f&#117;ck then they wouldn't be a dumb f&#117;ck!That's a logical and reasonable conclusion. Therefore I very much doubt that the OP is capable of it.
    Hmmm this is interesting. It now shows the entity escapes rather than their values when you quote.

  • How to get/set value in illustrator preference file using ActionScript 3.0

    Hi all,
    I want to get/set the flex panel components preference in illustrator preference file using ActionScript 3.0.
    I tried to achieve this  like --
    import com.adobe.illustrator.Preferences;
    var pref : Prefereneces = new Preferences();
    //To set value I used  this...
    pref.setStringPreference("url", id1.text);
    //To get value I used this..
    id1.text = pref.getStringPreference("url");
    i think there is prb in creating  Preference variable but I am unable to resolve.
    plz help.
    Thanks.

    I am having trouble with setStringPreference. It seems to be setting the value to 0 in the Prefs file. When I first wrote the code, it was working, but something is keeping it from saving the right value now. Did you get yours working? Any ideas?

Maybe you are looking for

  • Using multiple Apple ids for iTunes match

    Hi, I have one Apple id that I use for downloading music and apps on both iTunes and my ios devices, as well as itunes match. I have another that I use for for icloud. My iTunes match subscription is due to expire and I want to use my icloud apple id

  • Error While Trying To Video Chat

    Okay, i have read most of the posts about this problem and i can't seem to fix my error. If someone could take a look at this and let me know what i should do, i would really appreciate it. Date/Time: 2009-03-01 20:25:02.831 -0500 OS Version: 10.5.6

  • Why some photo in Photos is linked to iPhoto only?!

    Hi and tnxs for reading. While testing some ways to manual backup my photos from Photos, I got a caution msg from Photos in relation to 2 out of 300 album I have. This msg was stating that some photos cannot be exported since they are linked to iPhot

  • JTable in JComboBox

    if any one has got a code for displaying more then one column in JCombobox(i.e JTable in JComboBox) plz. send to this mail id :- [email protected] Hope this helps. Regards, chandru

  • A strange behaviour throwing Threads via anonymous class technique

    Hi friends! I've noted a strange behaviour executing the next code: public class ResolAnonimes      private int value;      public ResolAnonimes(int value)           this.value = value;      public ResolAnonimes myMethod(int nThreads)           final