AS3 code to add buffer to .flv

In AS2, there was a parameter to add buffering to an .flv. In
AS3 it appears Adobe has decided to remove that parameter. Is there
a line of code to add buffering to an .flv when .flv component is
dragged to stage - not added to stage with AS3? I like the new AS3
.swf controllers and prefer not to revert back to AS2.

quote:
Specifically, if I have a Symbol in the Library named
"mySymbol", how do I add it to my DispalyObjectContainer (i.e.
MovieClip)?
Something like this:
var ms:mySymbol = new mySymbol();
disp.addChild(ms);

Similar Messages

  • Would someone be willing to check as3 code for a guestbook

    Would someone be willing to check out some as3 code for a guestbook? I'm an old person, and can't seem to get it working.
    Thanks!

    Ned suggested that I post the code, so everyone could see it. The SWF works, but the code doesn't. Any help appreciated!
    package com.mgraph\
      //IMPORTS
      import flash.display.Loader;
      import flash.display.MovieClip;
      import flash.display.Sprite;
      import flash.display.StageAlign;
      import flash.display.StageScaleMode;
      import flash.events::EventDispatcher/dispatchEventFunction();
      import flash.events::EventDispatcher/dispatchEvent();
      import flash.events.MouseEvent;
      import flash.events.TextEvent;
      import flash.events.KeyboardEvent;
      import flash.geom.Rectangle;
      import flash.net::URLLoader/onComplete();
      import flash.net.URLRequest;
      import flash.net.URLRequestMethod;
      import flash.net.URLVariables;
      import flash.text.TextFieldAutoSize;
      import flash.text.TextFormat;
      import com.utils.StringUtils;
      import com.caurina.transitions.Tweener;
      import com.pageflip.Page;
      import com.pageflip.PageEvent;
      public class Guestbook extends MovieClip {
      //PRIVATE VARS
      private var myXML:XML;
      private var frm:TextFormat;
      private var popup_mc:MovieClip;
      private var greySprite:Sprite;
      private var initPosition:Number;
      private var dy:Number;
      private var initContentPos:Number;
      private var moveVal:Number;
      private var rectScroll:Rectangle;
      private var stageWidth:Number;
      private var stageHeight:Number;
      public function Guestbook(){
      addEventListener(Event.ADDED_TO_STAGE,init);
      private function init(e:Event):void {
      stage.showDefaultContextMenu = false;
      stage.align = StageAlign.TOP_LEFT;
      stage.scaleMode = StageScaleMode.NO_SCALE;
      stageWidth = stage.stageWidth;
      stageHeight = stage.stageHeight;
      // LOAD THE XML
      var xmlPath:String;
      var xmlLoader:URLLoader = new URLLoader;
      if (root.loaderInfo.parameters.myconfig) {
      // XML PATH FROM HTML flashvars (myconfig)
      xmlPath = root.loaderInfo.parameters.myconfig;
      else {
      // DEFAUL PATH OF XML
      xmlPath = "config.xml";
      xmlLoader.load(new URLRequest(xmlPath));
      xmlLoader.addEventListener(Event.COMPLETE,xmlLoaded);
      private function xmlLoaded(e:Event):void {
      // XML LOADED COMPLETE
      myXML = new XML(e.target.data);
      // ADD EVENT LISENER TO FIELDS AND TO (send_btn)
      form_mc.name_txt.addEventListener(TextEvent.TEXT_INPUT,clearAlert);
      form_mc.email_txt.addEventListener(TextEvent.TEXT_INPUT,clearAlert);
      form_mc.message_txt.addEventListener(TextEvent.TEXT_INPUT,clearAlert);
      form_mc.email_txt.addEventListener(Event.CHANGE,checkMail);
      addMouseEvent(form_mc.send_btn,sendEvent);
      // CREATE TEXT FORMAT (frm)
      frm = new TextFormat  ;
      frm.leading = 4;
      form_mc.message_txt.defaultTextFormat = frm;
      // LOAD BACKGROUND IMAGE
      var backLoader:Loader = new Loader();
      backLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,backLoaded);
      backLoader.load(new URLRequest(myXML.img_back));
      // ADD KEYBOARD EVENT WHEN PRESSING ENTER KEY
      stage.addEventListener(KeyboardEvent.KEY_DOWN,keyboardDown);
      // CREATE THE GREY SPRITE
      greySprite = new Sprite  ;
      greySprite.graphics.beginFill(0x000000,0.2);
      greySprite.graphics.drawRect(0,0,stageWidth,stageHeight);
      greySprite.graphics.endFill();
      greySprite.useHandCursor = false;
      // CREATE THE POPUP and ADD EVENTLISTENER TO (close_btn)
      popup_mc = new popup_obj;
      popup_mc.x = (stageWidth - popup_mc.width)/2;
      popup_mc.y = (stageHeight - popup_mc.height)/2;
      addMouseEvent(popup_mc.close_btn,closeEvent);
      private function keyboardDown(e:KeyboardEvent):void{
      if(e.keyCode == 13){
      // STOP USING BREAK LINE IN message_txt
      stage.focus = null;
      private function backLoaded(e:Event):void{
      // BACKGROUND LOADED COMPLETE
      var back_mc:MovieClip = new MovieClip;
      back_mc.addChild(e.target.content);
      addChildAt(back_mc,0);
      form_mc.wait_mc.visible = false;
      startPageFlip();
      // START LOADING GUEST MESSAGE FROM DATABASE
      load_guestbook();
      private function startPageFlip():void{
      var flipedPage:Page = new Page(this, stageWidth, stageHeight, 0, 0);
      flipedPage.turnPageForward();
      private function load_guestbook():void {
      // GET MESSAGES FROM DATABASE USING PHP
      var guestLoad:URLLoader = new URLLoader  ;
      var guestReq:URLRequest = new URLRequest(myXML.phpURL);
      guestReq.method = URLRequestMethod.POST;
      guestReq.data = new URLVariables  ;
      guestReq.data["getMessage"] = 1;
      guestLoad.addEventListener(Event.COMPLETE,bookLoaded);
      guestLoad.load(guestReq);
      private function bookLoaded(e:Event):void {
      // MESSAGES LOADED SUCCESSFULLY FROM DATABASE
      var bookXML:XML = new XML(e.target.data);
      showMessages(bookXML);
      private function showMessages(_xml:XML):void{
      var guest_mc:MovieClip;
      // CREATE (guest_mc) to SHOW EACH GUEST NAME & MESSSAGE
      for (var u=0; u<_xml.guest.length(); u++) {
      guest_mc = new messageObj  ;
      guest_mc.y = 95 * u;
      //CAPITALIZE THE FIRST CHAR IN NAME
      guest_mc._Name = StringUtils.capitalize(_xml.guest[u].name);
      guest_mc._Msg = _xml.guest[u].msg;
      guest_mc._Date = _xml.guest[u].sdate;
      guest_mc.guestName_txt.htmlText = setHtmlFormat(14,myXML.name_color,guest_mc._Name);
      //IF guestMessage_txt TEXT LENGTH > 110 substr guestMessage_txt AND ADD (...)
      guest_mc.guestMessage_txt.htmlText = setHtmlFormat(12,myXML.message_color,StringUtils.capitalize(StringUtils.truncate(_xml.gue st[u].msg,110,"...")));
      guest_mc.guestMessage_txt.setTextFormat(frm);
      guest_mc.tabChildren = false;
      guest_mc.tabEnabled = false;
      // ADD EVENT LISTISTENER  TO (readMore_btn) FOR EACH (guest_mc)
      addMouseEvent(guest_mc.readMore_btn,readEvent);
      msgContainer.addChild(guest_mc);
      // SHOW/HIDE SCROLL
      if (msgContainer.height < mask_mc.height) {
      scroller.scroll_btn.visible = false;
      else {
      this.mouseChildren = false;
      scroller.scroll_btn.y = 0;
      if(msgContainer.y != 10){
      Tweener.addTween(msgContainer,{y:10,time:1.5,onComplete:initScrollPos});
      else{
      initScrollPos();
      scroller.scroll_btn.visible = true;
      // ADD EVENT  TO SCROLL
      addMouseEvent(scroller.scroll_btn,scroll_Event);
      scroller.scroll_btn.addEventListener(MouseEvent.MOUSE_UP,scroll_Event);
      private function initScrollPos():void{
      this.mouseChildren = true;
      dy = 0;
      initPosition = scroller.scroll_btn.y = scroller.bar_mc.y;
      initContentPos = msgContainer.y;
      moveVal = (msgContainer.height-mask_mc.height)/(scroller.bar_mc.height-scroller.scroll_btn.height);
      rectScroll = new Rectangle(scroller.bar_mc.x + 4,scroller.bar_mc.y,0,scroller.bar_mc.height - scroller.scroll_btn.height);
      private function readEvent(me:MouseEvent):void {
      var _this = me.currentTarget;
      switch (me.type) {
      case "mouseOver" :
      _this.alpha = 0.8;
      break;
      case "mouseOut" :
      _this.alpha = 1;
      break;
      case "mouseDown" :
      // SHOW POPUP WITH MORE INFORMATIONS ABOUT THE CURRENT MESSAGE
      popup_mc.pop_nom.htmlText = setHtmlFormat(15,myXML.name_color,_this.parent._Name) + setHtmlFormat(13,myXML.datePosted_color," - Posted "+_this.parent._Date);
      popup_mc.pop_message.htmlText = setHtmlFormat(13,myXML.message_color,StringUtils.capitalize(_this.parent._Msg));
      popup_mc.pop_message.autoSize = TextFieldAutoSize.LEFT;
      popup_mc.pop_message.setTextFormat(frm);
      popup_mc.back_mc.height = popup_mc.pop_message.height + 50;
      popup_mc.x = (stageWidth - popup_mc.width)/2;
      popup_mc.y = (stageHeight - popup_mc.height)/2;
      addChild(greySprite);
      addChild(popup_mc);
      popup_mc.alpha = 0;
      greySprite.alpha = 0;
      Tweener.addTween(popup_mc,{alpha:1,time:0.6});
      Tweener.addTween(greySprite,{alpha:1,time:0.6});
      break;
      private function setHtmlFormat(_size:Number,_color,_txt:String):String{
      var htmlFrm:String  = "<font size='"+_size+"'color='"+_color+"'>"+_txt+"</font>";
      return htmlFrm;
      private function closeEvent(me:MouseEvent):void {
      switch (me.type) {
      case "mouseOver" :
      popup_mc.close_btn.alpha = 0.8;
      break;
      case "mouseOut" :
      popup_mc.close_btn.alpha = 1;
      break;
      case "mouseDown" :
      if (stage.contains(popup_mc)) {
      Tweener.addTween(greySprite,{alpha:0,time:0.6,onComplete:function(){removeChild(greySprit e)}});
      Tweener.addTween(popup_mc,{alpha:0,time:0.6,onComplete:function(){removeChild(popup_mc)}} );
      break;
      private function scroll_Event(me:MouseEvent):void {
      switch (me.type) {
      case "mouseOver" :
      scroller.scroll_btn.alpha = 0.7;
      break;
      case "mouseOut" :
      scroller.scroll_btn.alpha = 1;
      break;
      case "mouseUP" :
      scroller.scroll_btn.stopDrag();
      scroller.scroll_btn.removeEventListener(Event.ENTER_FRAME, scrollMove);
      break;
      case "mouseDown" :
      scroller.scroll_btn.startDrag(false, rectScroll);
      scroller.scroll_btn.addEventListener(Event.ENTER_FRAME, scrollMove);
      stage.addEventListener(MouseEvent.MOUSE_UP, releaseOut);
      break;
      private function scrollMove(event:Event):void {
      dy = Math.abs(initPosition - scroller.scroll_btn.y);
      msgContainer.y = Math.round(dy * -1 * moveVal + initContentPos);
      private function releaseOut(me:MouseEvent):void {
      scroller.scroll_btn.stopDrag();
      scroller.scroll_btn.removeEventListener(Event.ENTER_FRAME, scrollMove);
      stage.removeEventListener(MouseEvent.MOUSE_UP, releaseOut);
      private function sendEvent(e:MouseEvent):void {
      switch (e.type) {
      case "mouseOver" :
      form_mc.send_btn.alpha = 0.7;
      break;
      case "mouseOut" :
      form_mc.send_btn.alpha = 1;
      break;
      case "mouseDown" :
      // CHECK FIELDS AND EMAIL THEN SEND DATA TO PHP
      if (form_mc.name_txt.text == "") {
      stage.focus = form_mc.name_txt;
      show_alert("You must enter the : « Name »");
      else if (form_mc.email_txt.text == "") {
      stage.focus = form_mc.email_txt;
      show_alert("You must enter the : « E-mail »");
      else if (form_mc.validating.currentFrame == 1) {
      stage.focus = form_mc.email_txt;
      form_mc.validating.alpha = 1;
      form_mc.validating.gotoAndStop(1);
      show_alert("« E-mail » address is incorrect");
      else if (form_mc.message_txt.text == "") {
      stage.focus = form_mc.message_txt;
      show_alert("You must enter the : « Message »");
      else {
      sendData();
      break;
      private function checkMail(e:Event):void {
      form_mc.validating.alpha = 1;
      var mail_validation:RegExp = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i;
      mail_validation.test(form_mc.email_txt.text);
      if (mail_validation.test(form_mc.email_txt.text) == true) {
      form_mc.validating.gotoAndStop(2);
      form_mc.alert_txt.text = "";
      else {
      form_mc.validating.gotoAndStop(1);
      private function clearAlert(te:TextEvent):void {
      if (form_mc.alert_txt.text != "") {
      form_mc.alert_txt.text = "";
      private function show_alert(txt:String):void {
      form_mc.alert_txt.htmlText = "<font color='" + myXML.alert_color + "'>" + txt + "</font>";
      private function sendData():void {
      // SEND NAME-EMAIL-MESSAGE TO PHP
      this.mouseChildren = false;
      form_mc.wait_mc.visible = true;
      var phpLoad:URLLoader = new URLLoader  ;
      var phpReq:URLRequest = new URLRequest(myXML.phpURL);
      phpReq.method = URLRequestMethod.POST;
      phpReq.data = new URLVariables  ;
      phpReq.data["name"] = StringUtils.stripTags(form_mc.name_txt.text);
      phpReq.data["email"] = form_mc.email_txt.text;
      phpReq.data["message"] = StringUtils.stripTags(form_mc.message_txt.text);
      phpLoad.addEventListener(Event.COMPLETE,insertPHP);
      phpLoad.load(phpReq);
      private function insertPHP(e:Event):void {
      this.mouseChildren = true;
      var phpXML:XML = new XML(e.target.data);
      form_mc.send_btn.mouseEnabled = true;
      form_mc.wait_mc.visible = false;
      if (phpXML.inserted == 1) {
      startPageFlip();
      form_mc.alert_txt.htmlText = myXML.insert_ok;
      form_mc.validating.alpha = 0;
      form_mc.validating.gotoAndStop(1);
      while (msgContainer.numChildren) {
      msgContainer.removeChildAt(msgContainer.numChildren-1);
      // SHOW THE CURRENT POSTED MESSAGE AND CLEAR FIELDS
      showMessages(phpXML);
      clearFields();
      else {
      form_mc.alert_txt.htmlText = myXML.insert_error;
      private function clearFields():void {
      form_mc.name_txt.text = "";
      form_mc.email_txt.text = "";
      form_mc.message_txt.text = "";
      form_mc.validating.gotoAndStop(1);
      form_mc.validating.alpha = 0;
      private function addMouseEvent(_targ,_func):void {
      _targ.buttonMode = true;
      _targ.mouseChildren = false;
      _targ.addEventListener(MouseEvent.MOUSE_OVER,_func);
      _targ.addEventListener(MouseEvent.MOUSE_OUT,_func);
      _targ.addEventListener(MouseEvent.MOUSE_DOWN,_func);

  • Add Buffer to Dunning Run

    Hi Guys,
    How can we add buffer days to a dunning run for a particular company code ?
    For example, nvoice due date: 10.08.
    Invoice  should included in dunning run of 15.08. and not before that data.
    How can we do this ?
    Thanks,
    Srikanth.

    ok

  • I need to make a task with less as3 code and more timeline structure and event dispatcher !

    I went to an interview in a big company. I had to make a  task in which there is a wall with 3 lines and 5 columns filled with bombs.When you click on a bomb the bomb changes its scale, a robot enters, goes under the bomb and takes it, then goes to a smaller wall, makes the bomb smaller and place it at the same place it had been in the previous wall.I made the task with tween througout as3 code.The interviewer told me it was good but i need to make it with the less code possible and with more complex timeline structure and to use event dispatcher.What is the best way to do this ?

    The immediate thing that comes to mind is they might want to see that you can balance work between design teams and development teams.
    To do that, the robots movements (pick up bomb, bomb grows/shrinks, arms/treads/legs moving, sequences of 'doing things') can be timeline based so animators can work on those separate from code.
    Developers would be working on the logic of keeping score, moving the robot around to the correct spot with path detection, collision detection, etc.
    It's very similar to thinking in simple factories (which Flash is good at being automatically with timelines), and a bit of MVC (or just VC in some cases).
    Big companies have lots of different types of employees so you'll probably be very specific in your role so you're efficient.

  • Error while executing BBP_UPDATE_PORG Tr Code with ADD Option

    Hi All,
    I changed the Back end Vendor Master Data - Purchasing View (Example Accounting Number) and run the BBPUPDVD Tr code in SRM. The Business Partner (Vendor) data is updated correctly in SRM System from Back End System.
    We have set of purchasing organisations like one local (SRM) Purchasing Organisation and respective Back end Purchasing Organisation (account number). When ever I run BBPUPDVD, the SRM system updates the backend vendor master data  with back end purchasing organisation into SRM Standard tables. Then I am running BBP_UPDATE_PORG Tr code to have updated data into SRM Local Purchasing Organisation. I am receiving error message.
    Example Scenario:
    step 1: Present values in Vendor Master Vendor Number 100250, Purchaing Organisation : 1010 A/c Number: 100250-1010
    and I changed the account number as 10025o-test for vendor 100250 and pur organisation 1010.
    step 2: I run the BBPUPDVD in SRM System.
    Step 3: I checked the values in BBPMAININT - vendor data (for backend vendor number 100250 and backend pur organisation - 1010). The SRM system replicates the values correct.
    Step 4: I executed BBP_UPDATE_PORG and replaced the local (SRM) business partner (for local vendor number - 100250 and local purchasing organisation) - REPLACE Option. Then SRM replaces the SRM Business Partner (local) Data with Back end Vendor Master Data and also Back End vendor master data is deleted in SRM System. Now I have updated business partner details in SRM System as SRM Local an no SRM Back End Vendor Master Data in SRM System. This step is working fine.
    Step 5: One more time I am executing BBP_UPDATE_PORG Tr code with Add option to have SRM Back End Details (in SRM System) from SRM Local Details (SRM System). Then the system is error message in SM13 Tr code.
    Kind Note: There is no SRM Back End Vendor details in SRM System which I want to have with the help of executing BBP_UPDATE_PORG Tr code with Add option.
    For analysis I went to ST22 (dump Analysis), the SRM gave an error message like:
    Runtime Error          DYNPRO_SEND_IN_BACKGROUND
    Date and Time          09/15/2008 10:56:58
    ShrtText
         Screen output without connection to user.
    What happened?
         Error in ABAP application program.
         The current ABAP program "SAPLBBP_PARTNER_MAINT" had to be terminated because
          one of the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
    Information on where terminated
        The termination occurred in the ABAP program "SAPLBBP_PARTNER_MAINT" in      "BBP_PORG_INSERT".
        The main program was "RSM13000 ".
        The termination occurred in line 59 of the source code of the (Include)      program "LBBP_PARTNER_MAINTU11"
        of the source code of program "LBBP_PARTNER_MAINTU11" (when calling the editor      590).
        The program "SAPLBBP_PARTNER_MAINT" was started in the update system.
       56
       57 * update database
       58   IF NOT LT_FRG0060_NEW[] IS INITIAL.
    >>>>>     INSERT BBPM_BUT_FRG0060 FROM TABLE LT_FRG0060_NEW.
       60   ENDIF.
       61
       62   IF NOT LT_FRG0061_NEW[] IS INITIAL.
       63     INSERT BBPM_BUT_FRG0061 FROM TABLE LT_FRG0061_NEW.
       64   ENDIF.
    Kindly guide me or provide solution.
    We are in SRM 4.0 and ECC 5.0.
    Thanks a lot in advance.
    Regards,
    Sudarsan
    Edited by: KOYYA SUDARSANA NAIDU on Sep 15, 2008 9:09 PM
    Edited by: KOYYA SUDARSANA NAIDU on Sep 17, 2008 8:46 PM

    Hi All,
    I changed the Back end Vendor Master Data - Purchasing View (Example Accounting Number) and run the BBPUPDVD Tr code in SRM. The Business Partner (Vendor) data is updated correctly in SRM System from Back End System.
    We have set of purchasing organisations like one local (SRM) Purchasing Organisation and respective Back end Purchasing Organisation (account number). When ever I run BBPUPDVD, the SRM system updates the backend vendor master data  with back end purchasing organisation into SRM Standard tables. Then I am running BBP_UPDATE_PORG Tr code to have updated data into SRM Local Purchasing Organisation. I am receiving error message.
    Example Scenario:
    step 1: Present values in Vendor Master Vendor Number 100250, Purchaing Organisation : 1010 A/c Number: 100250-1010
    and I changed the account number as 10025o-test for vendor 100250 and pur organisation 1010.
    step 2: I run the BBPUPDVD in SRM System.
    Step 3: I checked the values in BBPMAININT - vendor data (for backend vendor number 100250 and backend pur organisation - 1010). The SRM system replicates the values correct.
    Step 4: I executed BBP_UPDATE_PORG and replaced the local (SRM) business partner (for local vendor number - 100250 and local purchasing organisation) - REPLACE Option. Then SRM replaces the SRM Business Partner (local) Data with Back end Vendor Master Data and also Back End vendor master data is deleted in SRM System. Now I have updated business partner details in SRM System as SRM Local an no SRM Back End Vendor Master Data in SRM System. This step is working fine.
    Step 5: One more time I am executing BBP_UPDATE_PORG Tr code with Add option to have SRM Back End Details (in SRM System) from SRM Local Details (SRM System). Then the system is error message in SM13 Tr code.
    Kind Note: There is no SRM Back End Vendor details in SRM System which I want to have with the help of executing BBP_UPDATE_PORG Tr code with Add option.
    For analysis I went to ST22 (dump Analysis), the SRM gave an error message like:
    Runtime Error          DYNPRO_SEND_IN_BACKGROUND
    Date and Time          09/15/2008 10:56:58
    ShrtText
         Screen output without connection to user.
    What happened?
         Error in ABAP application program.
         The current ABAP program "SAPLBBP_PARTNER_MAINT" had to be terminated because
          one of the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
    Information on where terminated
        The termination occurred in the ABAP program "SAPLBBP_PARTNER_MAINT" in      "BBP_PORG_INSERT".
        The main program was "RSM13000 ".
        The termination occurred in line 59 of the source code of the (Include)      program "LBBP_PARTNER_MAINTU11"
        of the source code of program "LBBP_PARTNER_MAINTU11" (when calling the editor      590).
        The program "SAPLBBP_PARTNER_MAINT" was started in the update system.
       56
       57 * update database
       58   IF NOT LT_FRG0060_NEW[] IS INITIAL.
    >>>>>     INSERT BBPM_BUT_FRG0060 FROM TABLE LT_FRG0060_NEW.
       60   ENDIF.
       61
       62   IF NOT LT_FRG0061_NEW[] IS INITIAL.
       63     INSERT BBPM_BUT_FRG0061 FROM TABLE LT_FRG0061_NEW.
       64   ENDIF.
    Kindly guide me or provide solution.
    We are in SRM 4.0 and ECC 5.0.
    Thanks a lot in advance.
    Regards,
    Sudarsan
    Edited by: KOYYA SUDARSANA NAIDU on Sep 15, 2008 9:09 PM
    Edited by: KOYYA SUDARSANA NAIDU on Sep 17, 2008 8:46 PM

  • Can someone pls help me to change AS3 code to AS2 code

    Hello! Dear All,
    I dont understand why with AS3 code my swf file is not working smooth at all. I would like to try it with AS2. In publish setting when I am selecting Flash Player 8, AS2 my swf is running good but showing lots of code errors.
    I dont have much knowledge about AS2 so if someone can help me with this...it would be great.
    Thanks,
    Cheers!
    Code1:
    import flash.external.ExternalInterface;
    ExternalInterface.addCallback("GetVars",GetVars);
    ExternalInterface.addCallback("SetVariable1",SetVariable1);
    function GetVars():Array {
    return [
      {VariableName:"SetVariable1",DefaultValue:"Variable1"}
    function SetVariable1(variable:String):void {
    for (var i:int = 0; i < numChildren; i++) {
      var mc:MovieClip=getChildAt(i) as MovieClip;
      if (mc!=null&&mc.name=='Audi_Cup') {
       mc.variable1=variable;
       mc.SetVariable1(variable);
    Code 2
    this.mask_mc.cacheAsBitmap=true;
    this.mask_mc.cacheAsBitmap=true;
    Text1.mask=(mask_mc);
    function SetVariable1(variable:String):void {
    if (variable!=null) {
      for (var i:int = 0; i < numChildren; i++) {
       var mc:MovieClip=getChildAt(i) as MovieClip;
       if (mc!=null&&mc.name=='Text1') {
        var object:TextField=mc.getChildByName('InputTextField1') as TextField;
        if (object!=null) {
         object.text=variable;
    SetVariable1(this.variable1);

    it's possible, but unlikely, you'll fix anything by converting to as2.  so, what problems are you having with as3?

  • Some AS3 code needs to be AS2

    As I have been told, the following code is mixing as2 and as3.
    picHolder[1].onPress = function() {
              picHolder[1].width = card.width;
              picHolder[1].height = card.height;
              picHolder[1].x = 0;
              picHolder[1].y = 0;
              card.addChild(picHolder[1]);
    I presume the AS3 code is whats inside the function (My addition), as the function code was there when following the as2 tutorial.  Basically, when the user clicks the image in array element 1, this image should be set as the background of the movieclip card.  How would I change the inside so that is was AS2 code?
    cheers

    Well, what I have done is
    picHolder[1].onPress = function() {
              picHolder[1]._width = card._width;
              picHolder[1]._height = card._height;
              picHolder[1]._x = 0;
              picHolder[1]._y = 0;
              card.addChild(picHolder[1]);
    Now it does slightly what I want, but it doesnt get placed into the movieclip how it should.  Not sure if I am doing everything how i should be doing it.

  • Blu-ray Error: fatal error, code 6, audio buffer underflows...

    Ughh.... So its been a few months since I stopped using CS6 Encore because it loves to crash for all kinds of bad reasons. Today I needed to do a new project, and used a simple 1920x1080p MP4 file created by Adobe Media Encoder, and used a basic menu template in Encore. Also added a slideshow timeline with one Mp3 audio set to loop. During the building image part of the build process, I get the fatal error code 6, audio buffer underflows. Total bitrate too high neat time = 0.00000 seconds -
    First off, I set the BR transcode setting to auto and it spends  pleanty of time transcoding the file to a 15mbps bitrate, so why is Encore not first taking care of all the source files correctly in transcoding...?

    Ok.... 100% the fault of the software. I am an SE, and build systems all the time for my business, so if I knew of these simple problems, Id go into the code and devise a solution...please Adobe, fix Encore.
    Here are my simple finding from solving this problem (first post):
    - Of the 2 simple Mp4 files produced by Media Encoder, one, which runs only 2 minutes, had a peak of a little over 10mbps. I dropped the file back into Encoder and set the same mp4 profile to max of 6mbps and then replaced the file in the encore project, ran build and it worked fine.
    SO.... If I can use a simple free bit of software to look at the bitrate of a file (google Bitrate Viewer) and determine that the peak was possibly too high, why oh why cant adobe write a better transoding logic algorythm to decide if a video in a timeline needs to be reprocessed at a slightly lower bitrate before just attempting a build and then throwing an error. For the love of all that is holy, please tweek your transcoding decision process to prevent these simple errors.

  • Can AS1 code call AS3 code?

    I was wondering if there was any way for AS1 code to call AS3
    code.
    I need to write a server extension for SmartFox Pro. I just
    found out that the only version of action script that SmartFox
    sever extensions can be written in is AS1. However, I have a bunch
    of code already written in AS3 that I need to use. I have all of
    the source for the AS3 code.
    Is there a way for me to use my existing code, or am I out of
    luck?
    Thanks in advance
    John Lawrie

    you may be able to use swfbridge to do so, basically
    implementing the LocalConnection class
    http://www.gskinner.com/blog/archives/2007/07/swfbridge_easie.html

  • BluRay error message "code 6, audio buffer underflows. Total bitrate is too high near time = 000000 seconds."

    Hello,
    I’m trying to create BluRays using Encore and I keep getting the following error messages: ‘code 6, audio buffer underflows. Total bitrate is too high near time = 000000 seconds.”
    For info, I created a H264 Bluray - NTSC 24fps master from an Apple prores HQ in Adobe Media Encoder. Duration: 52m, size: 11go. I'm on Mac OSX 10.9.5, the bluray burner is Samsung SE-506CB/RSWD and the BR disks are TDK Blu-ray Disc 50 Spindle - 25GB 4X BD-R - Printable.
    I looked around in forums and tried the following without success: replacing disk name to shorter name without space, creating bluray without menu frame, I also tried with a Mpeg2 bluray master. I tried to export a new master but I can't seem to be able to change the audio bitrate.
    Can anyone please help ?
    Thanks.

    Hi Stan, thanks for getting back.
    I tried to create a new master from Media Encoder but I can only export audio in PCM, I don't get a dolby option. See pic below.
    I tried a new project in Encore and chose PCM instead of Dolby in the preference menu, but I still got the same error. Should I try again limiting bitrate to 15 ? I was on 30 before.
    Please help, I've already wasted 10 bluray and this is getting really frustrating!

  • Creating AS3 code for C++ classes converted with Alchemy (a là Box2D)

    So I've a collection of C++ classes which I now have converting fine with Alchemy to a swc file and can call the exposed functions fine from my AS3 code.
    What I'd really like to do is recreate stuff like Box2D's b2Vec.as class,
    public class b2Vec2 extends b2Base {
        public function b2Vec2(p:int) {
            _ptr = p;
        public function get v2():V2 {
            return new V2(x, y);
        public function set v2(v:V2):void {
            x = v.x;
            y = v.y;
        public function get x():Number { return mem._mrf(_ptr + 0); }
        public function set x(v:Number):void { mem._mwf(_ptr + 0, v); }
        public function get y():Number { return mem._mrf(_ptr + 4); }
        public function set y(v:Number):void { mem._mwf(_ptr + 4, v); }
    This is a simple example, but shows what I'd like to do.  On the C side of things, b2Vec2 is a struct,
    /// A 2D column vector.
    struct b2Vec2
        /// Default constructor does nothing (for performance).
        b2Vec2() {}
        float32 x, y;
    So, for this struct, it's easy to calculate that the first variable of a b2Vec2 object is a float, which will be the value in x and can be read via Alchemy's MemUser classes _mrf (read a fload from a point in memory) with _mrf(pointerAddress) and you can read in the second float with _mrf(pointerAddress + 4).
    My question is, if you're not a C++ expert (me), is there any way to get the definition of a class, as in the addresses of all the variables within and what they are?  So, for the b2Vec2 one, I'd imaging it'd be something like, float32 x 0 float34 y 4 ...
    The reason I'm asking is because one of the classes in particular has loads of variables and to try and get each and every one's information so I can access it directly from the AS3 code would be lots of work and I'm going to assume I'll introduce plenty of human error to it.

    Hi,
    I am facing the similar issue. Can you please tell me how you solved this problem in more details?
    which sample code and how u can find that in SE24 and where to copy that code.
    Thanks in advance..
    vamsi.

  • CRM 2013: Format and C# code to add attachment

    I have created a very simple custom entity. I want to be able to add attachment to this entity record. Now I have 2 questions
    1) What kind of field should I create and  how do make it available in the entity form.
    2) What would be the simplest C# code to add attachment to a entity record
    Hasibur Rahman

    Hi Hasibur,
    1. To enable notes section in your entity form, have a look at the below given link for a step by step tutorial.
    http://www.powerobjects.com/2012/03/06/a-tip-for-notes-when-you-create-a-new-entity-in-dynamics-crm/
    2. To add attachment to a crm record using C# follow the below link:-
    https://msdn.microsoft.com/en-us/library/gg328429.aspx?f=255&MSPPError=-2147217396
       Let me know if you facing any issues.
       Hope this helps!!!
    Thanks,
    Prasad
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

  • Is it possible to write a as3 code that will search for particular file in the loacal disk

    Is it possible to write a as3 code that will search for particular file in the loacal disk

    Not for a web-based design

  • How do I acquire the activation code to add my iPad to view it on Apple TV?

    How do I acquire the activation code to add my iPad to view it on Apple TV?

    on the same network no code is required
    ipad2 and later is required
    and Apple TV 2g and later is required
    read more here
    iOS: Use AirPlay Mirroring

  • [svn:osmf:] 13724: Add fixes to FLV related classes to support DRM protected contents

    Revision: 13724
    Revision: 13724
    Author:   [email protected]
    Date:     2010-01-22 15:17:16 -0800 (Fri, 22 Jan 2010)
    Log Message:
    Add fixes to FLV related classes to support DRM protected contents
    Some minor fixes to FLV related classes
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/flv/FLVParser.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/flv/FLVTag.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/flv/FLVTagAudio.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/flv/FLVTagScriptDataObject.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/flv/FLVTagVideo.as

    Thanks Erik,
    If nothing else, this huge list of updates and fixes, shows clearly that the Logic Dev team is working hard on fixing and improving LPX to a major degree.... and from the list of fixes done.. show they do read the bug reports submitted!
    As an aside....
    I recall how all the 'naysayers' prior to LPX (and in some cases, since...)  were proclaiming how Logic was dead, the team was being disbanded, we won't see any further development, the Dev team doesn't listen or care... and so on....... I wonder where those people are now?

Maybe you are looking for

  • How can I use the Time Capsule in only 802.11b/g?

    I think I am getting interferences on my 5GHz phone from the time capsule, which I have running in 802.11n mode with b/g compatitibility. I assume if the Time Capsule was running in 802.11b/g mode I would not get the intereferences? The Airport utili

  • Tablet difficulties

    So, basically, I have had photoshop, and my tablet for a while. But, my laptop recently died on me, so I bought a new computer with windows 7 and reinstalled the suite, but the pen pressure isn't working properly. It works when I restart photoshop, a

  • Using from clause property

    i have written a query using joins inorder to get data from various tables.i have used FROM CLAUSE QUERY property and placed the quuery in the property pallate.now when Find button is pressed the data is not getting populated..please guide me in gett

  • Creating array of object

    Using JNI, I'm trying to pass an array of object from the C native side to the Java side. I have the following code: JNIEXPORT jint JNICALL Java_classA_methodB( JNIenv *env, jobject obj, jobjectArray objArr ) jclass objClass = ( *env )->FindClass( en

  • My period key doesn't work; until I get it fixed, can I create a shortcut that makes a period?

    thank you