Flash javascript and Activecontent code

I've got an animated chatbot that uses a variety of swfs and
phps and a big external JavaScript to work. It works fine with the
old style embed and object code, with the same variety of swfs and
phps and external JS.
But when I try to use the
<script src="AC_ActiveX.js"
type="text/javascript"></script>
<script src="AC_RunActiveContent.js"
type="text/javascript"></script>
and I code the main Flash piece like this:
<script type="text/javascript">
AC_FL_RunContent( 'codebase','
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0',
'width','540','height','360','swliveconnect','true','src','whinbarnexp','quality','high',' pluginspage',
http://www.macromedia.com/go/getflashplayer','movie1','whinbarnexp'
</script>
The above broken into lines to make more readable here.
but when I run it it doesn't work right, and the error
console advises:
"movie1 has no properties."
and points to the first line of the big function in the
JavaScript "brain" of the chatbot:
shesaid=movie1.GetVariable("coder")
What am I doing wrong? It's got to be within this code since
the same "brain" file works fine with old style object/embed
coding.

Sorry Dan,
This has got nothing to do with the question I asked.
I know about the Microsoft "patch" and have already allowed
for it.
@ndyB
"-->dan mode" <[email protected]> wrote in
message
news:e3ag7h$oob$[email protected]..
> Read this:
>
http://www.smithmediafusion.com/blog/?p=114
>
> Then, here is a simple way.
> You need to do three things and I will give examples as
follows.
>
> 1. all of the <object> tag must be taken out and
put into a .js file and
> placed within a function where you document.write the
<object tag>
> 2. you must include that .js file in the header of the
html where the swf
> resided
> 3. call the js function from step 1
>
>
> --Here is a sample of Step 1, save this file as
commFile.js:
>
> function commM()
> {
> document.write('<object
> classid="clsid
27CDB6E-AE6D-11cf-96B8-444553540000"
> codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
> width="410" height="345">\n');
> document.write('<param name="movie"
value="/mySWF.swf">\n');
> document.write('<param name="quality"
value="high">\n');
> document.write('<embed src="/mySWF.swf"
quality="high" +'"
> pluginspage="
http://www.macromedia.com/go/getflashplayer"
> type="application/x-shockwave-flash" width="410"
> height="345"></embed>\n');
> document.write('</object>\n');
> }
>
> --Here is a sample for Step 2, put this in the head of
your html page:
>
> <script src="commFile.js"
type="text/javascript"></script>
>
> --Here is a sample for Step 3, place this code on the
spot of the page
> where
> you want your flash to show up:
>
> <script
type="text/javascript">commM();</script>
>
>
> That should be all you need.
>
> --
>
> Dan Mode
> *Must Read*
http://www.smithmediafusion.com/blog
> *Flash Helps*
http://www.smithmediafusion.com/blog/?cat=11
>
>
>

Similar Messages

  • Flash, Javascript and Internet Explorer

    This is driving me nuts...!!!!!! It works in Firefox but not
    Internet
    Explorer.
    I've got a load of gifs on a page that I want to swap from a
    Flash movie
    using a loop.
    This is the Javascript I'm using:
    function blankAll(x){
    document[x].src="images/splash-link-arrow.gif";
    And I'm calling it in Flash using the following action
    script:
    function blankOut(){
    for(x = 1; x <= _root.allBranches.length; x++){
    getURL("javascript:blankAll('"+ _root.allBranches[x-1]
    +"')");
    allBranches being an array containing a list of the gif names
    to swap.
    Like I say, in Firefox this works like a dream, but in
    Internet Explorer it
    only swaps the very last gif on the list........ WHY?
    Can anybody help please?
    Big thanks in advance,
    @ndyB

    Sorry Dan,
    This has got nothing to do with the question I asked.
    I know about the Microsoft "patch" and have already allowed
    for it.
    @ndyB
    "-->dan mode" <[email protected]> wrote in
    message
    news:e3ag7h$oob$[email protected]..
    > Read this:
    >
    http://www.smithmediafusion.com/blog/?p=114
    >
    > Then, here is a simple way.
    > You need to do three things and I will give examples as
    follows.
    >
    > 1. all of the <object> tag must be taken out and
    put into a .js file and
    > placed within a function where you document.write the
    <object tag>
    > 2. you must include that .js file in the header of the
    html where the swf
    > resided
    > 3. call the js function from step 1
    >
    >
    > --Here is a sample of Step 1, save this file as
    commFile.js:
    >
    > function commM()
    > {
    > document.write('<object
    > classid="clsid
    27CDB6E-AE6D-11cf-96B8-444553540000"
    > codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
    > width="410" height="345">\n');
    > document.write('<param name="movie"
    value="/mySWF.swf">\n');
    > document.write('<param name="quality"
    value="high">\n');
    > document.write('<embed src="/mySWF.swf"
    quality="high" +'"
    > pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    > type="application/x-shockwave-flash" width="410"
    > height="345"></embed>\n');
    > document.write('</object>\n');
    > }
    >
    > --Here is a sample for Step 2, put this in the head of
    your html page:
    >
    > <script src="commFile.js"
    type="text/javascript"></script>
    >
    > --Here is a sample for Step 3, place this code on the
    spot of the page
    > where
    > you want your flash to show up:
    >
    > <script
    type="text/javascript">commM();</script>
    >
    >
    > That should be all you need.
    >
    > --
    >
    > Dan Mode
    > *Must Read*
    http://www.smithmediafusion.com/blog
    > *Flash Helps*
    http://www.smithmediafusion.com/blog/?cat=11
    >
    >
    >

  • Newbie problems installing Flash 11 and windows 7/SWF issues-PLEASE HELP!

    I am VERY new at Dreamweaver (llike four days in) - my church has a website & they need someone to take it over so I'm trying to help out while teaching myself something new.
    I was doing okay til now. I downloaded a free template to play with so as not to mess up their real site just yet. I was able to get the majority of the site up except for the top part with flash. Error message says: &quot;this page contains some SWF objects that may not work properly in the most recent versions of IE. Dreamweaver cannot convert them to SWF markups. Please delete each of them and insert again&quot; This mesage comes up on the index.html, index-1.html, and index-2.html pages.
    I deleted & re-typed everything that had an SWF in it (then realized maybe I only needed to do the ones with the .swf extension, duh on me!) but I'm still getting a gray box with the &quot;f&quot; inside.
    Additionally, I keep having to re-install Flash because it says I have to use version 10 or higher - the browserlab worked during the online lessons offered by Adobe, but now it won't work at all! I installed Flash 11 more times than I can count but it still won't work, yet when I go to my Programs flash it's installed twice - once as a 64 bit and once without. I'm assuming one of those can go.
    I'm familiar with HTML and have created smaller websites using templates on sites like Yahoo Business, Wix and Office Live and thought I could handle this, but it's really stumping me, thought there'd be a learning curve and trial/error but WOW! Much respect to all you web designers out there, this stuff is no joke!
    If anyone could please help me fix this problem and dumb your answer down as much as possible cuz I'm admittedly very lost! I'm worried that I'll have the same problem with the church site because they want some flash aspects. Did several internet searches & couldn't decipher the programmer jargon, nor could figure out if I was doing the suggested fixes correctly.
    Thanks in advance for the help from anyone! I have a brand new computer, dell xps15 only 3 weeks old, so it's not the computer!
    Anne

    FYI:  Dreamweaver questions are better answered in DW's General Discussion Forum.
    http://forums.adobe.com/community/dreamweaver/dreamweaver_general?view=discussions
    Older versions of DW used an Active-X JavaScript to initialize Flash in IE browsers.  Adobe later switched to a different script in CS4 and again in CS5 and CS5.5 which uses SWF Object Replacement.  I suspect your Template was made with an older version of Flash & DW which is why you're getting the nag screens. 
    Option 1:   Preview the original template pages in browsers.  If it works,  ignore the DW error messages.
    Option 2:  Rebuild the Template by stripping all Flash object and embed code and removing links to any Flash supporting scripts.  Then re-insert your media.  Insert > Media > Flash...
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • How to optimize portal javascript and css - where is scriptset property ?

    Hi,
    I've downloaded <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d164c5ee-0901-0010-4fbf-d0856b5c8a84">How to Finetune Performance of Portal Platform</a> document,
    which contains portal performance optimization tips.
    In this pdf file there is a section about optimizing javascript and css code by using
    scriptset  property and there is also appropriate reference to the help.sap.com portal page.
    The problem is that this page is not there so I'm unable to configure this scriptset property.
    Any ideas where can it be found?
    Regards,
    Ladislav

    yes - go into System Adminstration --> System Configuration and then Service Configuration (in the detailed Nav).
    In there, find application com.sap.portal.epcf.loader - In Services --> epcfloader the property you seek is script.set and you should change from standard to optimize.  Then you need to restart the service.
    Hope that helps
    Haydn

  • Testing the water on possible Flash Professional and Flash Builder integration

    Hey,
    I just wanted to throw this out here instead of the bug area to see if I'm off my rocker or I'm on to something.
    Basically one of my major pains is that any application design I do, I do it in Flash Pro and I code in FB. Switching back and forth between apps just to press CTRL + ENTER seems like a) a waste of time and b) a waste of system resources.
    So what I'm proposing is having FB integrate with FLA files.
    When you create your product you have the option to specify a target FLA (or multiple with a build order) so that when you test your project it will actually build your FLAs in order (in the situation that the final SWF requires others) and you're off to the races.
    You could also have the currently associated FLA files have a checkbox next to them which could temporally disable them for a build.
    If you still need to make design tweaks later on, it's a mater of opening Flash and doing them, but it would be so slick to be able to have FB render the FLA for you in the same app (no more random CTRL+ENTER in FB anymore!)
    As far as where it could go. I think it would work the best if it was just a new tab that could be added to the perspective. Would allow drag+drop of FLA files to it, drag+drop ordering and also have the checkboxes to disable any FLAs from the build.
    So there we go, does that sound like a decent workflow?
    Cheers!

    Hi guys,
    Have you considered Testing the water on doing your design work in the new Flash Catalyst software http://labs.adobe.com/technologies/flashcatalyst/ for your skins instead of Flash CS4.
    You would be able to export directly in the new FXG format and integrate it directly in your FB4 coding.
    There is a tremendous productivity potential gain there.
    I am planning to abandon eventually completely Flash CS4 for both design  and coding and substitute it eventually by simultaneously working in FB4(coding) and Flash Catalyst(design) with input symbols directly linked to photoshop and illustrator related files.
    For those of you who would like to wet their toes  and initiate  a quick dive, Lynda.com has already released, on june 11,  an 1h40 min course on this subject. Here are the details.
    Length: 1 hour
    Online Training Library® exclusive!
    Flash Catalyst Beta Preview
    with: Mordy Golding
    Flash Catalyst is a new Adobe application that is currently in beta and available for downloading atlabs.adobe.com, that allows designers to quickly create interactive Flash content and rich internet applications without having to write a single line of code. In Flash Catalyst Beta Preview, Mordy Golding demonstrates a workflow that emphasizes the intuitive nature of the tool, and shows how to achieve results in a short time. Meant to bridge the gap between designers and developers, Flash Catalyst allows the designer to work with familiar applications, such as Photoshop and Illustrator, while automatically generating the necessary code in the background for the developer. Exercise files accompany the course.
    Topics include:
    Creating interactive content from Photoshop and Illustrator design compositions
    Turning ordinary graphics into functional components like buttons and sliders
    Using smooth transitions and animation techniques
    Moving content between Flash Catalyst and Flash Builder
    Declarative Graphics
    Flex 4 will make good use of FXG, the new graphics interchange format used with the CS4 graphics applications. Flex 4 and Flash Player 10 can together render FXG graphical elements. These include:
    graphics and text primitives
    fills, strokes, gradients, and bitmaps
    support for filters, masks, alphas, and blend modes.
    FXG graphical elements can be used in Flex 4 in a number of ways. FXG elements can be used within an MXML file or component and can also be saved as an .fxg file format. The CS4 tools will typically export an FXG using the FXG 2008 namespace. Because these files are designed to be shared between graphical applications, you’ll find that they have a stricter format to what’s used in Flex; the Flex compiler will only use the FXG-specific tags. Adobe’s new application, Flash Catalyst, will make it easy to create FXG graphics compatible with Flex 4, which you can then use to complete your application’s user interface and appearance.
    New effects have been added to Flex 4 that can also be applied to FXG graphical elements. These new effects will work on both new and old components alike. Standalone effects must now be declared within fx:Declarationstags instead of the body of the application. Once again, Flash Catalyst has additional tools to help make using these effects easier.
    Ref:http://www.sitepoint.com/article/whats-new-flex-4/ by Andrew Muller

  • How to insert a shoutbox and a counter in a flash file with html code?

    How to insert a shoutbox and a counter in a flash file with
    html code?
    Code shout box
    <!-- BEGIN MYSHOUTBOX.COM CODE -->
    <iframe src="
    http://489676.myshoutbox.com/"
    width="152" height="300" frameborder="0"
    allowTransparency="true"></iframe>
    <!-- END MYSHOUTBOX.COM CODE-->
    Code compteur
    <script type="text/javascript" src="
    http://www.123compteur.com/counterskinable01.php?votre_id=268303"></script><noscript><a
    href="
    http://www.123compteur.com"
    target="_blank">compteur</a></noscript>

    thx =D

  • Flash CC to canvas and spreading code over several frames

    I know about the relationship between flash and CreateJS, and I know that I could step away from the flash interface for A LOT of what I'm after and simply use it to create a nifty library of assets and have all my javascript as external files. That's not what I'm after (although using a text editor with proper syntax highlighting would be wonderful!). I wish to keep as much of my workflow as possible inside of the Adobe Flash CC interface.
    The question comes in two parts, the second being a followup question:
    1) Where I before used to save code in external as files, since now the external javascript gets created (combined) when publishing the flash project, I thought I'd better keep all my code inside of flash. Is this a mistake? I'm after ease of use and keeping my projects structured.
    2) If I keep my code inside of flash I'd never nest it in movieclips. I'd keep it all on the main timeline strictly. Back in the golden flash days for decent but smaller apps I'd put general helper functions and imports on the first frame, then maybe some preloading graphics on frame 2 with minimal code for that. Finally "the app" on frame 3 with more specific code to manage the interface. This made everything load quickly and I could spread the app functionality naturally over a few frames to make it easier to visualise and manage. But exporting for canvas/javascript I can't even get code on one layer to recognise the functions on another. Do I really need to scope main timeline functions on creation to get it to work?
    I'm really after basic advice on workflow and project structuring.
    Thanks!

    1) that's a strange question considering you prefaced it by saying you want to keep everything in flash.  so yes, given that requirement (ie, you want to put everything, if possible, in flash), put all your code inside flash.
    2) you need to scope everything. there's no problem (from flash/exportJS) spreading code over different frames/layers, if that's what you want to do.  you probably just need to be more careful with your scoping if think code in one layer won't recognize functions in another layer.  ie, in your top layer, use:
    var tl = this;
    // and then use tl to reference the main timeline in your functions (and elsewhere).

  • If WDA will be able to call a Flash island, and Flash can call javascript

    In this thread here:
    How would/should you invoke a javascriptable applet from WDA or WDJ?
    Thomas said that an upcoming release of WDA will let WDA call Flash "islands".
    Since this link:
    http://www.adobe.com/devnet/flash/articles/external_interface.html
    says that Flash can invoke javascript,  won't it be possible for WDA to call an applet indirectly by calling Flash and letting Flash call the applet ?
    djh

    Anton -
    I asked Thomas Stout to describe exactly what he's doing with Flex and JMol, and I'm posting his response just to be sure that there is no way (other than the portal) of duplicating what he is doing using WDA.
    Here's his response:
    Backend (linux):
    - we have a "database" of crystal structures in flat-file directories (for example,
    weekly rsync's from the PDB)
    - we parse those with perl scripts into an XML table with tagged data that we
    feel is relevant
    Flex:
    - the Flex app is constructed to load that XML file and display the data in a
    table.  We exported that code from Flex into an HTML table, which provided
    the basic page with a Flash movie of the Flex app embedded (See the attached
    screenshot from a development version of our web page: it's the horizontal
    rectangle at the top of the page).
    webpage:
    - we then built of the Jmol functionality into the lower half of this web page.  The
    table entries at the top are sortable on any column and filterable via the text
    box.  Once a line in the table is selected, the "Load" button passes the
    accompanying structure to the Jmol applet and all of the Jmol "tools" become
    active in the lower half of the page.   There is no communication in the reverse
    direction (can't think of why you would want to!).
    - BTW, the web page does not use "frames" -- I'm personally opposed to them --
    but it is all constructed within a table.  The Flash movie is in a table cell that
    spans two columns, the Jmol app is down a row and in the left hand (wider) cell,
    while the selectable links on the right are all in the right-hand cell.  The page is
    an amusing gmisch of HTML, javascript and JmolScript all fighting it out
    together.....    :)

  • I am trying to save a custom code snippet in Flash CC and it does not save, any ideas why?

    I am trying to save a custom code snippet in Flash CC and it does not save, any ideas why?  I am using Windows 8.1 with Flash CC.
    I even when into the "Edit Code Snippet XML" and added a Custom folder and a custom template.  Then I went back to add the code snippet again and it still did not work.
    About line 32, I added:
       <category title="Custom"
          isBranch="true" expanded="false"
          description="Code for common interactions">
          <snippet isBranch="false">
          <title>Custom Snippet</title>
          <description>This is an example of a custom code snippet.</description>
          <requiresSymbol>true</requiresSymbol>
          <code><![CDATA[
    // Code goes here
    trace("A custom code snippet");
          ]]></code>
        </snippet>
        </category>     
    Any assistance would be greatly appreciated.

    UserAgent for the OP is - Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100405 Namoroka/3.6.3 - he might be running a 64-bit 3rd party build.

  • Can I import binary in Flash CS5 and export swf, without AS code likes "Embed" ?

    Can I import binary in Flash CS5 and export swf, without AS code likes "Embed" ?
    I know I can use AS code,likes "[Embed]" metadata to embed binary in swf. But , how can I do that in Flash CS5 ?

    Have a look at this: http://stackoverflow.com/questions/7816231/how-to-use-as3-to-load-binary-data-from-web-ser ver

  • Javascript and Flash Forms

    I am trying to do some Javascript with a Flash Form and it is
    failing. I have a field with a value in the field name so I dont
    have to use labels. I know with Javascript that onFocus, the field
    will clear. Is that possible in a Flash Form.
    Don

    Use actionscript, like so
    <cfinput type="Text" name="txt_box" value="Initial Value"
    onFocus="txt_box.text=''">
    For readability the onFocus is
    " txt_box.text = ' ' "
    Ken

  • Javascript and Flash AC fix

    I'm in the process of upgrading an older site with Flash
    content and have run into an issue with the Active Content 'fix'
    script.
    I have a Flash movie that pauses on load and only plays when
    the user clicks an HTML page button which triggers the Play()
    action via JS.
    If I allow DW8 to implement the AC code fix, this then
    prevents the Flash movie from responding to the JS event.
    Can anyone please advise what changes I should make to my JS
    code in order to target the movie correctly with the AC fix
    implemented?
    My current JS event code is as follows (which works OK
    without the AC fix):
    onClick="window.document.myMovie.Play();"
    All advice gratefully received!

    Use actionscript, like so
    <cfinput type="Text" name="txt_box" value="Initial Value"
    onFocus="txt_box.text=''">
    For readability the onFocus is
    " txt_box.text = ' ' "
    Ken

  • Flash Player and JavaScript

    Hi,
    I am the creator of the
    Virtual Cutter.
    This is a website that can be used to create clips and playlists
    for a large number of streaming video formats, and currently
    supports the Windows Media Player, Real Player, Quicktime Player
    and Kasenna Broadband Player. I am now looking to support the Flash
    Player as well, or, more accurately, Flash-specific file formats
    such as swf and flv.
    As I am not a Flash programmer and do not know much about
    Flash files, I hope to find answers to the questions I have about
    this issue in this forum.
    To use the architecture of the Virtual Cutter, I need to
    access the Flash Player using JavaScript.
    1. Is there a JavaScript function to get the current position
    of the videofile? Something like flashplayer.getcurrentposition
    2. Is it possible to add buttons to start, stop, pause,
    rewind the file?
    Off course, to play a clip, it must be possible to play a
    file from any position in the file. The Virtual Cutter therefore
    generates (depending on the player) an .asx, ram or.smil file, that
    contains parameters for start point and end point/duration.
    3. Is there a similar file format that I can use to play only
    a selection of the Flash file?
    4. Is is possible to create a playlist, so a sequence of
    clips can be played?
    5. What Flash-specific file formats could be processed?
    The Virtual Cutter is an Open Source project. If anyone is
    interested in working together on this, please contact me.
    Best wishes,
    André Rosendaal

    No Flash for iPads, iPhones, or iPods
    Here's why there's is no Flash available for iDevices or other mobile devices. Adobe was unable to provide a product that was suitable to the needs of battery powered mobile devices used for Internet browsing. Existing Flash technology used too much memory, ate battery life, and was buggy. Simply put Flash did not work well on mobile devices.
    Apple's Steve Jobs led the escape from Flash dependency when Apple introduced the iPhone, and later introduced the iPad. There was a hue and cry over the omission. Time proved Jobs was right on target.
    So this is why there is no Flash for your iPhone or iPad or iPod nor for most SmartPhones. Flash has been abandoned by many sites in favor of supported technologies such as HTML5 or by providing their own custom app.
    Here is Steve Jobs official comment on his momentous decision to omit Flash from iDevices: Steve Jobs on Flash.
    Here is Adobe's later announcement to cease development of Flash for mobile devices: Adobe on Mobile Flash. Adobe is not providing Flash for Apple iOS devices, and they no longer provide Flash for any other cellular phones. Flash is officially gone.
    Now, you are not necessarily out on a limb. There are some apps that can display some Flash, but don't count on there ability to display anything using Flash.
    A sample of Apps that can display some Flash content:
      1. Puffin
      2. SkyFire
      3. Photon Flash
      4. Browse2Go
      5. Swifter
    Also, note that many sites that use Flash provide their own app for accessing their material. So check with your favorite sites and find out if "there's an app for that."

  • Javascript and adobe flash player is not being recognized on my school's webpage.

    The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Adobe Flash Player. If you are using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Adobe Flash Player by downloading here. At this point i have adobe flash player and javascript enabled. but firefox is not recognizing it.

    Your System Details list shows the Shockwave Flash plugin.
    *http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html
    Do you see a Lego block icon the at the left end of the location/address bar that a plugin is used on the page?
    *https://support.mozilla.org/kb/why-do-i-have-click-activate-plugins
    *http://kb.mozillazine.org/Issues_related_to_plugins#Click_to_Play
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I need a Sample Code about flash++.h and swc.

    hi,help me !
    i need a Sample Code about flash++.h and swc.
    my Sample Code bitmapdata.cpp:
    #include <AS3/AS3.h>
    #include <Flash++.h>
    using namespace AS3::ui;
    void gettpoint() __attribute__((used,
    annotate(“as3sig:public function gettpoint(x:Number,y:Number):uint”),
    annotate(“as3package:MyLibrary”)));
    void gettpoint()
    double xx;
    double yy;
    inline_as3( “%0 = x;%1 = y\n” : “=r”(xx) : “r”(yy) );
    flash::geom::Point p=flash::geom::Point::_new();
    AS3_Return(xx);
    int main()
    AS3_GoAsync();
    return 0;
    the compile command is “$(FLASCC)/usr/bin/g++” $(BASE_CFLAGS) -O4 bitmapdata.cpp -emit-swc=MyLibrary -o bitmapdata.swc -lFlash++ -lAS3++
    It took me ten minutes to compile,but it can’t work.why?

    Compiling a SWC using Flash++ will result in poor compiler performance if you are using the Flex SDK to compile that SWC into a SWF.
    To get better performance try using the new version of mxmlc that is shipped in the Adobe Gaming SDK.  (Note that this new version of mxmlc doesn't support Flex)
    You will need to install the Gaming SDK and then extract the archive in the "AIR SDK" folder.  Once that archive is extracted you'll notice the new mxmlc compiler in the bin folder.
    Unfortunately compiling a SWF seems to be a little tricky.  You'll notice in the sample Makefile below project that it changes directory into the bin folder before calling ./mxmlc.  Ideally you wouldn't need to do this (like how it worked with the Flex mxmlc).  I'll investigate why that is the case.
    Makefile:
    # Path to your FlasCC SDK folder
    $?FLASCC=/Users/stshongr/builds/alchemy/1.0.0/sdk
    $?GAMINGSDK="/Applications/Adobe Gaming SDK 1.0/AIR SDK/air3-5_p4_sdk_asc2_mac_112112/bin"
    # The folder the source files are in
    $?SRC_FOLDER=$(PWD)
    all:
              "$(FLASCC)/usr/bin/g++" MyLibrary.c -emit-swc=MyLibrary -o MyLibrary.swc -lFlash++ -lAS3++
              cd $(GAMINGSDK) && ./mxmlc -library-path=$(SRC_FOLDER)/MyLibrary.swc $(SRC_FOLDER)/demo.as -o $(SRC_FOLDER)/demo.swf
    clean:
              rm -f *.swf *.swc *.bc *.exe
    MyLibrary.c:
    #include <AS3/AS3.h>
    #include <Flash++.h>
    using namespace AS3::ui;
    void gettpoint() __attribute__((used,
                                    annotate("as3sig:public function gettpoint(x:Number,y:Number):uint"),
                                    annotate("as3package:MyLibrary")));
    void gettpoint()
        double xx;
        double yy;
        inline_as3( "%0 = x;%1 = y\n" : "=r"(xx) : "r"(yy) );
        flash::geom::Point p=flash::geom::Point::_new();
        AS3_Return(xx);
    int main()
        AS3_GoAsync();   
        return 0;
    demo.as:
    package {
        import flash.display.Sprite;
        import flash.text.TextField;
              import flash.events.Event;
        import MyLibrary.CModule;
        public class demo extends Sprite {
                        private var tf:TextField;
            public function demo() {
                addEventListener(Event.ADDED_TO_STAGE, initCode);
            private function initCode(e:Event):void {
                tf = new TextField();
                addChild(tf);
                // start the FlasCC library
                MyLibrary.CModule.startAsync(this);
                // call the function
                                  tf.appendText("OUTPUT:" + MyLibrary.gettpoint(2,2));

Maybe you are looking for