Can C++ Container Determine AS2 vs AS3

I have a C++ container of Flash Player 11 (I have also tried
Player 9 and Player 10). How can the container ask the player what
type of content it is playing (AS2 or AS3)?
If I create an event handler (ExternalInterface.addCallback)
in AS3 which returns true (depicting AS3), and call
m_FlashPlayer.CallFunction in my container, I am able to
receive/parse the ActionScript response ("<true/>").
However, if the content is "old" (i.e. AS2 which does not
have the necessary event handler) ... or if the content is AS3 and
I deliberately throw an exception (throw new Error("AS3 Error") in
my event handler) ... the C++ container has no way of
differentiating between AS2 or AS3. My container catches the
COleDispatchException, but there is no information within the
exception. Both scenarios result with an m_scError = 0x80004005
(E_FAIL).
Is there a prescribed way for a container to ask the
Shockwave player if it is playing AS2 or AS3 content?

You are confusing the Shockwave Player (which runs
Director-created
content) with the Flash Player

Similar Messages

  • AS2 with AS3 integration

    Hi.
    I have loads of games in AS2 but a freelancer is developping games in AS3. Can I use a container movie in AS3 and load both AS2 and AS3 games in. Otherwise I would have to update all games into AS3. Would all games have to be published to the same flashplayer? ie: FS7 etc...

    you can use an as3 swf to load as2 swfs.  if you need to communicate between the two swfs, use the localconnection class.

  • Use this As2 in As3

    Hello,
    i have this code
    var url = _level0.video;
    player.contentPath = url;
    this catch a url and load on flash player.
    this works fine in As2, but in As3 dont work.
    i use a converter As2 to As3 but the result is it:
    package  {
        var url = _level0.video;
        player.contentPath = url;
    i not a As programmer i only use video function on flash,
    my question is, how to use my code on ActionScript 3 ??
    Thank you !!

    Thanks for reply,
    the variable video i get from html and php.
    example:
    player.swf?video=<?php echo $_GET["video"]; ?>
    and the variable video i get from html
    <a href="index.php?video=video.flv"></a>
    ok, i discard a converter !!
    to use a contentPatch source of flash ?
    but i can load a external videos ??
    without ActionScript ?
    Thank you !

  • AS2 loading AS3

    Hi,
    If I target player 9 and use AS2 code I can load an AS3 swf,
    I presume that I cannot do anything with this, like poll for its
    frames etc. I won't go into the details of why I'm doing this but
    can anyone confirm that AS2 swfs cannot use an AS3 swf in any way?
    Thanks
    Neil

    that is correct - AS2 cannot use AS3

  • As2 and As3 on same Flash Player

    If i set AS2 codes to play in Flash Player 9, is it possible
    that this swf can load an As3 swf at the same Flash Player using
    As2 codes???
    These swfs both play in same virtual machine which is player
    version 9 but the other is coded with As2 and the other is coded
    with As3. How can an AS2 load a swf coded in AS3 on same Flash
    player?
    Is this possible?
    If yes, how? if no, why not?

    AS2 and AS3 swfs cannot exist in the same Flash Player
    virtual machine - each Flash Player instance (version 9 and
    greater) create different address spaces/virtual machines because
    the requirements of AS3 and AS2 are so different.

  • AS2 or AS3 + online Tut for beginners ?

    Hi All,
    Anybody can advise what is the easiest to learn for a beginner  : AS2 or AS3 ?
    I am trying to do a "liquid layout " in Flash and have found tuts either with AS2 or AS3. Though I am struggling to understand them and need to learn the basics either on AS2 or AS3.
    If you know aswell a good website teaching the basics step by step.
    Many Thanks

    if you invest the time in AS3 it will probably be pay off the most in the end. AS2 as mentioned earlier is a bit easier to get up and running with and for many years powered many a great flash experience, but its days are numbered.
    here is a very solid overview of AS3 in short easy to understand video tutorials.
    http://tv.adobe.com/show/actionscript-11-with-doug-winnie
    I would urge you not to rush. take it slow. watch the videos and try to apply each concept to your own project.

  • Help Converting AS2 to AS3 Drag and Drop Event

    Hi All,
    This is the second post on help for converting AS2 to AS3. This code is used in Captivate to allow a drag and drop action between two areas (User presses down, drags, and releases in a second area - They are not dragging any object). If anyone can help me convert this please let me know.
    Source for Drag and Drop: (Note: Single MovieClip)
    // pause the Captivate movie
    _root.rdcmndPause = 1;
    // when the user's mouse is let go check if there was a successful drop
    _root.onMouseUp = function(){
              // If the source area's center coordinate is nearby the destination area's center coordinate then advance the slide
              if ( Math.abs(_root.sourceX + _root.sourceWidth  / 2 + _root.sourceParentX - (_root.destX + _root.destWidth  / 2)) < (_root.destWidth  / 2) &&
                         Math.abs(_root.sourceY + _root.sourceHeight / 2 + _root.sourceParentY - (_root.destY + _root.destHeight / 2)) < (_root.destHeight / 2) )
                        _root.rdcmndNextSlide = 1;
              } else {
                        // show error movie clip for 2 seconds (60 frames at 30 frames per second)
                        _root.showErrorMessage = 60;
      mc.onEnterFrame = function(){
              // continuously update the source area's coordinates and size
              _root.sourceX = mc._x;
              _root.sourceY = mc._y;
              _root.sourceWidth = mc._width;
              _root.sourceHeight = mc._height;
              _root.sourceParentX = _parent._x;
              _root.sourceParentY = _parent._y;
    mc.onPress = function(){
              // Uncomment following line to have control click capabilities
              //if(key.isDown(Key.CONTROL))
              // when user clicks on the source area click start the drag
                        startDrag(this);
    mc.onRelease = function(){
              // stop drag when user releases the source area
              stopDrag();
    Source for Destination Area (Single MovieClip named destArea)
    // Set a root variable to control when the error message is displayed
    _root.showErrorMessage = -1;
    // Use setCoords variable so we only set the destination coordinates once
    var setCoords = 0;
    destArea.onEnterFrame = function(){
              if (setCoords == 0){
                        // set the destination x, y, width, and height
                        _root.destX = _parent._x;
                        _root.destY = _parent._y;
                        _root.destWidth = _parent._width;
                        _root.destHeight = _parent._height;
              // destination coordinates have been set, change setCoords so it doesn't get set again
              setCoords = 1;
    Code for the Error Message (Single MovieClip named errorMessage)
    // Don't display the error message initially
    errorMessage._alpha = 0;
    errorMessage.onEnterFrame = function (){
              // If the drag and drop method detects a missed drop
              // then show this error message by setting _alpha to 100
              if (_root.showErrorMessage > 0){
                        errorMessage._alpha = 100;
                        // decrementing this variable controls the time the
                        // error message will be displayed
                        _root.showErrorMessage--;
              } else {
                        // Don't display the error message
                        errorMessage._alpha = 0;

    use:
    MovieClip(parent.parent.parent).rdcmndPause=1;
    this.addEventListener(KeyboardEvent.KEY_DOWN,keydownF);
    function keydownF(e:KeyboardEvent):void{
    fscommand("KEYPRESSED", e.keyCode);
    if(e.keyCode==32){
    MovieClip(parent.parent.parent).rdcmndNextSlide=1;

  • AS2 or AS3

    Hello, i'm somewhat decent in flash. I know AS2, i started
    learning AS3 today and find it to be more complicated and has so
    many extra steps in coding. Number one thing i hate is having to do
    all the code on the timeline, it will get so full of code if i have
    several buttons/movieclips that need code, no way to do code when
    you click on the button/movieclip in AS3 unlike 2.
    Would it be dumb for me to continue to use AS2 and learn more
    of it, or should i keep trying to learn AS3..... I don't do super
    complex stuff, mostly timeline navigation and animations.
    I also feel like there is way more room to make errors in 3
    because you have to type everything unlike AS2 where i was able to
    use the actions frame (use that plus tool that had the drop down
    menu).

    I'm in the same position, just starting to move from
    intermediate comfort with AS2 to a fresh beginning with AS3...not
    so easy for a guy who has so little logical thinking that I failed
    algebra in high school! I too am a bit annoyed by all the extra
    steps involved, such as having to add EventListeners for mouse
    events, when these really ought to be simplified and there by
    default, like in AS2. For example, why can't onMouseDown remain as
    a built-in behavior rather than having to take up 2 lines of code
    to insert it each and every time now?
    On the other hand, I am delighted at the way a lot of the
    inconsistencies in AS2 have been gotten rid of. No more having to
    remember when to put .x and when ._x, and so on. And now that I'm
    finally starting to learn how to use external classes, I see the
    beauty in it, and AS3 is custom-made for this. It seems that if you
    ever want to really advance in ActionScript programming, you need
    to start working with creating your own classes, and as long as
    you're going to learn those from scratch, may as well learn it in
    AS3.
    Putting AS on buttons was outdated practice years ago. It
    makes much greater sense to place all script on the timeline, with
    comments to separate it. Try programming the simplest game where
    objects are moving around and colliding, all controlled by script,
    and then a couple coded buttons control them. Bugs are inevitable,
    and debugging script when it's partly on the timeline, some is
    attached to main movie buttons, and some attached to movie clips
    inside movie clips, is a nightmare. Once you do scripting on the
    timeline, you'll never want to go back to the crude practice of
    attaching script to objects.
    Overall, it's a steeper climb than I'd have liked, to upgrade
    my knowledge from AS2 to AS3. But ultimately I think it's the best
    idea.

  • AS2 to AS3 Streaming Video Player

    Ok so Im trying to convert a video play that i made in AS2 to
    AS3 (I had a problem with nested movie clips and the control bar
    and i want to learn AS3) and i am having troblem even connecting to
    my rtmp server. With the player i made in AS2 i was able to connect
    and stream video no problem. But with AS3 I am not even able to
    connect to the rtmp server. Here is the AS2 code and the AS3 code:
    AS3:
    var video:Video = new Video(853,480);
    addChild(video);
    var nc:NetConnection = new NetConnection();
    nc.connect("rtmp://[ip of server]/sumone4life/videos");
    var ns:NetStream = new NetStream(nc);
    ns.addEventListener(NetStatusEvent.NET_STATUS,
    onStatusEvent);
    function onStatusEvent(stat:Object):void
    trace(stat.info.code);
    var meta:Object = new Object();
    meta.onMetaData = function(meta:Object)
    trace(meta.duration);
    video.attachNetStream(ns);
    ns.play("AdobeBand_640");
    And I get the error:
    ArgumentError: Error #2126: NetConnection object must be
    connected.
    at flash.net::NetStream/construct()
    at flash.net::NetStream()
    at videoPlayer_fla::MainTimeline/frame1()
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.NetConnection was unable to invoke callback onBWDone.
    error=ReferenceError: Error #1069: Property onBWDone not found on
    flash.net.NetConnection and there is no default value.
    at videoPlayer_fla::MainTimeline/frame1()
    Flash media server 3 Administrative Panel also shows that I
    am infact connected to the server but there is nothing being
    streamed from the server.
    AS2 Works:
    //Video Loading Controls
    var fileName:String = "AdobeBand_640";
    var nc:NetConnection = new NetConnection();
    var ns:NetStream;
    nc.onStatus = function(info){
    trace(info.code);
    if(info.code == "NetConnection.Connect.Success"){
    playVideo();
    function playVideo(){
    ns = new NetStream(nc);
    ns.onMetaData = onMetaDataHandler;
    videoObject.attachVideo(ns);
    _root.createEmptyMovieClip("vSound",
    _root.getNextHighestDepth());
    vSound.attachAudio(ns);
    ns.setBufferTime(5);
    ns.onStatus = function(info){
    trace(info.code);
    if(info.code == "NetStream.Buffer.Full"){
    bufferClip._visible = false;
    if(info.code == "NetStream.Buffer.Empty"){
    bufferClip._visible = true;
    if(info.code == "NetStream.Play.Stop"){
    ns.seek(0);
    ns.play(filename);
    //connects the stream
    nc.connect("rtmp://[ip of server]/sumone4life/videos");
    Can anyone offer any insite as to why it would be workin in
    AS2 and not in AS3? Or what i am doing wrong...

    I have a similar problem. Did you get your to work?

  • Director - Flash AS2 - Flash AS3 via localconnection?

    I have a Director MX2004 app that I would like to use to control a Flash swf written in AS3.  I know I can't embed that kind of SWF file in Director, so I thought I would try to use this method:
    Embed an AS2 swf in director and communicate with that.
    Have that swf use the localconnection to communicate with the AS3 swf running in Air.
    I can verify that the 2 swfs communicate when running in Flash and Air
    I can verify that Director can communicate with the AS2 swf embedded in it.
    But I can't link it all together.  Send a command to the AS2 swf from Director doesn't continue down the chain to talk to the AS3 swf.
    Is this something that could possibly work, or am I beating a dead horse?

    Hi,
    Did you have any luck with this method?
    I am using Dir 12 now and Flash CS6.
    Thanks,
    Jim

  • How come I can't add a song to my playlists in itunes match? Is it me or itunes match? It keeps on coming up with a message " iCloud playlists can only contain songs from your iCloud music library. If you continue, the playlist will be removed from iCloud

    How come I can't add a song to my playlists in itunes match? Is it me or itunes match? It keeps on coming up with a message " iCloud playlists can only contain songs from your iCloud music library. If you continue, the playlist will be removed from iCloud and will only be available on this computer"?
    You must surely be able to add and subtract songs on specific playlist?

    I fixed this issue (with help from tech support) and it involved several things.
    After adding a song to iTunes, right-click on the song in iTunes and select "Update iTunes Match."
    OR go to the iTunes menu-->Store-->Update iTunes Match.
    Maybe that's the reason, it just hadn't updated to the cloud.
    OR maybe it's not a high-enough bitrate file.   This happens to me because most of my tunes are home-recorded.
    Sometimes converting to .mp3 or Create AAC version might work. (You do this with a right-click in iTunes, and then you will want to remove the original file from iTunes.)
    There is an iTunes Preferences setting, under General Preferences called Import Settings.  Try setting it to AAC Encoder and iTunes Plus.   That (I think) causes imports to be slightly better quality.
    Good luck!  The tech support person at Apple is requesting that a knowlege-base article be written about this.

  • HT204406 I download a song & then I try to drag it into a playlist & I get a warning "iCloud playlists can only contain songs from your iCloud music library. If you continue, my iPod will be removed from iCloud and will only be available on this computer.

    I download a song & then I try to drag it into a playlist & I get a warning "iCloud playlists can only contain songs from your iCloud music library. If you continue, my iPod will be removed from iCloud and will only be available on this computer."

    I'm sorry to see that no one has answered this. I'm hoping Apple with reply to my support request, as I'm having the same issue. I really don't want to continue with iCloud at this point.

  • ICal [Exchange calendar]: "This calendar can only contain to do items"

    Hi, after SL upgrade I cannot add/edit any longer my exchange accounts calendar in iCal. It only says that "This calendar can only contain to do items".
    I have tried to delete the account and reset it but it didn´t solve the issue.
    We are using Kerio Mail Server as Exchange solution.
    Should I wait for 10.6.1 to fix this or is there a work around?

    It was my fault, because this problem really a Kerio Mail Server faliure!
    http://discussions.apple.com/thread.jspa?threadID=2159279&tstart=0
    Message was edited by: pagocs

  • Looking for a copy of Patrick Mineault's AS2 to AS3 converter.

    Anybody have a copy of Patrick Mineault's AS2 to AS3 converter sitting around?  His website closed down in May and he changed careers.
    Thanks!

    See if this is it:
    http://download.info.apple.com/Apple_Support_Area/Manuals/powerbooks/0301677CPBU G.PDF

  • I have synced my ipod many times, but for some reason it will no longer sync the apps, and says there are app installed that can not be determined. What should I do?

    I have synced my ipod many times, but for some reason it will no longer sync the apps, and says there are apps installed that can not be determined. What should I do?

    See these previous discussions:
    not determined
    iTunes cannot sync... apps not determined installed on...: Apple Support Communities
    installed apps could not be determined...: Apple Support Communities

Maybe you are looking for

  • I hate Mountain Lion! How do I get rid of menus?

    I was hoping I'd get the Mac Book Pro with Lion, and I could wait for Mt Lion til it had a few upgrades of debugging. I have a mail program problem that I have up here already.  BUT how do you unenable these little menus/options that pop up all the t

  • How can I populate a date field when document is signed?

    I have 4 digital signature fields in a PDF form.  Next to each signature field is a date field (m/d/yyyy format).  I would like it so when the user signs the signature box that the date field next to it populates with todays date, then changes to rea

  • Dual Radeon 4870 in 2009 Mac Pro

    Can I install 2 Apple supplied Radeon 4870's in the new 2009 Mac Pro?

  • Report Painter - Forms

    Hi Gurus, I needed to develop report painter report for WBS element, where I need to compare two plan versions against  the actual. The report out put is done. User need to enter two plan version as input in the selection,  for both the plan versions

  • I am unable to update my ipad mini to the new IOS8,

    Please could someone help, what can i do.  i am unable to update my ipad mini to the new IOS8