I am a Flex/AS3 coder who is puzzled about basic Flash

Hi there,
I am a FLEX coder with 6 months experience by way of Flex
Builder. Coding business apps in AS3 is no big deal to me. The
thing is, is that I am on a new project that uses Flash... and I am
confused so I am looking for a bit of help.
Others on this project have created FLV movies - that is, the
ones like you see on Youtube. They created them by shooting the
content with a digital video camera and encoding it into FLV. What
I need to do add some logic to the movie, such as detecting where
in the movie it has been played to.
Do I need to create a new Flash program to load that movie?
If so, how do I load it? Would I need to create a new interface to
run that movie in, or can I just use the existing movie as the
interface?
I understand that if a movie has "labels" at particular
points in time, I can add an eventHandler to respond to the labels
being triggered. But can I add "labels" to an existing movie?
Would I compile my Flash program with mxmlc, like I do in
Flex?

just in case you never got an flv file working in
flash......here's some code.....jus copy and paste on the first
frame of the main timeline....ie....open new fla.....select first
frame.....press F9...(shortcut for actions panel) paste this code:
var video:Video = new Video();
addChild(video);
// pass null object cus you're not connecting to a
server.....if you are....put in address
var connection:NetConnection = new NetConnection();
connection.connect(null);
var stream:NetStream = new NetStream(connection);
video.attachNetStream(stream);
stream.play("smoke.flv");
//the end
Change that smoke.flv....to whatever file thats on your
computer and save file as whatever you call it....and run file...
if you dont know how to run.......just hit (ctrl+enter)
........ewww....its sleepy time for me.....
...any other questions....while i'm on :D

Similar Messages

  • Compiling AS3 code to an an exe in Flash

    Hi all,
    I appologize in advance if this is an easy question, but I
    can't find the information I need. I'm a new Actionscript user.
    I'm writing an AS3 game in Flash Developer and I have Flash
    CS4 as well. I like the editor in Flash Developer better, so that's
    why I'm going that route.
    Anyway, the program compiles into a SWF fine in Flash Develop
    and I'm not using CS4 at all. However I will need to eventually be
    able to make a PC executable and a Mac executable at a future date.
    Can someone tell me what the process would be? Any advice if
    any of you have done a similar thing?
    One thing I tried last night was creating a new project in
    Flash and linking my main class to that project. It gave me an
    error about using:
    import mx.controls.Button;
    I tried changing it to
    import fl.controls.Button;
    but that had the same problem.
    Am I on the right track here?
    Any help is appreciated.

    Did you create a Flash project or a Flex project?
    The mx.controls package is from a Flex project. To use
    fl.controls in a Flash project, you should first pull a Button
    component into the fla from the components panel. That will create
    the library item necessary to export that class.
    Also, you could try playing your working SWF in the flash
    debug player. Then from the file menu, choose "create projector" to
    create an exe.

  • Designer who want to become a AS3 coder

    I'm an established graphic designer. I don't have any prior
    knowledge of any programming what so ever. I know my way around the
    basic flash animation functions but now I want to take the step to
    become a master in Flash and Actionscript. I want to know where to
    start, I've heard that it's better to know your way around as2
    before you can start with as3, is this true? Or is it possible to
    start right away with as3? I also heard that books like "essential
    Actionsript 3" is hard to understand if you don't have basic
    programming skills with variables and such. Are there any
    book/books that cover it all? Which is the best way to learn
    ActionScript without any former programming experiences??? I'm
    sorry if this question has already been posted, but I'm very eager
    to begin exploring this new world so any tips and tricks are highly
    welcomed!

    There is absolutely no need to know that AS2 even exists in
    order to learn AS3. Learning AS2 will probably only confuse the
    issue.
    There are a number of books that can ease you in to
    actionscript. I recommend "Foundation Flash CS3 for Designers",
    ISBN: 159059861X, "How to Cheat in Flash CS3: The art of design and
    animation in Adobe Flash CS3", ISBN: 0240520580, and, "ActionScript
    3.0 Game Programming University", ISBN: 0789737027. Each of these
    books will give you a good primer into using Actionscript by using
    examples that you can follow.
    "ActionScript 3.0 Cookbook: Solutions for Flash Platform and
    Flex Application Developers", ISBN: 0596526954, is more advanced.
    It shows methods for using actionscript based on tasks that you
    want to accomplish.

  • Flex/AS3 Best way to construct a derived class instance from an existing base class instance?

    What is the best way to handle the instantiation of a derived class from an existing base class.
    I have a base class which is being created via remote_object [RemoteClass alias] from the server.   I have other specialized classes that are derived from this baseclass, but serialization with the server always happens with the base class.     The base class has meta data that defines what the derived class is, for example
    [RemoteClass (alias="com.myco...')]
    public Class Base
         public var derivedType:String;
         public function Base()
    public Class Derived extends Base
         public "some other data"
         public function Derived()
    In my Cairgorm command which retrieves this object from ther server I want to do this:
    public function result (event: Object):void
        var baseInstance:Base = event.result;
         if (baseInstance.derivedType = "derived")
              var derivedInstance:Derived = new Derived( baseInstance );
    What is the most efficient way of doing this?   It appears to me that doing a deep-copy/clone and instantiation of the derived class is pretty inefficient as far as memory allocation and data movement via the copy.

    Thanks for the assistance.  Let me try to clarify.
    MY UI requires a number of composite classes.    The individual components of the composite classes are being transfered to/from the server at different times depending upone which component has changed state.    The construction of the composite classes from the base class happens in my clients business logic.
    Composition happens in a derived class; but server syncronization happens using the base class.    When I recieve the object from Blazeds through the remote object event, it is in the form of the base class.  I then need to instantiate the derived class and copy the elements of the base class into it (for later composite construction).   And likewise when sending the base class back to the server, I need to upcast the derived class to its base class.   But in this case just a mere upcast does not work.  I actually need to create a new base class and copy the attrbutes into it.  I believe this is limitation of how remoting works on Flex/AS3.
    My question is, what is the best way to turn my base class into it's derived class so further composite construction can take place.   The way I am currently doing it is to create a  load method on the base class, that takes the base class as on argument.  The load function, copies all of the instance attribute references from the base class to the target class.
    public Class Base
         public function Base()
         public function load(fromClass:Base)
        {  //  copy the references for all of the instance attributes from the fromClass to this class }
    Then,  after I recieve the base class from the server.   I create a new derived class and pass the base class into the load function like this:
                for (var i:int=0; i < event.result.length; i++) {
                    var derived:Derived = new Derived();
                    derived.load(event.result[i]);
    The drawbacks of this approach is that it now requires 2 extra instance creations per object serialization.   One on recieving the object from the server and one sending it to the server.    I assume copying references are pretty efficient.  But, there is probably some GC issues.     The worst of it is in code maintenance.   The load function now has to be manually maintained and kept in sync with the server class.
    It would be interesting to hear how others have solved this problem.      The server side is an existing application with around 2M LOC, so changing the code on the server is a non-starter.
    Thanks for your help.

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

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

  • 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

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

  • Formatter for Flex/AS Code ?

    Hi
    AM trying to set up the FlexFormatter to my Flex/AS code,
    i happen to download the jar files from sourceforge (http://sourceforge.net/projects/flexformatter/)
    and placed the jar fiiles  at C:\Program Files\Adobe\Flex Builder 3 Plug-in\eclipse\plugins .(also i tried to extract the jar files to the plugin folder, but still no use)
    But am unable to see the icons for the formatter on my toolbar. Am i missing anything.
    or is there a better way of formatting my flex code?
    thanks

    Hi
    i heppen to look at the error log of my workspace, Am getting a NullPointerException , here are the details.
    !ENTRY org.eclipse.ui.workbench 4 2 2009-12-01 12:08:41.321
    !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
    !STACK 0
    java.lang.NullPointerException
        at flexprettyprintcommand.Activator.logException(Activator.java:156)
        at flexprettyprintcommand.AddAutoFormatListener$PartListener.addEditorListener(AddAutoFormat Listener.java:277)
        at flexprettyprintcommand.AddAutoFormatListener$PartListener.partActivated(AddAutoFormatList ener.java:155)
        at org.eclipse.ui.internal.PartListenerList$1.run(PartListenerList.java:72)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.runtime.Platform.run(Platform.java:843)
        at org.eclipse.ui.internal.PartListenerList.fireEvent(PartListenerList.java:57)
        at org.eclipse.ui.internal.PartListenerList.firePartActivated(PartListenerList.java:70)
        at org.eclipse.ui.internal.PartService.firePartActivated(PartService.java:73)
        at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:171)
        at org.eclipse.ui.internal.WWinPartService.updateActivePart(WWinPartService.java:124)

  • 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

  • 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);

  • Freelance Flash AS3 coder needed in Dublin Ireland

    Experienced freelance Flash AS3 coder needed to resolve issues on a  touchscreen interface built using Flash AS3.
    Needs to have experience with Timer Class and URLRequest  method.
    Anyone interested, please let me know.

    We've done these types of playbars before for other clients. Cannot promise anything, but we'll take a look at your requirements.
    For future reference, this link provides some information about commissioning a custom-built widget: http://www.infosemantics.com.au/catalog/widgets/Custom_WDGT_DevService/about
    The most important thing to remember is that anything like this will cost many times more than even the msot expensive widget you can buy online, because those widgets are sold hundreds of times over before the developer recovers their costs.  Development of one-off widgets need to be fully funded by the person that wants it.  If this widget isn't worth a lot to you, but would just have been "nice to have" you're probably NOT going to be interested in what it would cost to build.

  • Back from AS3 code into manual adjustment of properties

    Halo.
    Assuming that I change some properties of an DisplayObject on Stage via AS3 code (for example with the use of Tweener).
    In that situation the DisplayObject won't respond any more to manual changes made via Properties Panel and keyframes on Timeline.
    So, is there any way to make the Display Object again vulnerable for keyframes?
    PS:  MyDisplayObject = null;  unfortunately is not a solution in this case.
    Regards

    Not that I know of. Actionscript trumps the timeline. Once you have changed a property, either by changing that property at a keyframe or by Actionscript, that property is changed and will not revert to some earlier state.

  • Flex Builder 4 (next version) will be called Flash Builder

    Adobe has just announced that the next version of Flex Builder will be called Flash Builder .. the framework will still be called Flex
    I think although the change is confusing, in the long run it adds clarity ... here's why ...
    1. Flash Builder (formerly Flex Builder) is an IDE to write .SWF (Flash Player) files .... no matter what application framework you use, it could be pure AS3 code (i.e your own framework) , Flex framework or anything else .. there are many other framework options (although Flex is the most mature) ... Flash Builder can be used to build in any of those frameworks.
    2. Flex is a framework of classes that solve several everyday application development problems when building apps that can run in the Flash Player ... you can use any tool to write your own classes that use flex framework classes (a flex application) ... Flash Builder (previously Flex Builder) or FDT or a text editor like TextMate.
    Mrinal

    Still don't like the name change...but after chatting for you on Twitter...I think I can use to it -;)
    Greetings,
    Blag.

Maybe you are looking for

  • Can you go back to second page of your menu without going to the main page.

    I have created main page (first play) and second page for the chapters. On the second page, after selecting any chapters, I want to go back to select another chapter from the second page, But the dvd takes me back to the main page instead of second p

  • IC Webclient: Stylesheet and Themes

    Hello, I would like to adapt IC Weblient's stylesheets. I have changed stylesheets according to "Consultant's Cookbook" page 105: BSP-appliction "ic_base" -> MIMEs -> stylesheets. Unfortunately it looks like I cannot change completetly the css-layout

  • Parameterized Mapping

    I have an Object that has a one to many collection. It currently is a managed privately owned, lazy initialized (indirection). Is it possible to parameterize this mapping by passing in or calling a method to get the parameters? I'm currently using Ja

  • Officejet 7410 All-in-One won't start

    Have used the printer successfully for four years.  Recently: 1) 'On' button stopped operating.  Need to plug/unplug the power cord to turn the printer on/off. 2) When power is applied to the printer it appears to be in a perpetual boot.  It does the

  • Certain Pages Open in New tab

    I have developed a site in iWeb and now want to add some new pages to it.  These pages are not links to another site but only to other pages on the current site. My problem is, some of the pages just change in the current window of the browser and so