Embedding swf into HTML+JS AIR app

Hi
I'm trying to embed swf into HTML+JS AIR app with no luck.
First, I created flash library with this class in default package.
package
     import mx.controls.Alert;
     public class Utilities
          public function Utilities()
                         //asdfasdf              
               Alert.show("asdasd","");
Then I compiled the project with Flash Builder and got library.swc as result. Then I extracted swf file.
After this is added required code into my html:
<html>
<head>
    <script type="text/javascript" src="AIRAliases.js"></script>
    <script type="text/javascript" src="AIRIntrospector.js"></script>
    <script type="text/javascript" src="jquery-1.6.2.js"></script>
    <script src="library.swf" type="application/x-shockwave-flash"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            alert('loaded');
            air.Introspector.logError("aaa");
            var v = new runtime.Utilities();
    </script>
</head>
<body>
</body>
</html>
Then after I run application, I get error that result of expression is not constructor, function etc.
Could you help me please?  Thanks in advance.
Here is sample code:
http://depositfiles.com/files/jztpnlb3a

No. I mean that the Flex framework makes certain assumptions about the environment it is running in -- like having a stage to work with. The Alert function, for example, works by creating a sprite and adding it to the Flash display list. Since your embedded SWF is not on a stage, there's no way for it to work.
You can can possibly use certain non-visual parts of the framework, such as the rpc package, but I can't guarantee it.

Similar Messages

  • Re: embedding SWF into HTML

    I don't seem to be able to add to the discussion! Hans wanted the url of the file that works: http://claudinegrandjean.com/Me.- html this is the one that doesn't please forget the placement of the SWF I could fix it if it worked; Cheers, Claudine

    No. I mean that the Flex framework makes certain assumptions about the environment it is running in -- like having a stage to work with. The Alert function, for example, works by creating a sprite and adding it to the Flash display list. Since your embedded SWF is not on a stage, there's no way for it to work.
    You can can possibly use certain non-visual parts of the framework, such as the rpc package, but I can't guarantee it.

  • Embedding SWF into HTML

    Hi. I am trying to make a SWF open a new browser window when
    it is clicked, acting as a Splash page that opens the main page. I
    want the main page to open in a new window 800 x 600 with none of
    the address bar, toolbars etc. I've managed this but there are
    three problems:
    1. The little grey strip at the bottom that says "Done",
    "Internet" etc, I think its called 'Status' still appears even
    though I've set status to no.
    2. The code I've used in flash to spawn the new browser
    window works with Firefox but not with Internet Explorer.
    3. The SWF's play slower in a browser.
    I have included the code I've used below. Can anybody help?

    Hello Claudine,
    to .ste (I tried to translate from my German library): The file extension ".ste" characterizes the site definition files of DW. A ste file is an XML-based text file which contains information about a DW made site. These include the site name, the site address and the server model.
    ste files can be imported and exported by using (translated from my German DW:  'Site -> Sites verwalten' ) 'Site > Manage Sites'. Please note it's a settings file and not a backup.
    What concerns the embedding problem: Please send a link to your website in question, no matter how it looks like , so we can better analyze.
    Hans-Günter

  • HTML-based AIR app with transparent UI, shadows, etc.?

    I'm debating on whether to use Flex or HTML/Ajax for a widget
    in a project. If I make an HTML-based widget, is it possible to
    have UI tricks like shadows and transparency, basically, NOT being
    confined to a standard OS "box" window? Is this possible?
    Thanks.

    Yes it is possible to do this with an HTML-based AIR app.
    However, since the visual elements will be HTML-elements, not
    display objects, you can't use the Flash APIs for shadows and
    transparency. Also, in a transparent window, SWF and PDF content in
    HTML cannot be displayed.

  • HTML based AIR app with transparent background (PNG)

    Hi guys,
    I have been developing a VERY simple HTML / JavaScript AIR app with Dreamweaver CS3 and Photoshop CS3.
    I have skinned the app with a simple transparent PNG file (Photoshop > Save for Web and Devices). I have set the PNG as the <body> background-image via CSS and the body background-color is undefined. I have also set the app to:
        <systemChrome>none</systemChrome>
        <transparent>true</transparent>
    My problem is that I get a white opaque background showing through behind / around the PNG.
    Q: Is it possible for HTML / JavaScript AIR apps to have transparent backgrounds (I have seen lots of info about how to do this in Flash / Flex but not HTML)?
    Q: What do I need to change or do to make it work?
    Many, many thanks,
    B

    Oops, sorry.
    I was using the BluePrint CSS Framework and it turns out that that was setting a background color.
    Please ignore this thread!

  • Convert HTML/javascript AIR app to flex-based AIR app?

    Hi all,
    I've already built an AIR app using HTML/javascript that I
    would like to monetize.
    I would like to use O2app's E-Commerce framework, which right
    now only supports Flex-created AIR apps.
    My question: Is there a simple way to "convert" an
    HTML/javascript AIR app to Flex 3 format? I'd rather not have to
    rebuild the app from scratch in Flex 3 if I don't have to. :)
    Thanks,
    Al

    Hi,
    There's no simple way to convert an HTML AIR app to flex.
    But it is possible to create HTML Root windows from a Flex
    AIR App. By root window, I mean the same kind of window that is
    launched when you launch an HTML AIR App.
    For more info, look at the HTMLLoader.createRootWindow()
    call. (This will be available from a Flex AIR app as well)

  • Can I run an html/javascript AIR app on Android or iOS?

    Is it possible to compile an already-existing HTML/javascript app to install/run it on any mobile OS (Android or iOS, in particular)? I haven't found anything that says it's possible, only instructions for doing it with a Flash/Flex based AIR app.
    I have a large html/javascript app, with a lot of value put into it, and my client would like to be able to package it for use on tablets. Ideally, I'd like to be able to not only have it run there, but also be able to "hide" the html/js code from prying eyes, if there's a way to do that.
    Thanks much in advance... I've done considerable research trying to get an answer to these questions.
    - Jack

    Hi Ross,
    the certificate used for APK files is a self-signed one so at this point, no need to use Google Console yet.
    See http://helpx.adobe.com/digital-publishing-suite/kb/publishing-process-android-amazon-mobil e.html (Create a certificate file using Keytool)
    Testing is only a matter of installing the APK file on the device where you should be able to test.
    The Android developer account will be useful for testing if you have in-app purchases matching 'retail' folios.

  • Flash in HTML-based AIR app: Urls do not open

    Hy there
    Like the title states, I have a HTML-based AIR application, which embeds flash. This flash opens Links which should eventually open the default browser. For this I previously had to set the following property in my AIR application:
    window.htmlLoader.navigateInSystemBrowser = true;
    Like this the URL calls were forwarded to outside the application and then opened the webbrowser. We had successfully tested this on various systems.
    However, now there are users of our application, who report that on their system (Including WinXP Professional SP3!) the websites do not open at all. When clicking on a link inside the app nothing happens.
    Their system:
    Hardware: Lenovo IdeaPad S12
    Windows XP Home Edition v2002 Service pack 3
    IE 7 (Version 7.0.5730.13)
    Firefox 3.5.7
    I had a look at the system and things like switching the default browser or re-installing Firefox did not work. Unfortunately this is a critical issue and kinda urgent so any help would be greatly appreciated. Thanks very much.

    Thank you for reporting back and letting us know.
    Chris

  • Embedding Swf into to forum signature

    Hi, i have been trying to find this everywhere but no good.
    How can i embed swf into forum Posts and signatures ? Its my site s
    o i change settings etc.....is there some mod that should be
    installed on the forum ? Any help at all would be really
    appreciated =)
    J

    No. I mean that the Flex framework makes certain assumptions about the environment it is running in -- like having a stage to work with. The Alert function, for example, works by creating a sprite and adding it to the Flash display list. Since your embedded SWF is not on a stage, there's no way for it to work.
    You can can possibly use certain non-visual parts of the framework, such as the rpc package, but I can't guarantee it.

  • White box of death! Trouble embedding swf into Dreamweaver!

    So close to being finished! I notice this question on alot of other forums but its never resolved!
    here is the site now:
    http://http://www.andrewweeksphotogr...m/index_8.html
    you will notice a slight flash of a white box before the preloader starts, i'm trying everything to make it go away! this box seems to be the same size as my embedded swf. the site and preloader are all in one swf. all i need to do is make that white box the same color as the background so it is unnoticeable.
    here is the code from dreamweaver (you'll notice im sticking in color values wherever i can!)
    help a gal out! many thanks!
    -nicole

    oops! code / site link here!
    http://www.andrewweeksphotography.com/index_8.html
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body {
        background-color: #FBFCEB;
    -->
    </style>
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    </head>
    <body>
    <table width="1150" border="0" align="center" cellpadding="10" cellspacing="0" bordercolor="#FBFCEB" bgcolor="#FBFCEB">
      <tr>
        <td bordercolor="#FBFCEB" bgcolor="#FBFCEB"><script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','1150','height','768','src','Andrew Weeks Photography','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','Andrew Weeks Photography' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="1150" height="768">
          <param name="movie" value="Andrew Weeks Photography.swf" />
          <param name="quality" value="high" />
          <param name="bgcolor" value="#FBFCEB" />
          <embed src="Andrew Weeks Photography.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1150" height="768" bgcolor="#FBFCEB"></embed>
        </object></noscript></td>
      </tr>
    </table>
    </body>
    </html>

  • HTML/ Javascript Air App as Screensaver

    I am trying to find out how to use a Air app developed using HTML/ JS as a screensaver. All the information I have found has been in other dev platforms, ie flex or AS, and I am unable to translate it to what I am doing.
    Any help pointing me in the right direction as far as docs/ api's to read would be greatly appreciated.
    Thank you in advance for your help.

    There's no direct support for creating screensavers with AIR. (Now if you are talking about a fullscreen application, that is, of course possible -- look at the Stage displayState property in the ASLR: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Stage.htm l#displayState -- but that's not really a "screensaver" per se.)

  • Printing HTML from AIR app

    What are the general rules to print an html content from an AIR application to make sure that the printout looks the same as printing it from the browser?
    Thanks

    Hi,
    This link might help you:
      http://dryicons.com/blog/2008/04/26/multiple-page-printing-from-a-html-adobe-air-applicati on/
    Thanks and Regards,
    Kanchan Ladwani | [email protected] | www.infocepts.com

  • Transparent background for embedded swfs (not html)

    i'm bringing external swfs into my main movie and would love
    for the content of these to be visable without haveing a flat
    colour background. is this possible?
    thanks.

    Morgan McConnell;
    You may need to provide more info--loaded swf files do not
    contain
    "background" (stage color)... -Tom Unger

  • Problems with embedding swfs into Director 11.5

    Hello everyone,
    I am hoping someone can help me and please bear with me - I don't know a lot about director - I can do some Lingo and get around in the program to make things work.
    Right now I am working on an interactive presentation where the user can click a button to view an animation. I am using Director 11.5 for my presentation and have made my animations in After Effects CS3 -- from there I converted my .mov files to .flv files using the Adobe Media Encoder CS4... then I took my .flv file into Flash and published it as a swf file.
    The problem that I am having is that when I play the presentation (within Director and after publishing the .app/projector file) the swf files are playing - but there is all this glitchy-artifact stuff all over them. Does anyone know why this would be happening? When I play the swf files in the flash player they look great. Before, when I was using Flash MX and Director MX, I never had any problems with embedding my swf animation files - and they played great - without any artifact. Any and all help would be much appreciated as this project is due in the next few days and I would prefer to figure out a solution rather than uninstalling Flash CS4 and Director 11.5 - and going back to MX.
    I toyed with the thought that my video card isn't good enough but I tested the .app file on another machine and the glitchy-artifacts were still there. I have attached a jpg showing the artifact that appears.
    I am running Mac OS X 10.5.7
    Dual 2 GHz G5 PowerPC
    ATI Radeon X800 XT
    Thank you!

    Sorry... here is the image again and I think the problem might be my machine -- it is very old (~4+ years) and when I tested my .app on a newer intel mac here it worked fine... but maybe I am missing something -- it seems odd that I can see the swf fine in flash player but it is glitchy when played through director or the .app projector file

  • Embedding swf into Flex Desktop Application size/scale problem.

    Hello,
    I am embedding an swf animation into my desktop Flex desktop application. I am using SDK 4.6.0. I use the SWFLoader to embed the animation:
    <s:SWFLoader source="img/mch_anim_1.swf"/>
    When I run the application, the animation is loaded and is working, but when I try to maximize the window there is a size/scale bug that happens. The screen  stays half-side maximized (maximized to the top, bottom and stays until the middle of the screen by side).
    I've published the SWF for Flash Player 8 and Actionscript 2 just to test and there was no problem with the size/scale, but I need to use Actionscript 3.
    Any suggestions?
    Thanks in advance,
    Stefan

    I found the problem!
    There was a line of code that was auto-generated from using a template out of Flash CS6. The line of code that caused it is:
    stage.scaleMode = StageScaleMode.SHOW_ALL;
    After deleting it, everything is now working properly.
    Greetings!

Maybe you are looking for

  • HT204053 I am using my apple ID on multiple devices

    I am using my apple ID on multiple devices, i.e. 3 iPhones, 4 iPads, MacAir, MacPro etc....Up until today we have been able to use FaceTime on any device to contact each other. Today for some reason we can no longer faceTime each other from any of ou

  • Can't find photo gallery in files

    I want to transfer/copy my photos and videos from my internal storage on my Razr Maxx HD. When I go into files, I don't see them anywhere! I have photos from messaging, but not the photos/videos that I took with my phone.

  • User roles property, when system alias is configured in universal worklist

    Hi, I am configuring system alias in Universal Worklist Configuration.  I have keyed in system alias and connector type and saved the system alias and its working fine. Apart from system alias and connector type, there are other properties like "User

  • How to view local PHP files with my browser?

    I want to learn PHP and be able to view files I create (stored in my documents folder) by my browser. I read I'd have to get into Apache via Terminal and make some changes to be able to view PHP. I took a look inside and ran across warning comments,

  • I want to disable parallax but keep the Animations on 7.0.3?

    I got the new iOS 7.0.3 and I want to disable parallax. On 7.0.2 I would enable reduce motion and it would turn of parallax. Now when I turn on reduce motion it turns off parallax AND the animations. How can I ONLY disable parallax and not the animat