As2.0 and As3.0 communicatioin

Hi,
i m updating my e-learning course player project with Flash
cs3 and AS3.0. the old version of course player was in As2.0. which
load cousre swf files .
it was working fine Flash8 As2.0.
the player load course swf. the loaded course swf on a
specifec frame call a method like this
_level0.setButton(2) method from course player;
The setButton(parameter) method defination is in new courser
player. the loaded movie which is in Actionscritp2.0 not finding
this method
in new course player which in Actionscript3.0. its working
well with the old course player.
can any one give me solution to solve the issue.
i can't make changes in course swf files b/c there are
thousand of course files

thank for your reply i have used it but it is two way
communication , as i mentioned in my question
i can't make changes in my As2.0 course swf files. b/c there
are thousand of these course files.

Similar Messages

  • Communication between AS2 Template and AS3 Swf

    I created a template in AS2 which loads as2 swf's. i want to load as3 swf. then how can load as3 swf.within as2 template.
    please help me to find out this...

    hI,
    Look at package SDYNAMICDOCUMENTS, or look for DD_* ( This is Dynamic Documents  Tamplates ) in SE38.
    Regards,
    Marcelo Ramos.

  • 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.

  • Dummy Guide needed for converting AS2 code into AS3

    I have to convert my existing AS2 code into AS3, but I might as well be reading chinese. I never even began to learn AS3, it was still fairly new at the time and the class ended before we had an opportunity to even touch on it. My major was not web design, it was the print side of design. I took an additional class, after I graduated, to learn web design and our teacher told us, basically, that we were designers, not coders so we won't be getting much into actionscripting, beyond the basics. At the time I was relieved, but looking back, I really wish we would have gotten more into it. Bottom line, I need to learn now.
    Is there ANYONE that can help me out? I will list my code below, buy I am way beyond lost any help that can be provided, I would be so grateful!!!!
    On the main timeline I have the basic..
    stop(); -- I found the AS3 version, but I don't know what I'm looking at. I get "not_yet_set.stop()" and there are are 8 options I can choose from. I just want the timeline to stop until I tell it where to go next. And what is "not_yet_set"
    Then I have my buttons, which are, basically...
    on (release) {
    gotoAndStop("Home");
    Or "gotoAndPlay("Whatever");"
    I also have buttons for scrolling...
    on (press) {
    play();
    on (release) {
    stop();
    AND
    on (press) {
    _root.AboutMe_Controller.gotoAndPlay(…
    on (release) {
    _root.AboutMe_Controller.gotoAndStop(…
    For the on(release) command, this is what I found as the AS3 version: not_set_yet.dispatchEvent()

    because that's really as1 code, you have steeper learning curve than going from as2 to as3.
    first, remove all code from objects, assign instance names to your buttons and you can then start on as3:
    // so, if you name your home button, home_btn:
    home_btn.addEventListener(MouseEvent.CLICK,homeF);
    function homeF(e:MouseEvent):void{
    gotoAndStop("Home");
    p.s.  the not_yet_set stuff is there because you tried to use script assist or some other actionscript shortcut.

  • Noob question: How to update very basic as2 code to as3.

    I've been asked to update a web banner with old as2 code, and not being a coder or a regular Flash user, I'm stuck with what I'm sure is a simple problem. The code in the opening frame is;
    function timeOut(pauseTime) {
      stop();
      pauseTimer = setInterval(this, "goPlay", pauseTime);
    function goPlay() {
      play();
      clearInterval(pauseTimer);
    After that there are a few frames that include timeOut(500); code, which seems basic enough, so I imagine my problems are all in the opening code.
    I get 4 errors that all refer to Frame 1;
    1120: Access of undefined property pauseTimer.
    1067: Implicit coercion of a value of type CapOne_MM_648x480b_fla:MainTimeline to an unrelated type Function.
    1067: Implicit coercion of a value of type String to an unrelated type Number.
    1120: Access of undefined property pauseTimer.
    Can anyone help or point me in the right direction? Thanks.

    For the code you show there would be no need to convert to AS3 since between AS2 and AS3 it hasn't changed.  One thing you do need to do is declare variables and since pauseTimer is used in mutliple functions it needs to be declared outside any functions.  Another thing you need to do is specify the variable types, including the arguments passed into function.  As for the setInterval call itself it appears to be written incorrectly....
    var   pauseTimer:Number;
    function timeOut(pauseTime:Number) {
          stop();
         pauseTimer = setInterval(goPlay, pauseTime);

  • Help! Convert simple Flash AS2 code to AS3

    Hi everyone,
    I'm a Flash beginner and followed a tutorial: http://www.webwasp.co.uk/tutorials/018/tutorial.php ... to learn how to make a "live paint/draw" effect. I didn't realize  that if I made something in AS2, I wouldn't be able to embed it (and  have it work) into my root AS3 file, where I've got a bunch of other  stuff going on. I've tried following tips on how to change AS2 code to  AS3, but it just doesn't work. I know it's simple code, and that some  genius out there can figure it out, but I'm at a loss. Please help!
    Here's the AS2 code:
    _root.createEmptyMovieClip("myLine", 0);
    _root.onMouseDown = function() {
       myLine.moveTo(_xmouse, _ymouse);
       ranWidth = Math.round((Math.random() * 10)+2);
       myLine.lineStyle(ranWidth, 0xff0000, 100);
       _root.onMouseMove = function() {
          myLine.lineTo(_xmouse, _ymouse);
    _root.onMouseUp = function() {
       _root.onMouseMove = noLine;
    Thanks in advance!
    Signed,
    Nicolle
    Flash Desperado

    Considering the code is on timeline:
    var myLine:Sprite = new Sprite();
    addChild(myLine);
    var g:Graphics = myLine.graphics;
    addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
    function onMouseDown(e:MouseEvent):void {
         var ranWidth:Number = Math.round((Math.random() * 10) + 2);
         g.clear();
         g.lineStyle(ranWidth, 0xFF0000, 1);
         addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
         addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
    function onMouseMove(e:MouseEvent):void {
         g.lineTo(mouseX, mouseY);
    function onMouseUp(e:MouseEvent):void {
         removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
         removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);

  • Load as2 swf in as3 swf

    Hi All,
    I am new to this forum.
    Can anyone tell me how to load as2 swf in as3?
    If this is possible,can anyone give me some sample example?
    Thanks
    Harshal

    You can talk to loaded AVM1 (AS1/2) SWF using LocalConnection. I used Grant Skinner's SWFBridge class in the past and worked very well:
    http://gskinner.com/blog/archives/2007/07/swfbridge_easie.html
    Kenneth Kawamoto
    http://www.materiaprima.co.uk/

  • Load AS2 swf into AS3 swf problem

    I have a flash with AS3 and inside this swf i load in a AS2 swf.
    to load swf works just fine, but the problem is when i load this i want to go to
    a specific part of it, for example i want to go to frame 3 in the loaded swf.
    i must control this from the AS3 swf, does someone know if this is possible?
    thanks in advance

    so can i do like this then to go to frame 3 in my loaded swf?
    MovieClip(ldr.content).gotoAndStop(3); ?
    sorry for being such an airhead
    thanks for helping me out =)
    Date: Sun, 7 Jun 2009 10:25:09 -0600
    From: [email protected]
    To: [email protected]
    Subject: load AS2 swf into AS3 swf problem
    no.
    if, in your loaded swf, you have a function f1() on the loaded swf's main timeline and you load that swf using a loader (say ldr), use:
    MovieClip(ldr.content).f1();   // to call f1() in the loaded swf
    >

  • Load AS2 SWF in AS3 SWF with FlashVars

    I am able to load SWF which is created using AS2 in to AS3
    SWF but I am not able to pass Flashvars to it..
    Does any one has any idea, how can I do that??
    Thanks

    You can talk to loaded AVM1 (AS1/2) SWF using LocalConnection. I used Grant Skinner's SWFBridge class in the past and worked very well:
    http://gskinner.com/blog/archives/2007/07/swfbridge_easie.html
    Kenneth Kawamoto
    http://www.materiaprima.co.uk/

  • AS2 .swf to AS3.swf

    This may have been posted somewhere else however I have created a series of AS2 .swfs and now that I am using captivate 5 i need to convert them to as3.swf
    Can anyone help

    That's going to depend on whether or not there's any AS2 code in your SWFs and how complex that code is.
    Did you create these SWFs in Flash?  If so, what version?  If it's Flash CS3 or above you should be able to open the original FLA files and change your publish settings to output as AS3.
    If you've programmed a lot of interactivity into these SWFs as AS2 and you don't know AS3, you'll need to either learn it yourself or pay someone that does.

  • Tree Component and as3

    Hello ..
    my problem is tree component and AS3 , before we hade such
    easy time with tree component in as2 but now i founded that we cant
    talk directly to tree component and we have to use API and XML ,
    well i never liked XML and before i worked with tree component
    directly and no problem but now , Flex force me to work with XML or
    API(well I don’t know what dose it mean ) and I was tiring to
    find any way to get directly to tree component in Flex2 and no
    result … so my question , do I have use XML ? Is there any
    another way to get to Tree Component ? I was looking in Flex help ,
    and I find the help content is really bad . pleas help , I get
    crazy about this problem …….
    BWY this form work terrible on my PC ….. anyone have
    same problem ?

    Use xml. Resistance is futile.
    Tracy

  • Change AS2 file to AS3?

    Hey all!
    I started a new flash project and accidentally chose Action Script 2 instead of Action Script 3 and didn't realize it until I had already done quite a bit of work in the timeline. Just wondering if there's an easy way to change the document type to AS3?
    I tried simply using the AS3 option in the drop down menu in the actions panel, but it still gives me a syntax error when I know the code works fine in an AS3 document.
    Thanks!

    Thank you. I tried that, but now when test the movie I get two compile errors:
    WARNING: The component 'FLVPlayback' requires ActionScript 2.0.
    WARNING: The component 'UIScrollBar' requires ActionScript 2.0.
    And the playback does not stop at the frames I have told it to using a simple stop(); action. I know I've used a UI Scrollbar in AS3 before and I definitely know FLV Playback doesn't require AS 2.0 so maybe I need to change the settings of those components to be 3.0 components? Not sure how to do that though.
    *UPDATE: Deleting the FLV and the UI Scrollbar and then adding them again fixed this problem. Obviously the components from AS2 and AS3 are much different.
    On a different note, I have two other questions for you... Firstly, I've got the FLV Playback component starting off stage and sliding in to the center when the page loads. This seems to work fine in the timeline, but when I test the movie, the video remains on the right side of the stage and doesn't slide in. Any idea why?
    Secondly is there a way to pause the video when you navigate to another page? Cause it keeps playing in the background (I can hear the audio still) even though I click on another page.
    Thanks!

  • Using swf and AS3 on supercomputer

    I (might) have an opportunity to run my ActionScript 3 project on a Cray supercomputer in couple of weeks.
    How can I be sure that I benefit of the multiple processors an big memory space?
    And I need to understand how will I benefit?
    Is window="gpu" embed tag all it takes, or should I use Alchemy and different ASC?
    That gpu -tag is said to give benefits only in some occasions, would this be the occasion?
    Maybe there is readymade versions of Flash-Player that will use multiprocessor?
    Filesize is below 100kt, but...
    My demo is huge fractal with graphics in several (hundreds) nodes, and it can be made even bigger...
    I will also use real time generated sounds in background.
    Mac mini is already having trouble with it, it would be interesting to see how supercomputer will manage.
    Any information?

    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.

  • What is this little AS2 code in AS3?

    Hey guys!
    I got something to embed HTML with it's pics and text and stuff...
    But this is in AS2.0 and I would need it in AS3.0..
    I was checking the AS2.0 migration on Adobe website, but I can't find / don't know some things..
    What I got in AS2.0:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    myLoadVars = new LoadVars();
    myLoadVars.onLoad = function() {
    myText.htmlText = myLoadVars.myHTMLdata;
    myLoadVars.load("myHTML.txt");
    And to where I got by myself (not much AND IF this is correct..):
    function(){return A.apply(null,[this].concat($A(arguments)))}
    import flash.net.URLLoader
    myLoadVars = new URLLoader();
    myLoadVars.onLoad = function() {
    myText.htmlText = myLoadVars.myHTMLdata;
    myLoadVars.load("myHTML.txt");
    Could someone help me with this plz?
    Thanks!

    Hey thanks for the fast answer!
    This is totaly it!
    I forgot something stupid in my own AS3... lol
    BUT when I copy your code, I get a error.. You made a very very very little mistake...
    function(){return A.apply(null,[this].concat($A(arguments)))}
    var myLoader:URLLoader = new URLLoader();
    myLoader.addEventListener(Event.COMPLETE, onLoad)
    myLoader.load(new URLRequest("myHTML.txt"));   ----> That's what you forgot :-)
    function onLoad(e:Event):void
         myText.htmlText = e.target.data;
    Edit yours a bit or something... I'll give you the correct answer thingy :-)
    Thanks very very much! :-)

  • Problems in CS3 and AS3 with embedded fonts

    Hi. I recently downloaded the trial version of CS3 to test it
    out. I'm an experience AS2 developper, and have 10 years of C, C++,
    C#, Java, PHP ... programming experience on BIG projects before
    starting flash.
    I have been trying to use an embedded font in AS3 with a
    dynamically created textfield. I've tried all the examples in
    O'Reilly's ActionScript 3.0 Cookbook. They suggest using the
    [Embed] meta tag, but quite honestly it does nothing in CS3. I had
    the Size Report option selected, and it shows clearly by the file
    size the font isn't present in the SWF.
    Then I tried doing it the way I did in Flash 8. Again there
    no luck. My TextField exists, but there is simple no font being
    rendered.. Here is my bit of code.
    In my library I have a symbol called arialBold. In the
    linkage settings, I have "Export for ActionScript" checked, and
    "Export in first frame" checked. The class is "arialBold" but I
    wonder if that's right? and the Base class is "flash.text.Font"
    I tried every variation I could think of. I must be doing
    something wrong. You can find my file here :
    http://www.newcommerce.ca/as3/fonttest.fla
    Thanks for your help! If you can fix this, i'll be very
    happy!

    this code works
    var tf:TextField = new TextField();
    var tfor:TextFormat = new TextFormat();
    tfor.font = new _TrebushetMS().fontName;
    tfor.italic = true;
    tf.width = 300;
    tf.height = 200;
    tf.embedFonts = true;
    tf.border = true;
    tf.defaultTextFormat = tfor ;
    tf.text = "this is a test";
    this.addChild(tf);
    This code does not work
    var tf:TextField = new TextField();
    var tfor:TextFormat = new TextFormat();
    tfor.font = new _TrebushetMS().fontName;
    tfor.italic = true;
    tf.width = 300;
    tf.height = 200;
    tf.embedFonts = true;
    tf.border = true;
    tf.setTextFormat(tfor) ;
    tf.text = "this is a test";
    this.addChild(tf);
    i don't know why

Maybe you are looking for

  • Genius Bar Feedback on Battery Issues

    Ok..so I know there are hundreds of posts regarding various battery issues. I thought it might be helpful to post feedback on my genius bar visit today regarding my battery. The issue with my battery is that the meter seems to be stuck at about 80% f

  • PDF Resolution and Page Dimensions, as for CreateSpace

    I use a Mac (OX 10.4.11), Adobe Acrobat Professional 7, and PhotoShop Elements 4. I am trying to prepare a 140-page book and upload it as a PDF to CreateSpace. I exported the book from Keynote to a series of TIF files, which were by defaultt to 72 pp

  • Query works everywhere but Flex: inline views not supported perhaps?

    EDIT2: Actually not. It turns out to be a bug in the way Adobe is treating any integer PK column, no matter how it is defined, INT, or INTEGER, as an alias for the rowid in SQlite.  This is incorrect. rowid does not always equal the PK value.  This c

  • Windows to Mac iTunes file transfer woes

    I have backed up my iTunes music folder onto an external hard drive and have connected to my new MBP with the hope of transferring my music files over to iTunes on my MBP. But when the folder opens there are no music files within the "Artists" folder

  • Trying to access emails,message reads,connection to server failed.

    trying to retrieve emails I get a message saying connection to server failed,have tried resetting and deleting and reinstalling but still get same message.