How to use flex

I have set up a project with eventdemo.mxml as the primary
file and while that is open I have started an action script file
with the code below.
It is supposed to make a circle. How do I get it to make a
circle ?
I got this from "Basics of ActionScript 3.0 for Animation" by
Keith Peters. . It tells me to just complile and run the code but
there must be another step because all I get is a blank page, no
errors. I tried adding
var test=new eventdemo; but it still does nothing. What am I
missing. Something VERY basic I am sure. Sure would be nice if the
book I paid 40$ for would tell me.
// ActionScript file
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
public class EventDemo extends Sprite {
private var eventSprite:Sprite;
public function EventDemo() {
init();
private function init():void {
eventSprite = new Sprite();
addChild(eventSprite);
eventSprite.graphics.beginFill(0xff0000);
eventSprite.graphics.drawCircle(0, 0, 100);
eventSprite.graphics.endFill();
eventSprite.x = stage.stageWidth / 2;
eventSprite.y = stage.stageHeight / 2;
eventSprite.addEventListener(MouseEvent.MOUSE_DOWN,
onMouseDown);
eventSprite.addEventListener(MouseEvent.MOUSE_UP,
onMouseUp);
private function onMouseDown(event:MouseEvent):void {
trace("mouse down");
private function onMouseUp(event:MouseEvent):void {
trace("mouse up");

I guess the book isn't at fault after all. I had created a
flex project instead of an actionscript project.

Similar Messages

  • How to use Flex tag library in jsp

    Hi All,
    We are planning to use flex in our J2EE application in order
    to show some charts. Our j2ee application is in JSP,Struts. I have
    searched on google about this and found that I can include flex 3
    tab library in the jsp in order to use mxml tag in the jsp. I have
    written a sample program in the jsp which uses flex.
    <%@ taglib uri="FlexTagLib" prefix="mm" %>
    <SCRIPT LANGUAGE="JavaScript">
    function showMessage() {
    message.value = "Use this application wisely";
    function hideMessage() {
    message.value = "";
    </SCRIPT>
    <mm:mxml border="5" onmouseover="showMessage();"
    onmouseout="hideMessage();">
    </mm:mxml>
    <TABLE>
    <TR>
    <TD><input type="text" name="message"
    size="50"></TD>
    </TR>
    </TABLE>
    I have added entry inweb.xml. See below,
    <taglib>
    <taglib-uri>FlexTagLib</taglib-uri>
    <taglib-location>/WEB-INF/tlds/flex-bootstrap.jar</taglib-location>
    </taglib>
    Following are the problems that I am currently facing.
    1) Could anybody let me know whether the entry of
    <taglib> tag is correct in the web.xml. Is it the correct
    jar(flex-bootstrap.jar) that I should include?
    2) If yes, from where to download it? or
    If no, what is correct jar that i should include and how?
    your response will be highly appriciated as this is the major
    requirement in our project?
    Thanks ,
    Chandan

    Hi,
    Pleas find details at the URL below.
    http://labs.adobe.com/wiki/index.php/Flex_2_Tag_Library_for_JSP
    Hope this helps.

  • CS3 missing components or How to use Flex 2 components in CS3

    Does anyone have a good resource for how to use Flex2
    components in CS3?
    I found an install that said it would install Flex2
    components in CS3, but all it added waas the UIMovieClip for
    packaging Flash MC in swc's for Flex.
    Right now I am specifically trying to solve the missing
    dateField component in CS3.
    But I would like to find out if anyone has found a good
    resource for alternatives to all missing components in CS3.
    I'm hoping the answer is not to build them from scratch.
    Thanks,
    Hunter

    Hi,
    Pleas find details at the URL below.
    http://labs.adobe.com/wiki/index.php/Flex_2_Tag_Library_for_JSP
    Hope this helps.

  • How to use $FLEX$ for DFF segment

    We have below requirement for “Add'l Salary Admin. Details” DFF.
    we have three segments:
    Current Additional Amount -first segment
    Additional Allowance Change % - second segment
    New Additional Allowance - third segment
    e.g.
    Now first segment has fixed value, Assume it is 2000 AED
    And in second segment if value is 3
    Then third segment should show the value: 2000 + 2000 * 3/100
    Third segment is dependent on segment1 and segment2.
    I think, we can achieve this by using $FLEX$
    But I need your guide line, how can we do that?

    below solution is only possible solution.
    Hi,
    Keeping the default SQL statement on its place, use table based value set for segment3 which contains all values from 0 to let say 1,000,000 (such that your calculated values falls in the range).
    Try it. It segment3 will now calculate on the basis of values of segment1 & 2.
    Regards
    Ayaz
    Thanks for everyone's input.

  • How to use $FLEX$ to pass FROM and TO param to another FROM and TO param

    Hello All,
    I have 2 parameters from customer and to customer, both these have same LOV,
    I have to add 2 more parameters from location and to location
    If i use $FLEX$.customer_LOV to pass to the from location LOV how can i use $FLEX$ to pass the TO customer LOV to TO Location LOV.
    As per my knowledge $FLEX$ can be passed from top to bottom in the list of parameters.
    Is there any other way to restrict.
    Regards,
    Sandeep V

    Hi,<br /> I am trying to configure BlazeDS with JBOSS Application Server.<br /> I have downloaded BlazeDS binary version - blazeds_bin_3-0-0-544.zip from Adobe. But in the installation steps, it says that copy blazeds.war, samples.war and console.war into <JBOSS_HOME>/server/default/deploy folder. But in this zip, it contains only blazeds.war file only. I have copied it to <JBOSS_HOME>/server/default/deploy folder.<br /><br />I have restarted JBoss. I didn't get any error. But when i give <br /> http://localhost:8080/blazeds ... i am always getting "Page not found 404" error.<br /><br />Please help me, if you have detailed steps to configure BlazeDS on JBoss.<br /><br />Thanks for your time.

  • How to use Flex Builders Auto Generated CFCs

    OK. Not only have I already gone to a 4 day flex training,
    have an advanced coldfusion certification and work with 3 coworkers
    who have done the same...none of us can figure out how in the heck
    the flex builder's autogenerated cfc's are to be used. No big deal
    on the fact that this might be something we simply are encountering
    for the first time, but the complete and utter absence of a single
    piece of example code or documentation stating how to use this code
    correctly is very very very very irritating.
    Can anybody, share with me anything about how these CFCs are
    to be used correctly. For example. We are using the wizard to
    generate an "Active Record CFC" set of cfc's for an example table
    contain four fields. We have a data grid that is now populated by
    the "getAllAsQuery" function....we would like to implement the
    feature of making this dataGrid updateable. We know how to pass
    data back and forth and yes we could write our own CFC to do
    this...but having it autogenerated is a really neat option...but
    the question remains....how does one use them!!!
    Any help would be much appreciated. Thanks in advance!

    Hi there, what's your name by the way?
    What is a VO or DTO, and why would you use it?
    This was copy from the Java world, so it's a very OOP principle, basically in the OOP world everything is a class that has methods and properties, and you represent everything with classes, a VO is just that a class that represents an entity in your app. You use it for a few reasons in my opinion:
    It allows you to pass strongly typed data between different layers in your app.
    It's more verbose, it's a good OOP practice, and also makes debugging and reading you code easier.
    It allows easy data type conversion between CF and Flex.
    You obviously know how to use the wizards, after you select your table and open the wizard you'll see three different CFC types, if you're using LCDS then select that type if you don't I'll recommend you to go with BEAN/DAO. In Flex Builder you can create a folder link to a system folder, so if you create a folder named MyCFCs and you set this virtual folder to be hold inside c:\ColdFusion8\wwwroot every file that you put in this folder will be place in c:\ColdFusion8\wwwroot so you don't have to manually copy those files.
    In this wizard you'll see CFC folder in there you can select your virtual folder, you'll see below the CFC package name this is extremely important to be set right, what is the CFC package name? Basically it's the same folder structure where your CFCs will be located for instance let's say you're gonna place the files in this folder structure c:\ColdFusion8\wwwroot\com\myPersonalDomain\ so your CFC package name will be com.myPersonalDomain.
    You'll probably also would like to enable the option: Create an ActionScript value object in addition to CFCs, the folder where you place this file have to mimic the CFCs folder structure so for an instance you'll have to save inside your src folder, inside a folder com, an finally inside a folder myPersonalDomain . src/com/myPersonalDomain, and the AS Package name should be the same as the CFC.
    Once you're done and click finish, you'll see for files created, one of the the AS VO , and three CFCs.
    yourDataTable.CFC
    This is a CFC that creates the VO or DTO in CFC, it has the same properties definition that the AS version has, also the setters and getter for every property.
    yourDataTableDAO.CFC
    This CFC contains all the code that handles the database access it a could be an insert, update delete or just a read query.
    yourDataTableGateway.CFC
    This is a bridge between your Flex app and your CFCs, it contains a set of methods commonly use when you access a DB, this CFC invocates the methods in the yourDataTableDAO.cfc and returns an object or an array of objects of yourDataTable.CFC type to Flex.
    In Flex what do you have to do in order to use VOs?
    Add a reference to yourDataTable.as class
    Create a remote object.
    Create the event handler(s)
    Make a call to the remote object.
    <mx:Script>
         <![CDATA[
                   import com.myPersonalDomain;
                   import mx.controls.Alert;
                 import mx.rpc.events.ResultEvent;
                  private var myDummyVar:myDataTable;
              private function myEventHandler(e:ResultEvent):void{
                   //do Something
                   trace(event.result.toString());
         ]]>
    </mx:Script>
    <mx:RemoteObject id="myRO" destination="ColdFusion"
    source="com.myPersonalDomain.myDataTableGateway">
         <mx:method name="getAll" result="myResultHandler(event)"
    fault="Alert.show(event.fault.toString())" >
    </mx:RemoteObject>
    <mx:Button label="Call CF" click="myRO.getAll()" />
    Well I hope this would help you, I'm kinda tired this has been by far the largest post I've written.

  • How to use Flex with EJB3?

    Anybody know how to integrate Flex with Java?
    I have a EJB3 project with JPA etc...
    Have to use Eclipse with Flex plugin or can i use Flex Builder and Eclipse only for java classes? (preferring the second option)
    I'm getting crazy, because need this for my college work, too fast as possible.
    Please any explanation or sample.
    Thanks everyone.

    Matt you say, i do not need to write servlet, create wsdl...
    But if i dont do this, my Java Business Rules will be visible to client ?
    If yes...
    1- I need to write Servlet to use HTTP protocol to connect with Flex, then create wsdl of my EJB3.
    2- This wsdl will create client side of my application, then i create my Flex interface normally using HTTP Blaze DS ?

  • How to use Flex Components with Flash?

    Hi!!
    I found a lot of very useful components in the web, but they are all for  Flex, is it possible to use Flex Components with Flash IDE?
    Thanks !!!
    jenry
    PS: this is one of the components I need to use (a tree with checkbox  nodes)
    http://www.sephiroth.it/file_detail.php?pageNum_comments=30&id=151
    another one:
    http://www.darronschall.com/weblog/2006/09/a-flex-2-checked-tree-control-component.cfm

    Flex components are delivered as SWCs just like Flash components, but the
    SWC format is incompatible with the Flash IDE.
    Also, the default fl.. components in the Flash IDE are incompatible with
    Flex components.
    You should be able to load a Flex SWF into a Flash SWF as long as you aren't
    using fl.. components in the Flash SWF.  If the Flex SWF overlays things
    in your Flash SWF then it might block interaction, but otherwise it
    shouldn't.  I don't think the statement you quoted is true for all
    configurations.
    But loading a Flex SWF into a Flash SWF isn't going to help you use those
    Flex components from your Flash IDE.  Try Flash Builder 4 to build out the
    Flex portion of your application.  I haven't tried it myself, but it I think
    it is supposed to have better integration with Flash.

  • How to use Flex in JSP

    Hi ,
    I am new to Oracle BPM . I have created a sample Process flow with Two Participants and two roles .And Also i have created the ScreenFlow using Jsp's . Now my problem is we need to integrate Adobe flex inside Jsp's or is there a way we can directly use Flex mxml files for UI . Is there way to use Taglibs which supports Adobe Flex in Jsp ..?
    Thanks,
    KM
    Edited by: user7711237 on Sep 23, 2009 5:00 AM

    This is a very interesting question. Please pardon my limited knowledge of OBPM and Flex, but it sounds like there are a couple of options.
    1. PAPI - build an external web app with Flex front end and a server server-side component that uses PAPI (or PAPI WS) for integration with OBPM
    2. JSP - this is a lot more hacky (if at all possible) - build custom JSPs using the standard OBPM taglibs, etc., and Flex app. Then use Flex / JavaScript interaction to invoke submit the from on the JSPs.
    Here are a few links for #2
    http://www.switchonthecode.com/tutorials/flex-javascript-tutorial-simple-interaction
    http://www.vipercreations.com/tutorials/Adobe%20Flex/35/
    http://www.abdulqabiz.com/blog/archives/2005/04/28/calling-a-flex-function-from-javascript/
    It almost sounds like #1 might be a good long-term solution for complex UIs, while #2 would fit better for a smaller and more simple Flex UI that need to be developed quickly. Hope others might offer better suggestions.
    HTH.

  • How to use flex Component Kit to make a button

    Hi all.
    i have a little confuse about use Flex Component Kit to make a simple button.
    i try to use Flex button templte in FlashCs3 to make a button.
    the three frame i draw like this way:
    on:
    [url=http://xs.to][img]http://xs142.xs.to/xs142/09332/snap1958.jpg[/img][/url]
    over:
    [url=http://xs.to][img]http://xs142.xs.to/xs142/09332/snap3362.jpg[/img][/url]
    down:
    [url=http://xs.to][img]http://xs142.xs.to/xs142/09332/snap4122.jpg[/img][/url]
    but , when i mouse over the button , it seem turn to over frame one second.
    and then the colour turn to overFrame colour but the size is onFrame size.
    same happen when i click the button .
    somehow ,the colour turn to what i want, but the size still the same as onFrame , no matter over the button or click the button.
    can i make the button size different with normal button size?
    thankes.
    link:[url]http://up.izy8.cn//up1/1250033814.swf[/url]

    Hi,
    this is from the ADF Developers guide which is available on OTN:
    if (!password.equals(confirmPassword))
    FacesMessage fm = new FacesMessage();
    fm.setSummary("Confirm Password");
    fm.setDetail("You've entered an incorrect password. Please verify that you've
    entered a correct password!");
    FacesContext.getCurrentInstance().addMessage(null, fm);
    }Brenden

  • Advice on Learning how to use Flex Data Services

    Hi. I've been using flex for a while and I'm now at the stage
    where I'd like to be able to develop AIR apps. I wanted to do
    something simple to start with...eg. have an AIR app on a few
    friends desktops that lets users tick a box if they can make it to
    a poker game. Do I need to learn another language like PHP to do
    this or can it be done using just Flex? Other than the live docs
    and dev guide that come with flex are there other
    documentation/online info that can be recommended.
    Thanks!

    the LCDS sql assembler might be a good fit for you. it allows
    you to do sql crud from flex. there's not server side coding, just
    xml config.
    http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=dms_st andard_assemblers_2.html#334899

  • How to use Flex mx.charts component in flash project?

    Can anyone enlighten me on how I can use the Flex mx.charts component in my Flash Project? I am using Flash Professional CS4
    Are there any tutourials on the subject.
    Thanks in advance.

    http://www.designscripting.com/2011/03/filtering-flex-chart-data-by-consuming-xml-data/
    http://www.roseindia.net/tutorial/flex/flex4/components/chartactionscript.html
    Or otherwise you can use the below link to use the fusioncharts components
    http://www.fusioncharts.com/

  • How I use flex using command line ??

    Sir,
    I am use Linux. What i will do to learn flex. I downloaded the flex sdk and also add the bin folder at Path. But I dont know how i compile mxml and as file and generate html wrapper... Is there any link where I will find all commands used in flex?   

    anirudhh i am getting this error:
    -bash-3.00$ /app/oracle/product/APP/10.1.3/ant/bin/ant -f /app/oracle/product/APP/10.1.3/bpel/utilities/admin_build.xml adminTasks
    Buildfile: /app/oracle/product/APP/10.1.3/bpel/utilities/admin_build.xml
    [java] Java Result: 1
    [taskdef] Could not load definitions from resource com/collaxa/cube/ant/orabpel-antlib.xml. It could not be found.
    BUILD FAILED
    /app/oracle/product/APP/10.1.3/bpel/utilities/admin_build.xml:15: The following error occurred while executing this line:
    /app/oracle/product/APP/10.1.3/bpel/utilities/ant-orabpel.xml:51: taskdef class com.collaxa.cube.ant.taskdefs.ServerAdmin cannot be found
    Total time: 0 seconds

  • How to use Flex SDK 4.0.0 in Flash Builder Burrito?

    Hello!
    How can I create a project with Flash Builder Burrito that builds against the Flex 4.0 SDK? I tried to copy the 4.0.0 sdk folder over from my Flash Builder 4 installation, but if I create a new project in burrito, it still offers me only choice between 3.5 and 4.5
    what else do I have to do?

    Did you configure it in Window / Preferences / Flash Builder / Installed SDKs?

  • How to use Flex builder with blazeds and JBoss

    Following the instructions it is pretty easy to set up a project to work with the turnkey tomcat. However, I am having problems with JBoss because the app has to be deployed as a .war file. I can create a war file manually and depoly it no problem. How do I get flex builder to deploy to a war file? I want to be able to debug in flex builder and run at the click of a button.

    Hi,<br /> I am trying to configure BlazeDS with JBOSS Application Server.<br /> I have downloaded BlazeDS binary version - blazeds_bin_3-0-0-544.zip from Adobe. But in the installation steps, it says that copy blazeds.war, samples.war and console.war into <JBOSS_HOME>/server/default/deploy folder. But in this zip, it contains only blazeds.war file only. I have copied it to <JBOSS_HOME>/server/default/deploy folder.<br /><br />I have restarted JBoss. I didn't get any error. But when i give <br /> http://localhost:8080/blazeds ... i am always getting "Page not found 404" error.<br /><br />Please help me, if you have detailed steps to configure BlazeDS on JBoss.<br /><br />Thanks for your time.

Maybe you are looking for

  • Question on putting audio waveform inside a video clip

    Hi, I have a animation which I would like to modify by addiing an audio waveform to. Basically its just like having a robot speaking and not only do you hear the audio, but you see the audio as well. Is there a way in FCP to import an existing animat

  • Waste management -  Entry Document

    Hi to All, while trying to do a Purchase order with the Entry document i received this error :User status PAPI is active (WAQ DF7E0D489B08FCF1A81B001871E45E18) how can i solve this error message? thanks C.

  • HELP!! FINDER ICON KEEPS JUMPING. MESSAGE SAYS 'RESTORE WINDOWS'. CAN'T CLICK IT. DESKTOP IS BLANK. I'M IN MY FINALS WEEK!!

    My Finder icon keeps jumping. I can't open a Finder window. A message keeps popping up at the same time asking me whether or not I want to restore my Windows. I can't click on it because it keeps, well, disappearing. I can't even force quit the appli

  • ITunes cannot access files from home network

    Just got new Vista PC. All my music files are on older XP PC. I have set up my home network, and Vista PC can see/access all my XP folders. I have Sonos and Yahoo Jukebox installed on Vista PC and both programs can access the XP music files and play

  • HR Managers Desktop and JVM

    Hi everyone, I have been asked the question "Does Managers Desktop (MDT) require Sun's Java Virtual Machine in order to run?" If MDT <i><b>does</b></i> need a JVM to run ? Can it be one other than Suns version? Thanks in Advance. Tony Roundhill.