Can I simulate a keypress with actionscript?

Hope someone can help me.
I'm developing an application for use on a tablet PC where the user has the option to make multiple selections with a List Component. I need the ability to simulate the CTRL key being pressed since the keyboard will most likely not be available so the user can select and de-select items from the list. I will most be attaching the code to a button that will open the List component.
Thanks
Maury

If(Key.isDown(17) && Key.isDown(48)){
Key.isDown checks if the key is pressed. 17 is the key code for ctrl, and 48 is the key code for "0" (without " "). This is the full list of key codes:http://people.uncw.edu/tompkinsj/112/FlashActionScript/keyCodes.htm

Similar Messages

  • Can't programmatically control FLVPlayback with ActionScript

    Hello,
    I'm trying to control the video playback of a live video stream using ActionScript 3 code in Flash Professional.
    There's a FLVPlayback component on my stage titled "flvPlayer", and in Frame one of my "Actions" layer, I have the following code:
    import fl.video.FLVPlayback;
    import flash.display.Sprite;
    var vidURL:String = new String("rtmp://www.mycompanyserver.com/test/live/livestream");
    var flvPlayer:FLVPlayback = new FLVPlayback();
    addChild(flvPlayer);
    flvPlayer.source = vidURL;
    flvPlayer.isLive = true;
    flvPlayer.autoPlay = true;
    However, the video doesn't play.
    I can get it to work by adding the source to the Compenent Parameters window, but I need to be able to access those parameters in code.
    Thanks in advance.

    To add to this, this comes up in my Output when I test the app:

  • Can't access object using "id" or "name" if created with actionscript

    How can you register an instance of an object with actionscript so that it's id or name value is accessible?
    I included a simple example where a Button is created using mxml and in the same way it is created using actionscript.  The actionscript object is inaccessible using it's "id" and "name" property.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   creationComplete="application1_creationCompleteHandler(event)">
        <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                protected function application1_creationCompleteHandler(event:FlexEvent):void
                    import spark.components.Button;
                    var asBtn:Button = new Button();
                    asBtn.label = "actionscript";
                    asBtn.x = 200;
                    asBtn.id = "asButton";
                    asBtn.name = "asButtonName";
                    addElement(asBtn);
                    trace("mxmlButton="+this["mxmlButton"].label); // returns: mxml  label
                    //trace("mxmlButton="+this["asButton"].label); // returns runtime error: ReferenceError: Error #1069: Property asButton not found on TestId and there is no default value.
                    //trace("mxmlButton="+this["asButtonName"].label); // returns runtime error: ReferenceError: Error #1069: Property asButtonName not found on TestId and there is no default value.
            ]]>
        </fx:Script>
        <s:Button
            id="mxmlButton"
            label="mxml label"
            alpha="0.8"/>
    </s:Application>

    Hi Dan,
    It is a very rare occurrence when I miss not being able to access an object (object property, really) using the ["name"] notation for objects created using actionscript.
    In MXML the compiler is conveniently adding an attribute to the class with the same name as the id, so you can conveniently refer to it using the [] notation. While we explicitly specify an application container to use, the MXML compiler creates a custom container which is a derivative of the base container and to that it adds properties for the children declared in MXML. I guess it also effectively calls "addElement" for us when  the container is being constructed.
    Your example assumes that using "addElement" to add the button to the application container is the same as declaring a variable (ie property ). It isn't, so there's no point in looking for an property of the name "as3Button" using the [] notation, because it doesn't exist. The container is managing a collection of children in it's display list and that's not the same as being accessible as properties of the container.
    Generally speaking, accessing properties using the ["name"] syntax isn't necessary.
    Paul
    [edit: you may wonder why "addElement" doesn't conveniently also add the "id" attribute to be an property of the container class. Unfortunately, it can't because the container class would need to be dynamic and it's not. A further complication would be that adding properties at runtime would invite naming clashes at runtime with associated mayhem. MXML can do this because the compiler generates the class and can trap name duplication at compile time.
    Great question, BTW.
    -last edit changed my "attributes" to be "properties" in line with Adobe's terminology]

  • How can I use LCCS with ActionScript 3 and Flash CS4?

    Hi,
    Using Stratus I was able to create an an application using Action Script 3 and Flash CS4.  The sample code on the Adobe site was quite straight forward and easy to understand.  I now want to switch over to  LCCS but can't find anything any where on how to use Action Script 3 and Flash CS4 with LCCS.  Do I need to know Flex to be able to use LCCS?  Everything was quite simple and easy to understand with Stratus and makes complete sense.  But LCCS is really confusing.  Is there any sample code on how to establish a connection in Action Script 3 and then stream from a webcam to a client.  There is nothing in the  LCCS SDK that covers Flash and Action Script 3.  Please help!  I found the link below on some forum but it takes me nowhere.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=75 9&threadid=1407833&enterthread=y

    Thanks Arun!
    Date: Thu, 29 Apr 2010 11:44:10 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I use LCCS with ActionScript 3 and Flash CS4?
    Hi,
    Welcome to the LCCS world.
    Please refer to the SDK's sampleApps folder. There would be an app called FlashUserList. The app demonstrates how LCCS can be used with Flash CS4. Its a  pretty basic app, but should help you moving.
    We are trying to improve our efforts to help developers in understanding our samples. Please do let us know if we can add something that would help others.
    Thanks
    Arun
    >

  • I can Simulate SC-2345 with NI-DAQmx, but can't simulate input values per channe

    Hi,
    I  can simulate the device sc-2345 with NI-DAQmx but I can not simulate any value for an individual analog input. I can't assign (simulate) a value or waveform to any individual input associated physically with modules SC-AI03 and SC-AI04. 
    Thank you for your help. 
    Mensaje editado por AndresJS

    Hello,
    Can you please be more specific in your doubt? Do you want simulate inputs?
    Regards
    Luciano Borges
    National Instruments Brazil
    Message Edited by Lucianogob on 09-02-2008 03:21 PM
    Luciano Borges
    R&D Engineer
    Pirelli Brazil

  • Dear frnz, i am doing my prjct in Lview. ie online PQ monitoring​. i need to simulate the system with disturbanc​es generated in Lview. so can any bdy plz tel me how to genrte PQ problems in labview. thanks in advance..

    dear frnz, i am doing my prjct in Lview. ie online PQ monitoring. i need to simulate the system with disturbances generated in Lview. so can any bdy plz tel me how to genrte PQ problems in labview. thanks in advance..

    I work in the power conversion industry and do these types of measurements all the time…
    Do you want to just measure power quality or create and measure power quality problems?
    What hardware are you using?
    Power quality analyzer?
    Programmable AC power source?
    Fast Transient Generator?
    Here is an example of what I do.
    To create PQ problems I use a California Instruments AC source set to nominal power for the unit under test. Using Labview I program several transients consisting of fixed and random duration dropouts and surges. I also use a Schaffer Fast Transient Burst Generator to apply high frequency noise bursts directly onto power lines.
    For measuring power quality I use a Voltech PM3000A power analyzer and Labview to measure everything from voltage, current, and frequency, to  harmonics and %THD
    Message Edited by RTSLVU on 07-23-2008 10:31 AM

  • Can someone pls help me with this code

    The method createScreen() creates the first screen wherein the user makes a selection if he wants all the data ,in a range or single data.The problem comes in when the user makes a selection of single.that then displays the singleScreen() method.Then the user has to input a key data like date or invoice no on the basis of which all the information for that set of data is selected.Now if the user inputs a wrong key that does not exist for the first time the program says invalid entry of data,after u click ok on the option pane it prompts him to enter the data again.But since then whenever the user inputs wrong data the program says wrong data but after displaying the singlescreen again does not wait for input from the user it again flashes the option pane with the invalid entry message.and this goes on doubling everytime the user inputs wrong data.the second wrong entry of data flashes the error message twice,the third wrong entry flashes the option pane message 4 times and so on.What actually happens is it does not wait at the singlescreen() for user to input data ,it straight goes into displaying the JOptionPane message for wrong data entry so we have to click the optiion pane twice,four times and so on.
    Can someone pls help me with this!!!!!!!!!
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import java.util.*;
    public class MainMenu extends JFrame implements ActionListener,ItemListener{
    //class     
         FileReaderDemo1 fd=new FileReaderDemo1();
         FileReaderDemo1 fr;
         Swing1Win sw;
    //primary
         int monthkey=1,counter=0;
         boolean flag=false,splitflag=false;
         String selection,monthselection,dateselection="01",yearselection="00",s,searchcriteria="By Date",datekey,smonthkey,invoiceno;
    //arrays
         String singlesearcharray[];
         String[] monthlist={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"};
         String[] datelist=new String[31];
         String[] yearlist=new String[100];
         String[] searchlist={"By Date","By Invoiceno"};
    //collection
         Hashtable allinvoicesdata=new Hashtable();
         Vector data=new Vector();
         Enumeration keydata;
    //components
         JButton next=new JButton("NEXT>>");
         JComboBox month,date,year,search;
         JLabel bydate,byinvno,trial;
         JTextField yeartext,invtext;
         JPanel panel1,panel2,panel3,panel4;
         JRadioButton single,range,all;
         ButtonGroup group;
         JButton select=new JButton("SELECT");
    //frame and layout declarations
         JFrame jf;
         Container con;
         GridBagLayout gridbag=new GridBagLayout();
         GridBagConstraints gc=new GridBagConstraints();
    //constructor
         MainMenu(){
              jf=new JFrame();
              con=getContentPane();
              con.setLayout(null);
              fr=new FileReaderDemo1();
              createScreen();
              setSize(500,250);
              setLocation(250,250);
              setVisible(true);
    //This is thefirst screen displayed
         public void createScreen(){
              group=new ButtonGroup();
              single=new JRadioButton("SINGLE");
              range=new JRadioButton("RANGE");
              all=new JRadioButton("ALL");
              search=new JComboBox(searchlist);
              group.add(single);
              group.add(range);
              group.add(all);
              single.setBounds(100,50,100,20);
              search.setBounds(200,50,100,20);
              range.setBounds(100,90,100,20);
              all.setBounds(100,130,100,20);
              select.setBounds(200,200,100,20);
              con.add(single);
              con.add(search);
              con.add(range);
              con.add(all);
              con.add(select);
              search.setEnabled(false);
              single.addItemListener(this);
              search.addActionListener(new MyActionListener());     
              range.addItemListener(this);
              all.addItemListener(this);
              select.addActionListener(this);
         public class MyActionListener implements ActionListener{
              public void actionPerformed(ActionEvent a){
                   JComboBox cb=(JComboBox)a.getSource();
                   if(a.getSource().equals(month))
                        monthkey=((cb.getSelectedIndex())+1);
                   if(a.getSource().equals(date)){
                        dateselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(year))
                        yearselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(search)){
                        searchcriteria=(String)cb.getSelectedItem();
         public void itemStateChanged(ItemEvent ie){
              if(ie.getItem()==single){
                   selection="single";     
                   search.setEnabled(true);
              else if (ie.getItem()==all){
                   selection="all";
                   search.setEnabled(false);
              else if (ie.getItem()==range){
                   search.setEnabled(false);
         public void actionPerformed(ActionEvent ae){          
              if(ae.getSource().equals(select))
                        if(selection.equals("single")){
                             singleScreen();
                        if(selection.equals("all"))
                             sw=new Swing1Win();
              if(ae.getSource().equals(next)){
                   if(monthkey<9)
                        smonthkey="0"+monthkey;
                   System.out.println(smonthkey+"/"+dateselection+"/"+yearselection+"it prints this");
                   allinvoicesdata=fr.read(searchcriteria);
                   if (searchcriteria.equals("By Date")){
                        System.out.println("it goes in this");
                        singleinvoice(smonthkey+"/"+dateselection+"/"+yearselection);
                   else if (searchcriteria.equals("By Invoiceno")){
                        invoiceno=invtext.getText();
                        singleinvoice(invoiceno);
                   if (flag == false){
                        System.out.println("flag is false");
                        singleScreen();
                   else{
                   System.out.println("its in here");
                   singlesearcharray=new String[data.size()];
                   data.copyInto(singlesearcharray);
                   sw=new Swing1Win(singlesearcharray);
         public void singleinvoice(String searchdata){
              keydata=allinvoicesdata.keys();
              while(keydata.hasMoreElements()){
                        s=(String)keydata.nextElement();
                        if(s.equals(searchdata)){
                             System.out.println(s);
                             flag=true;
                             break;
              if (flag==true){
                   System.out.println("vector found");
                   System.exit(0);
                   data= ((Vector)(allinvoicesdata.get(s)));
              else{
                   JOptionPane.showMessageDialog(jf,"Invalid entry of date : choose again");     
         public void singleScreen(){
              System.out.println("its at the start");
              con.removeAll();
              SwingUtilities.updateComponentTreeUI(con);
              con.setLayout(null);
              counter=0;
              panel2=new JPanel(gridbag);
              bydate=new JLabel("By Date : ");
              byinvno=new JLabel("By Invoice No : ");
              dateComboBox();
              invtext=new JTextField(6);
              gc.gridx=0;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(month,gc);
              panel2.add(month);
              gc.gridx=1;
              gc.gridy=0;
              gridbag.setConstraints(date,gc);
              panel2.add(date);
              gc.gridx=2;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(year,gc);
              panel2.add(year);
              bydate.setBounds(100,30,60,20);
              con.add(bydate);
              panel2.setBounds(170,30,200,30);
              con.add(panel2);
              byinvno.setBounds(100,70,100,20);
              invtext.setBounds(200,70,50,20);
              con.add(byinvno);
              con.add(invtext);
              next.setBounds(300,200,100,20);
              con.add(next);
              if (searchcriteria.equals("By Invoiceno")){
                   month.setEnabled(false);
                   date.setEnabled(false);
                   year.setEnabled(false);
              else if(searchcriteria.equals("By Date")){
                   byinvno.setEnabled(false);
                   invtext.setEnabled(false);
              monthkey=1;
              dateselection="01";
              yearselection="00";
              month.addActionListener(new MyActionListener());
              date.addActionListener(new MyActionListener());
              year.addActionListener(new MyActionListener());
              next.addActionListener(this);
              invtext.addKeyListener(new KeyAdapter(){
                   public void keyTyped(KeyEvent ke){
                        char c=ke.getKeyChar();
                        if ((c == KeyEvent.VK_BACK_SPACE) ||(c == KeyEvent.VK_DELETE)){
                             System.out.println(counter+"before");
                             counter--;               
                             System.out.println(counter+"after");
                        else
                             counter++;
                        if(counter>6){
                             System.out.println(counter);
                             counter--;
                             ke.consume();
                        else                    
                        if(!((Character.isDigit(c) || (c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)))){
                             getToolkit().beep();
                             counter--;     
                             JOptionPane.showMessageDialog(null,"please enter numerical value");
                             ke.consume();
              System.out.println("its at the end");
         public void dateComboBox(){          
              for (int counter=0,day=01;day<=31;counter++,day++)
                   if(day<=9)
                        datelist[counter]="0"+String.valueOf(day);
                   else
                        datelist[counter]=String.valueOf(day);
              for(int counter=0,yr=00;yr<=99;yr++,counter++)
                   if(yr<=9)
                        yearlist[counter]="0"+String.valueOf(yr);
                   else
                        yearlist[counter]=String.valueOf(yr);
              month=new JComboBox(monthlist);
              date=new JComboBox(datelist);
              year=new JComboBox(yearlist);
         public static void main(String[] args){
              MainMenu mm=new MainMenu();
         public class WindowHandler extends WindowAdapter{
              public void windowClosing(WindowEvent we){
                   jf.dispose();
                   System.exit(0);
    }     

    Hi,
    I had a similar problem with a message dialog. Don't know if it is a bug, I was in a hurry and had no time to search the bug database... I found a solution by using keyPressed() and keyReleased() instead of keyTyped():
       private boolean pressed = false;
       public void keyPressed(KeyEvent e) {
          pressed = true;
       public void keyReleased(KeyEvent e) {
          if (!pressed) {
             e.consume();
             return;
          // Here you can test whatever key you want
       //...I don't know if it will help you, but it worked for me.
    Regards.

  • Stop and Play All Child MovieClips in Flash with Actionscript 3.0

    I am stuck with the ActionScript here. I have a very complex animated flash movie for eLearning. These contain around 10 to 15 frames. In each frame I am having multiple movie clip symbols. The animation has been created using a blend of scripting and also normal flash animation.
    Now I want to create pause and play functionality for the entire movie. I was able to create the pause function but when i try to play the movie it behaves very strange.
    I was able to develop the pause functionality by refering to the below mentioned links:
    http://www.unfocus.com/2009/12/07/stop-all-child-movieclips-in-flash-with-actionscript-3-0 /
    http://www.curiousfind.com/blog/174
    Any help in this regard is highly appreciated as i am approaching a deadline.
    I am pasting the code below:
    import flash.display.MovieClip;
    import flash.display.DisplayObjectContainer;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import fl.transitions.*;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;
    import flash.events.Event;
    import flash.events.MouseEvent;
    stop();
    // function to stop all movieclips
    function stopAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            (content as MovieClip).stop();
        if (content.numChildren)
            var child:DisplayObjectContainer;
            for (var i:int, n:int = content.numChildren; i < n; ++i)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        stopAll(child);
                    else if (child is MovieClip)
                        (child as MovieClip).stop();
    // function to play all movieclips
    function playAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            var movieClip:MovieClip = content as MovieClip;
            if (movieClip.currentFrame < movieClip.totalFrames) // if the main timeline has reached the end, don't play it
       movieClip.gotoAndPlay(currentFrame);
        if (content.numChildren)
            var child:DisplayObjectContainer;
            var n:int = content.numChildren;
            for (var i:int = 0; i < n; i++)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        playAll(child);
                    else if (child is MovieClip)
                        var childMovieClip:MovieClip = child as MovieClip;
                        if (childMovieClip.currentFrame < childMovieClip.totalFrames)
          //childMovieClip.play();
          childMovieClip.play();
    function resetMovieClip(movieClip:MovieClip):MovieClip
        var sourceClass:Class = movieClip.constructor;
        var resetMovieClip:MovieClip = new sourceClass();
        return resetMovieClip;
    pauseBtn.addEventListener(MouseEvent.CLICK, onClickStop_1);
    function onClickStop_1(evt:MouseEvent):void
    MovieClip(root).stopAll(this);
    myTimer.stop();
    playBtn.addEventListener(MouseEvent.CLICK, onClickPlay_1);
    function onClickPlay_1(evt:MouseEvent):void
    MovieClip(root).playAll(this);
    myTimer.start();
    Other code which helps in animating the movie and other functionalities are as pasted below:
    stage.addEventListener(Event.RESIZE, mascot);
    function mascot():void {
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    var sw:Number = stage.stageWidth;
    var sh:Number = stage.stageHeight;
    // resizing movieclip
    mc1.width = sw/3;
    mc1.height = sh/3;
    // positioning mc
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    stage.removeEventListener(Event.RESIZE, mascot);
    mascot();
    this.mascotAni.y = 100;
    function mascotReset():void
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    stage.removeEventListener(Event.RESIZE, mascot);
    mc1.width = 113.45;
    mc1.height = 153.85;
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    var interval:int;
    var myTimer:Timer;
    // function to pause timeline
    function pauseClips(secs:int, myClip:MovieClip):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myTimer.reset();
      myClip.nextFrame();
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    // function to pause timeline on a particular label
    function pauseClipsLabel(secs:int, myClip:MovieClip, myLabel:String):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myClip.gotoAndStop(myLabel);
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    MovieClip(root).pauseClips(4.5, this);
    // function to fade clips
    function fadeClips(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, 0.5, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to fade clips with speed
    function fadeClipsSpeed(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number, speed:int):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, speed, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to show screen transitions
    function screenFx(target_mc:MovieClip, next_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.OUT, duration:1.2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});
    tranFx.addEventListener("allTransitionsOutDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsOutDone",doneTrans);
    // function to show screen transitions inverse
    function screenFxInv(target_mc:MovieClip, next_mc:MovieClip):void
    var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.SQUARE});
    tranFx.addEventListener("allTransitionsInDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsInDone",doneTrans);
    // function to zoom in
    function zoomFx(target_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Zoom, direction:Transition.IN, duration:3, easing:Strong.easeOut});
    //tranFx.addEventListener("allTransitionsInDone",doneTrans);
    /*function doneTrans(evt:Event):void
      next_mc.nextFrame();
    // Blinds Fx
    function wipeFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Wipe, direction:Transition.IN, duration:3, easing:Strong.easeOut, startPoint:9});
    // Blinds Fx Center
    function fadePixelFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Fade, direction:Transition.IN, duration:1, easing:Strong.easeOut});
    tranFx.startTransition({type:PixelDissolve, direction:Transition.IN, duration:1, easing:Strong.easeOut, xSections:100, ySections:100});

    This movie is an animated movie from the start to end. I mean to say that though it stops at certain keyframes in the timeline it stops for only a certain time and then moves on to the next animation sequence.
    Its not an application where the user can interact.
    On clicking the play button i want the movie to play normally as it was playing before. If the user has not clicked on the pause button it would anyhow play from start to finish.
    Is there anyway where i could send in the fla file?

  • Is there a way to open a local file not a web file with actionscript 3.0?

    Reason for asking is because I am making a media player in Adobe Flash CS6, and was wondering if there was anyway to make a button to open a local .fla file in a directory with ActionScript 3.0 or if there are any other ways I can achieve this?
    Thanks Casey

    with an air app, check the file class.  otherwise, check the filereference class.

  • SWF movie export on frame-by-frame basis WITH actionscript

    Hi there,
    I know they're two ways of exporting flash movies:
    Export the whole timeline. This only allows timeline animations and gets messy because you have to cram up everything on the main timeline.
    Realtime-Export via Quicktime. This is a "full blown" export, but heavily dependent on CPU power or speed of harddrive, depending on resolution.
    I also work a lot with music programs and there is an option called "mixdown". This will render the whole song - as fast as the processor is capable - to a WAV-file. So time doesn't matter anymore, notes don't get skipped, etc.
    I would like to see something like this in flash, too. WITH actionscript.
    I just want flash to export one frame for each "onEnterFrame" event, NOT when the timer tells you, it's time for a "next frame". So this would mean not to trigger the onEnterEvent when the appropiate time has passed, but to trigger it, when the next frame can be exported.
    Libraries like "TweenLite/Max" are capable of doing frame-based animations, independent from the timer, so everything on that end is pretty fine.
    Would be so great if that was possible in any way.
    Is it already in CS5? Or maybe an option in CS6... argh, so many years to wait...
    until then, I have to measure the fps, look out for the lowest number, export at THAT framerate (in most of the cases just 4 or 5 fps, even on a very fast computer - just because 2 or 3 frames happen to render slower than the other 200) and afterwarts set it to 25 again (I use Blender to do this)

    Greg-
    Good Lead - Thanks.
    I learned that having skinned components (which this uses)
    keeps this preloader from working properly. The results were
    unstable. It looks like a great little preloader for other things
    though.
    I also learned that it's a problem that others have
    encountered and that hasnt been solved yet...
    ...."hello Adobe?"
    Thanks again for helping me understand this.
    JL

  • Change the "Font size" in a TLF Textfield with actionscript?

    I could not realize how should I resize my TLF Textfiels in flash cs6 with actionscript??
    None of these worked:
    if (....)
         myTLFText.textSize++;
         myTLFText.fontSize++;
    Error: Access of possibly undefined property size through a reference with static type fl.text:TLFTextField.
    I appreciate your kind help please??

    Here is the part of code I am using to resize the textfield (and other elements).
    /******SET POSITION**********/
    function setPosition():void
          //Position appBG
          appBG.height = stage.stageHeight;
          appBG.width = appBG.height;
          //Fit the appTXT in middle of screen  (AppTXT is a MovieClip contains sourceText - RTLTextField)
          appTXT.sourceText.width = stage.stageWidth * 0.9;
          appTXT.sourceText.x = stage.stageWidth * 0.05;
          appTXT.sourceText.y = stage.stageHeight * 0.1;
          //Fit the maskText layer on top of text;
          maskText.width = appTXT.sourceText.width;
          maskText.height = stage.stageHeight * 0.8;
          maskText.x = stage.stageWidth * 0.05;
          maskText.y = stage.stageHeight * 0.1;
          //Set buttons in their proper position
          if (stage.stageWidth > stage.stageHeight)
                appBG.width = stage.stageWidth;
                appBG.height = appBG.width;
          appBG.x = stage.stageWidth / 2;
          appBG.y = stage.stageHeight / 2;
    Everything works fine, but when I install the apk on my Google nexus (800x1280), the font size looks VERY SMALL and I can hardly read it!
    If I increase the Font size pt (Red Arrow in above PrntScr) to 40. then it reads perfect on phones with 800x1280 screen size. Ok?  But then any OTHER smaller screen cell phones will see the font TOO BIG!
    So I need to set the Font size pt by CODE based on a percent of stageWidth to could solve this. thx.

  • Simulate camera input with Java Media Framework

    I'd like to ask, if there is a way to simulate camera input with JMF?
    I'd like to write a program that registers (somehow) in Windows a new camera device, and I can create a video stream in Java that supplies data of what is "visible" through that "software camera".
    Is it even possible with pure Java (with JMF)?

    Bump!
    The question is sill open and Dukes are waiting.

  • Sound recorder with ActionScript

    Is it possible to build a sound recorder
    with ActionScript? I know that you can
    do it with a Flash Media Server. But that
    requires a steam and a server.
    I just want a simple recorder/player so
    that a user could test and adjust the
    settings of his/her microphone by visiting
    a web page. A user should be able to do
    it without any server resounces, since the
    sound card/microphone/audio are already on
    his/her desktop.
    I'd appreciate any suggestions, with or
    without ActionScript.

    AFIAK not possible without a media server. But you can use
    the open source media server "red5". Its free and can do everything
    (at least thats what the developers say) the Flash Media Server can
    do.

  • Can't simulate Clocking Wizard in ISE 14.7

    Hi!
    I have developed a simple design for a VGA module where I need to produce a 40Mhz clock out of 100Mhz input for an Artix-7 (XC7A100T-CSG324) on an Digilent Nexys4 evaluation board. In order to aquire this clock I have used a Clock Wizard for a DCM. I have synthesise the desing, upload the bit file and everything works fine, as expected on the board.
    I would like to extend the design and add more functionality. I order to achieve this, I need a test bench in parallel that will help me to continue the work. I have started by implementing the simplest test bech just to make sure it works. iSim doesn't want to start and the errors suggests that it doesn't see all the ports of the DCM:
    ERROR:HDLCompiler:25 - "C:/Users/Popa/Desktop/FPGA/NEXYS4/DESIGNS/VGA/VGA_top.v" Line 131: Module <DCM_default> does not have a port named <CLK_IN1>.
    ERROR:HDLCompiler:25 - "C:/Users/Popa/Desktop/FPGA/NEXYS4/DESIGNS/VGA/VGA_top.v" Line 133: Module <DCM_default> does not have a port named <CLK_OUT1>.
    ERROR:HDLCompiler:25 - "C:/Users/Popa/Desktop/FPGA/NEXYS4/DESIGNS/VGA/VGA_top.v" Line 134: Module <DCM_default> does not have a port named <CLK_OUT2>.
    ERROR:HDLCompiler:25 - "C:/Users/Popa/Desktop/FPGA/NEXYS4/DESIGNS/VGA/VGA_top.v" Line 136: Module <DCM_default> does not have a port named <RESET>.
    ERROR:Simulator:778 - Static elaboration of top level Verilog design unit(s) in library work failed
     I don't understand what I'm doing wrong...the same code synthesize and produce succesfully the bit file and everything works fine but I can't simulate it. I'm using ISE WebPACK Design 14.7 (P.20131013).
    My test bench:
    module VGA_top_tb(
    reg clk = 1'b0;
    reg reset = 1'b0;
    initial begin
    #5 reset = 1;
    #30 reset = 0;
    end
    always begin
    #5 clk = !clk;
    end
    VGA_top VGA_DUT(
    //inputs
    .clk (clk),
    .reset_h (reset),
    .up_btn (1'b0),
    .down_btn (1'b0),
    .left_btn (1'b0),
    .right_btn (1'b0),
    //outputs
    .red (),
    .blue (),
    .green (),
    .hs (),
    .vs ()
    endmodule
    DCM code:
    `timescale 1ps/1ps
    (* CORE_GENERATION_INFO = "DCM,clk_wiz_v3_6,{component_name=DCM,use_phase_alignment=true,use_min_o_jitter=true,use_max_i_jitter=false,use_dyn_phase_shift=false,use_inclk_switchover=false,use_dyn_reconfig=false,feedback_source=FDBK_AUTO,primtype_sel=MMCM_ADV,num_out_clk=2,clkin1_period=10.000,clkin2_period=25.0,use_power_down=false,use_reset=true,use_locked=true,use_inclk_stopped=false,use_status=false,use_freeze=false,use_clk_valid=false,feedback_type=SINGLE,clock_mgr_type=MANUAL,manual_override=false}" *)
    module DCM
    (// Clock in ports
    input CLK_IN1,
    // Clock out ports
    output CLK_OUT1,
    output CLK_OUT2,
    // Status and control signals
    input RESET,
    output LOCKED
    // Input buffering
    IBUFG clkin1_buf
    (.O (clkin1),
    .I (CLK_IN1));
    // Clocking primitive
    // Instantiation of the MMCM primitive
    // * Unused inputs are tied off
    // * Unused outputs are labeled unused
    wire [15:0] do_unused;
    wire drdy_unused;
    wire psdone_unused;
    wire clkfbout;
    wire clkfbout_buf;
    wire clkfboutb_unused;
    wire clkout0b_unused;
    wire clkout1b_unused;
    wire clkout2_unused;
    wire clkout2b_unused;
    wire clkout3_unused;
    wire clkout3b_unused;
    wire clkout4_unused;
    wire clkout5_unused;
    wire clkout6_unused;
    wire clkfbstopped_unused;
    wire clkinstopped_unused;
    PLLE2_ADV
    #(.BANDWIDTH ("HIGH"),
    .COMPENSATION ("ZHOLD"),
    .DIVCLK_DIVIDE (1),
    .CLKFBOUT_MULT (20),
    .CLKFBOUT_PHASE (0.000),
    .CLKOUT0_DIVIDE (20),
    .CLKOUT0_PHASE (0.000),
    .CLKOUT0_DUTY_CYCLE (0.500),
    .CLKOUT1_DIVIDE (50),
    .CLKOUT1_PHASE (0.000),
    .CLKOUT1_DUTY_CYCLE (0.500),
    .CLKIN1_PERIOD (10.000),
    .REF_JITTER1 (0.010))
    plle2_adv_inst
    // Output clocks
    (.CLKFBOUT (clkfbout),
    .CLKOUT0 (clkout0),
    .CLKOUT1 (clkout1),
    .CLKOUT2 (clkout2_unused),
    .CLKOUT3 (clkout3_unused),
    .CLKOUT4 (clkout4_unused),
    .CLKOUT5 (clkout5_unused),
    // Input clock control
    .CLKFBIN (clkfbout_buf),
    .CLKIN1 (clkin1),
    .CLKIN2 (1'b0),
    // Tied to always select the primary input clock
    .CLKINSEL (1'b1),
    // Ports for dynamic reconfiguration
    .DADDR (7'h0),
    .DCLK (1'b0),
    .DEN (1'b0),
    .DI (16'h0),
    .DO (do_unused),
    .DRDY (drdy_unused),
    .DWE (1'b0),
    // Other control and status signals
    .LOCKED (LOCKED),
    .PWRDWN (1'b0),
    .RST (RESET));
    // Output buffering
    BUFG clkf_buf
    (.O (clkfbout_buf),
    .I (clkfbout));
    BUFG clkout1_buf
    (.O (CLK_OUT1),
    .I (clkout0));
    BUFG clkout2_buf
    (.O (CLK_OUT2),
    .I (clkout1));
    endmodule
    Thanks!

    Hi Gabor!
    Thanks for your reply. I have noticed your observation that the naming of the DCM is different in the error message. I have re-name it before I post it in here but nothing changed. I have also tried "re-run all" to start the simulation but with no success. 
    In the end, I have manually removed the DCM instance and created a new one with the same parameters. This seems to solve the issue. Now works both on the board and in simulations. I'm not entirely sure what was the problem in order to avoid it next time.
    Thanks for your help!

  • Changing mxml UIComponents with Actionscript

    Hello,
    i´m searching about a way to change the text of labels createtd with Designer by Actionscript. But i try to browse the entire collection to find all used UI-Components.
    If i use the debugger, i can see  an mxmlContent Array with all Components but i can´t use theses in Actionscript.
    Regards
    Thomas

    Hi David,
    thanks for the reply, but that is not, what i want.
    I´m searching about a solution to browse the complete mxml component list in Actionscript.
    We will change the labels of all items by runtime with data from a cfc (Coldfusion component) without hard coding the labels in Actionscript. I need a readable collection of all UI-Components to read the id´s, comparinge these with the cfc datasource and change these with other data from this source.
    As i say, the Applipcation.mxmlContent (or any Group.mxmlContent) has all these properties. Baut i can´t use mxmlContent in Flashbuilder because i got an error, that this property is not defined instead i can read that in the debugger.
    Thomas

Maybe you are looking for

  • My icloud calendar and my wife's are not syncing

    Hoping someone can help with this issue. My wife and I both got my iphones on the day the 6's were released.  With iOS8 installed, we decided to use the new feature of the family iCloud with my existing account being the primary account and her's bei

  • How can I delete the image in Forms 6i?

    How can I delete/clear the image item in Forms 6i which is a database item? and I want to create a report that print the information if the record has been stored a image. so how can I do that? Thx~

  • I1 DISPLAY PRO and DISPLAY MACBOOK PRO 15 " GLOSSY SCREEN

    "Ciao" to all. I recently  i bought a macbook pro 15 "glossy screen. Would like to try to calibrate the monitor with a i1 DISPLAY PRO produced by X-Rite. Some of you have already tried? with what result? Many thanks for the responses.

  • Where do we go to update software?

    I need help finding where to go to update software...it says to go to the settings app and click general ....but it is not there?!

  • Window can not find a system image on this computer

    I have HPPavilion dv6 3134se notebook.when I purchased.its operating system was windows 7 home basic.My friend suggest me to upgrade windows 7 ultimate.he also give dvd of windows 7.i have installed it.after3days a message appear from microsoft.that