Dynamic Smooth Curve using ActionScript

Hi,
Can anyone help me to solve my problem?
I want to draw a smoth Ogive curve using ActionScript. The
shape of the curve can be changed by setting the new values in the
FLA file.
Thanks in advance.
Thanks
Razzak

I'd suggest you have a look at the MovieClip.curveTo() method
in the Help.
It gives a good example of drawing a circle.
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

Similar Messages

  • DYNAMIC CREATION OF LINE SERIES USING ACTIONSCRIPT

    There's something wierd about flex or im doing something
    wrong?
    - when i create a line series manually using mxml and specify
    a id for the series, it works.
    - similarly when i try to dynamically create a line series
    using actionscript & define an "id" property, flex does not
    understand! what am i doing wrong?
    code for reference:
    private function addSeries(series:Array,
    yField:String,id:String) // addseries(series,"date","1000")
    var ls:LineSeries= new LineSeries();
    var stroke:Stroke = new Stroke()
    ls.yField = yField;
    ls.xField="ts"
    ls.dataProvider=dp
    ls.id=id // tried defining it dynamically, but flex does not
    find
    this.mychart.series.push(ls)
    THIS IS THE ERROR I GET : "TypeError: Error #1010: A term is
    undefined and has no properties."

    I see... I played around with the line chart ...
    Hopefully this helps... if not forgive me...
    I know why you are trying to use the id property which i
    agree doesn't work.
    since the series is an array in your lineChart use the index
    to set the visible property false/true.
    lineChart.series[0].visible = true/false;
    <mx:Lineseries id="a1" visible="true"
    dataProvider="{whatever}" />
    <mx:Lineseries id="a2" visible="false"
    dataProvider="{whatever}"/>
    create a function called init();
    public function init():void
    var lineS1:LineSeries = new LineSeries();
    lineS1.visible = true/false;
    lineChart.series.push(lineS1);
    var lineS2:LineSeries = new LineSeries();
    lineS2.visible = true/false;
    lineChart.series.push(lineS2);
    ... and the key is to call this init function on initialize
    event...NOT on createComplete event
    <mx:LineChart.... initialize="init()" .... />
    and to show both lines... call this function...
    public function showLines():void
    lineChart.series[0].visible = true;
    lineChart.series[1].visible = true;
    Hope this helps....

  • Change AreaSeries form property using ActionScript

    I'm trying to build an area chart from a dynamic set of data
    in a database. I never know how many series I'll have, so I have to
    program them in ActionScript. My problem is that I can't seem to
    set the form to "curve" in ActionScript like you can in MXML. Does
    anyone know how to do this?
    My code brings up an error:
    var myTempSeries:AreaSeries;
    myTempSeries = new AreaSeries();
    myTempSeries.form = "curve";
    Thanks!

    "form" is a style property, so you need to use setStyle():
    myTempSeries.setStyle("form", "curve");
    Style properties are set like "regular" properties in MXML,
    but in AS you use setStyle(), and getStyle() to access them.

  • Newbie - how to change the color of a line using ActionScript?

    This must be the most basic question in the world, but I've
    been searching the documentation for an hour.
    All I want to do is to draw a line on the stage, and then
    change its color (or endpoint positions) dynamically using
    ActionScript.
    This is the 1st step to creating complicated dynamic
    animations... (No, I do not want to use the timeline, I want to do
    it dynamically.)
    Yet a line can't be an instance, so I'm confused -- how can I
    possibly do this? Is there some key concept I'm missing here?
    Thanks
    Michael

    AS2 required you to create your own function for doing
    primitive shapes. In AS3 that has changed and the graphics package
    includes not only the old AS2 drawing API but also has methods for
    doing squares, circles etc.
    If you are a VB programmer, my honest opinion is to leave
    your traditional OOP mindset at the door when using Flash.
    Actionscript is still in its infancy and although AS3 does really
    strive for OOP oneness, it isn't there 100% like VB is which has
    been around 20 years longer and gone through numerous additions
    etc. Whenever I learn a new language VB, PHP, C, AS, Java....I try
    my best to look at the language as its own identity. All language
    share similarities but they all have their own idiosyncrisies. Keep
    an open mind and you'll find what you need.
    Most of the seasoned guys here will also tell you that
    although the documentation is decent, you are better off going out
    and picking up a book on Flash 8/CS3 and another one on
    Actionscript. Familiarize yourself with the program that way.
    With your programming background, I'd recommend picking up
    Essential AS2 (or AS3) by Moock depending on your version of Flash.
    Also, if you are more interested in the programmatic side of Flash,
    why not look into Flex Builder and AIR. Since it is purely a
    programming environment (no Flash IDE), you'd be more
    comfortable.

  • Adobe Flash Pro CS6 Doesn't make smooth curves

    He guysI've recently upgraded from Flash Pro CS5 to Cs6 but I've got to a weird problem.
    I can not use pen tool to make smooth curves.
    This is a recording from the problem:
    any ideas?
    Thank in advance

    Adjust your drawing preferences as well. If it recognizes shapes/lines/etc it will try to optimize it.
    Here's a CS5.5 panel but CS6 shouldn't be too far off:
    If it's told to recognize any straight lines or shapes, you start to get those angled/straight lines.

  • Drawing lines with smooth curves

    Hi,
    I'm trying to make a map for an underground system in a PC game and I want something similar to the one Transport for London has:
    http://www.tfl.gov.uk/assets/downloads/standard-tube-map.gif
    I'm a total newbie with Adobe Illustrator, but I'm trying it as I've heard it's what Transport for London uses.
    My question is then, what would be the easiest way of accomplishing multiple lines with different colours and smooth curves, like the lines in my reference picture?
    Thanks in advance,
    Martin

    Martin,
    In addition to what Kurt said, you may draw paths with straight segments and then round the corners afterwards, using Effect>Stylise>Round Corners (you may Object>Expand Appearance to obtain actual roundings).

  • Using Actionscript to create complete scenes

    Ok let me paint a picture. I'm designing an online flash
    application that will dynamically display tutorials stored in a
    MySQL database. These tutorials will be added via a php control
    panel for tutors to add new tutorials to the database.
    So my flash will load, dynamically create a new scene, add in
    some static elements i.e. logo and some other images and then list
    the tutorials for the user to select.
    The user then selects a tutorial and a new scene is
    dynamically created to display the contents of this scene i.e. a
    scrollPane for the text, video component for the video elements and
    the title etc.
    I recently read this tutorial so getting the data from the
    database into Flash shouldn't be a major problem.
    http://www.webmonkey.com/webmonkey/03/40/index1a.html
    Here's what I think I need
    I'm about to start digging through my flash bible so I'll
    edit this and let you know what I've found out myself,
    1. How to create a new scene using Actionscript,
    2. How to add a few images (jpgs) from the library using
    Actionscript,
    3. how to add a scrollPane (all using actionscript),
    4. how to add some text fields,
    5. how to add a video player to access a video from a folder
    on the server and lastly
    6. some kind of back button..
    Majority of these components will be loading content from PHP
    which will access my MySQL server.
    Any help would be greatly appreciated.
    Thanks
    Steve

    A tall order for a single thread! There are many possible
    answers to each question. Plus there are not enough specifics to
    guide you to the correct alternative. The good news it you can do
    what you are planning.
    1. How to create a new scene using Actionscript,
    Do not be confused with the technical feature of a scene in
    Flash IDE. It is not something you use in Actionscript. However
    from a design view, you can create any page oriented content
    application you want. The usually dynamic element for creating a
    page is a MovieClip or the as you mentioned the component
    ScrollPane which is MovieClip.
    Beyond that there are many many ways to go.
    In general you would create one or more template layouts and
    load the content in selecting the template.
    A shell Flash movie would handle the loading of the templates
    and the data or content that would show.
    As well there could be swf that are custom pages that simply
    load and handle all the needed content separately.
    2. How to add a few images (jpgs) from the library using
    Actionscript,
    MovieClip.attachMovie
    You also can load externally using
    MovieClip.loadMovie
    or if you need to manipulate it after loading then
    MovieClipLoad.onLoadInit
    3. how to add a scrollPane (all using actionscript),
    Explained at
    ScrollPane.contentPath">MovieClipLoad.onLoadInit
    4. how to add some text fields,
    The question implies to create the TextField dynamically and
    a central method is:
    MovieClip.createTextField
    5. how to add a video player to access a video from a folder
    on the server and lastly
    Use the FLVPlayback component that is delivered with Flash 8
    Pro. You need to encode the video as FLV format using the video
    encoder that comes with Flash 8 (also possible with import except
    you elected to make it external) or a third party encoder.
    You put the flv files on the server with the swf containing
    the FLVPlayer and use the
    FLVPlayback.contentPath
    method.
    6. some kind of back button..
    Again many many ways to go: You can use the Flash component
    button or create your own. You can make a button from a MovieClip.
    You can do these dynamically or at design time and in either case
    change their functionality and respond to their interactions at
    runtime.

  • DataGrid Control using ActionScript

    Hi,
    Is it possible to generate the rows of a datagrid dynamically
    using actionscript?
    I want to put information of multiple XML's on one line of my
    datagrid.
    Mark

    Ok, I found out my problem, the thing is i wanted to combine
    info in a datagrid, from 2 xml's, but since it's not directly
    possible to access a row of the grid, I created a labelfunction for
    the datagridcolumns which i wanted to populate with a different
    value.
    Source is included below, hope it will help someone.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="1120" height="300" initialize="doInit();">
    <mx:XML id="dataContacts"
    source="/data/Contactperson.xml"/>
    <mx:XML id="dataCommunication"
    source="/data/Communication.xml"/>
    <mx:Script>
    <![CDATA[
    private function doInit():void {
    trace(dataContacts.Contactperson.Firstname);
    protected function getPhonenoById(row:Object,
    column:DataGridColumn):String {
    for each(var node:XML in row.Communicationid) {
    var value:String = new String;
    if (dataCommunication.Communications.Communication.@id ==
    node.toString) {
    value = dataCommunication.Communication.(@id ==
    node.toString()).(@type == "Phone");
    if (value != "") // if the string is empty
    // return to the returning parameter.
    break;
    // returning the value to the cell
    return value;
    ]]>
    </mx:Script>
    <mx:DataGrid x="10" y="10" width="493" id="dg"
    dataProvider="{dataContacts.Contactperson}">
    <mx:columns>
    <mx:DataGridColumn id="dcFirstname" dataField="Firstname"
    headerText="Voornaam"/>
    <mx:DataGridColumn id="dcLastname" dataField="Lastname"
    headerText="Achternaam"/>
    <mx:DataGridColumn id="dcPhone"
    dataField="Communicationid" labelFunction="getPhonenoById"
    headerText="Telefoonnummer"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Canvas>

  • Execute Dynamic SQL statement using procedure builder

    i want to execute a dynamic SQL statment using procedure builder not using forms
    because my statement depending on a variable table name
    i know that i can do that from forms using
    FORMS_DDL('SQL_STAT');
    but i wanna to use the procedure builder
    which function i should use and how?
    please explain in example if you don't mind.
    thanks

    Hi,
    You can very well use DBMS_SQL Package supplied by Oracle for doing this.
    Search for DBMS_SQL in OTN. You will get all info regarding this.
    Regards.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by itslul:
    i want to execute a dynamic SQL statment using procedure builder not using forms
    because my statement depending on a variable table name
    i know that i can do that from forms using
    FORMS_DDL('SQL_STAT');
    but i wanna to use the procedure builder
    which function i should use and how?
    please explain in example if you don't mind.
    thanks<HR></BLOCKQUOTE>
    null

  • How to create Exchange dynamic distribution list using multivalue extension custom attribute

    I am trying to create a dynamic distribution list using an ExtensionCustomAttribute.  I am in hybrid mode with Exchange 2013.  The syntax I have is this: 
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {(ExtensionCustomAttribute2 -eq 'NH')} 
    This works correctly on-prem.  But hosted always results in an empty list.  I can see in dirsync the attribute is in the hosted environment, but for whatever reason, the distribution group gets created but always come up null.
    If I create a group looking at the single valued attributes, such as CustomAttribute6 -eq 'Y', it works correctly on-prem and hosted.  
    If anyone has any suggestions I would appreciate it.

    I don't think I provided enough information about the problem.  Let me add some and see if it makes sense.
    I have an Exchange 2013 on-premise configured in hybrid mode with Office365.  For testing purposes, I have 2 users, Joe and Steve, one with the mailbox on-prem, and the other with the mailbox in the cloud.  Each of them has CustomAttribute6 = 'Y'
    and ExtensionCustomAttribute2 = 'NH'. Dirsync shows these users and these attributes are synced between on-prem and cloud.
    Using on-prem Exchange powershell, I run the following command:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (CustomAttribute6 -eq 'Y')} 
    This correctly finds the 2 users when I query for them as follows:
    $DDG = Get-DynamicDistributionGroup DG_NH
    Get-Recipient -RecipientPreviewFilter $DDG.RecipientFilter | FT alias
    So I then delete this DG, and recreate it this time looking at the multi-value attribute ExtensionCustomAttribute2, as follows:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (ExtensionCustomAttribute2 -eq 'NH')} 
    Replaying the query above, I can see this also works fine and finds my two users.
    Next I open a new powershell and connect to Office 365 and repeat the process there.
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (CustomAttribute6 -eq 'Y')} 
    This correctly finds the 2 users when I query for them.
    And then delete the group and recreate it using the multi-value attribute:
    New-DynamicDistributionGroup -Name "DG_NH" -RecipientFilter {((RecipientType -eq UserMailBox) -or (RecipientType -eq MailUser) -and (ExtensionCustomAttribute2 -eq 'NH')} 
    When I run the query this time it produces no result.  Every test I try results in an empty group if I am using a multi-valued attribute in the search criteria in the cloud.  If I use single valued attribute, it works fine.
    I really need to be able to get multi-valued DDG's working in the cloud.  If anyone has done this and has any suggestions, I would appreciate seeing what you did.  And if this is the wrong forum to port this, if you can point me to a more suitable
    forum I will report there.
    Thanks,
    Richard

  • Do you need to use Actionscript 3 code in Flash player 9 and above?

    Can anyone tell me if I need to use Actionscript 3 code instead of Actionscript 2 code in the following situation:
    I am running a swf file which is contained in a browser window (all files are contained on a CD and I have a 'trust' file set up to let them play properly).  Up until now, I have been using the following Actionscript 2 code to close the browser window (the Actionscript 2 code is on an 'Exit' button within the swf):
    on (release) {
    getURL("javascript:window.close()");
    This Actionscript 2 code has always worked and still works in Flash player 8 and lower.  However, it does nothing when played using Flash player 9.  Can anyone tell me if Flash player 9 won't recognize Actionscript 2 code?  Is it essential to use ONLY Actionscript 3 code if you are using Flash player 9?
    I am having the same problem when I try to launch another html page containing a swf (popped up from the swf contained in the main html window).  I have the following code on the button to launch the popup html window.  It always worked, but suddenly no longer works with Flash player 9.  Here is the code I am using:
    on (release) {
                getURL("javascript:launchWin2('webpage2.html');");
    I have all the necessary background code to launch 'webpage2.html'.  It works everywhere except in Flash player 9.  Can anyone tell me if it is essential to use Actionscript 3 code ONLY on these buttons in Flash player 9?  I am pretty new to Actionscript 3, so any help with syntax would be appreciated. 
    Please note that I don't want to use the projector.
    Thanks!

    You can use both AS2 and AS3 based applications in both Flash 9 and 10.
    As for the issues you describe - perhaps Flash General Forum is a better bet:
    http://forums.adobe.com/community/flash/flash_general

  • How to load other obejects in flash file after intro using ActionScript 3.0

    How to load other obejects in flash file after intro using ActionScript 3.0 or any other method all in same fla file. see blow intro screen shot ,this one playing repeatedly without loading other fla pages .only way to load other pages is click on Skip intro .see second screeshot below .i need that site to load after intro .
    see codes already in
    stop();
    skipintro_b.addEventListener(MouseEvent.CLICK, skipintro_b_clicked);
    function skipintro_b_clicked(e:MouseEvent):void{
    gotoAndStop("whoweare");
    There is another script there
    /* Simple Timer
    Displays a countdown timer in the Output panel until 30 seconds elapse.
    This code is a good place to start for creating timers for your own purposes.
    Instructions:
    1. To change the number of seconds in the timer, change the value 30 in the first line below to the number of seconds you want.
    var fl_TimerInstance:Timer = new Timer(1000, 30);
    fl_TimerInstance.addEventListener(TimerEvent.TIMER, fl_TimerHandler);
    fl_TimerInstance.start();
    var fl_SecondsElapsed:Number = 1;
    function fl_TimerHandler(event:TimerEvent):void
              trace("Seconds elapsed: " + fl_SecondsElapsed);
              fl_SecondsElapsed++;
    i have no knowledge about these thing ,any help really appreciated .

    Ned Murphy Thank you very Much .It is working .Great advice

  • How can I turn off auto play of an swf/flv using actionscript?

    Does anyone know how to turn off autoplay, using actionscript, of swf/flv?
    I'm trying to showcase four videos on the same page of a website. each video is a generic media player created in flash. when i test the movie, all the videos start playing at once.
    Also, if possible is there a way to have all four videos in the same media player?

    the media player has an autoPlay property.
    and yes, it also has a contentPath property.

  • How to adjust the path of a tween using actionscript

    I'm a novice at Actionscript3 and would greatly appreciate an answer to what seems like a simple question:
    Here's my project:
    http://home.comcast.net/~samiri/director/mortals/amadoFlashPortrait/index.htm
    Click on the gray scale frame images. A larger version of that image tweens out along the z axis. However it comes from 'somewhere else' not from 'within the frame.' How do I get the each larger gray scale frame image to look like it comes directly from the place where the user clicks (not to one side or the other)?
    So I guess what I'm asking is how to adjust the path of the tween along the x and y axis using the actionscript code (below).
    My method:
    I'm using this line of code in my script:
    var myTween:Tween = new Tween(mdImg, "z", Strong.easeOut, 300, 0, 1, true);
    "mdImg" is the variable that holds the name of the hotspot clicked upon by the user.
    I have the larger (faded edge) image positioned directly on top of the frame image and just kept invisible until the User clicks on the hotspot over the frame image.
    Thanks much.

    Thanks moccamaximum,
    By "do your tweens manually" you mean to use the timeline to do frame-based tweening? That is an option but I'm wondering (as a newbie): Isn't it better to use actionscript to do animation since you have more control and it's time based rather than frame-rate based (and works better on low performance machines)? Just curious if I should be spending the time to learn actionscript or do it in the traditional way.
    Thanks

  • How to get/set value in illustrator preference file using ActionScript 3.0

    Hi all,
    I want to get/set the flex panel components preference in illustrator preference file using ActionScript 3.0.
    I tried to achieve this  like --
    import com.adobe.illustrator.Preferences;
    var pref : Prefereneces = new Preferences();
    //To set value I used  this...
    pref.setStringPreference("url", id1.text);
    //To get value I used this..
    id1.text = pref.getStringPreference("url");
    i think there is prb in creating  Preference variable but I am unable to resolve.
    plz help.
    Thanks.

    I am having trouble with setStringPreference. It seems to be setting the value to 0 in the Prefs file. When I first wrote the code, it was working, but something is keeping it from saving the right value now. Did you get yours working? Any ideas?

Maybe you are looking for

  • Look for 'Purchase Order' and 'Due date' Tables

    Hi Everyone, iam creating a Form for an automatic payment and i have some difficulties to find the table of these fields : - Purchase Order (EBELN) - Due date (NETDT) Please can u help me? Regards.

  • How to getcapabilities of user who logged into IDM?

    Hi All, I am having the same problem. I have posted this question earlier also. But some one said forms will always have the refrence of the configurator. But in the documentation its is said that <ref>:display.session</ref>, will be a valid Identity

  • About erasing content on the iPod 4th Gen

    I decided to erase all content from my ipod. I heard it would take a couple hours to do so depending on how much content is on the iPod. It has been "erasing" and rebooting itself for two days. Is it supposed to reboot every 10 or so minutes and then

  • Problema de activacion Adobe muse 2014

    yo compre un abono de adobe muse el año pasada a hora he actualizado a Adombe Muse 2014 y me salio que ya se vencio mi version de prueba como puedo solucionar esto me pide un numero de serie que no tengo que puedo hacer

  • Elements 12, sharing an album in Revel

    I am attempting to email a URL to share an album out of Elements 12.  I receive the error message: "Could not perform this operation because the default email client is not properly installed."  I have no idea what to do next.  Help?