Actionscript 3.0 Resources

I want to learn just enough AS3 to take my Captivate 5 simulations to the next level. 
My AS3 knowledge is zero.
Does anyone know of any AS3 resources that are specific (or almost specific) to Captivate?
I am a visual learner, but I will read when I must.  Therefore, I am partial to videos or textbooks that are not verbose in nature.
Thanks

Do you want to create widgets? In that case AS3 is very useful. But for Captivate itself, I found JavaScript knowledge more useful, beware that is my opinion.
I liked this book about ActionScript:
Learning ActionScript 3.0    Rich Shupe with Zevan Rosser  ISBN 978-0-596-52787-7
Lynda.com has tutorials Cartoon Smart as well: http://www.cartoonsmart.com/actionscript3_index.php5
Lilybiri

Similar Messages

  • Add to favorites button

    I would like to have an add to favorites button on my flash
    website but it just won't work. I have copied the code from this
    website
    http://www.actionscript.org/resources/articles/24/1/Bookmark-to-IE/Page1.html
    into a new flash movie but when I put it into internet explorer 7
    it won't do anything. but the button on the website above does
    work. so I downloaded the fla from the site above, put it into
    flash 8 and then exported it and guess what it didn't work. this is
    the code I am using.
    on (release) {getURL
    ("javascript:window.external.AddFavorite('
    http://www.actionscript.org/','ActionScript.org
    Flash Resources');");
    is there a setting in flash I need to change so that it can
    'talk' to internet explorer, because all websites that have
    tutorials for add to favorites buttons use the same code, but it
    won't work on my computers.
    thanks for any help
    trigger2160

    it's not a flash issue. it's a browser (and possibly pop-up
    blocker) issue.
    flash can cause any javascript function to execute (though
    you'd be better served to use the externalinterface class rather
    than getURL). you need to find a javascript function that works
    with the browsers that want.

  • Adding a Bookmark Link

    Hello,
    I've been looking all over for how to create a bookmarking link for IE7 using Flash CS4 Action Script 3.
    I'm creating the button using the following code:
    BookMark_mc.addEventListener(MouseEvent.CLICK,gotoBookMark_mc);
    function gotoBookMark_mc(event:MouseEvent):void
    URLLoader ("javascript:window.external.AddFavorite ('http://www.actionscript.org/','ActionScript.org Flash Resources');");
    I get the following error when I click the link straight from the SWF file:
    TypeError: Error #1034: Type Coercion failed: cannot convert "javascript:window.external.AddFavorite ('http://www.actionscript.org/','ActionScript.org Flash Resources');" to flash.net.URLLoader. at 2_PCSP_Sharepoint_Intro_WT_fla::MainTimeline/gotoBookMark_mc()
    I published the SWF and the Index.html file, then accessed that .html file from my web server, but no luck.
    Any ideas on how to do this?
    Thanks in advance.

    you should really use a javascript function that tests for, at least, some common browser types.  and, you should use the externalinterface class to call that javascript function.  so, for example:
    <script language="JavaScript1.2" type="text/javascript">
    function bookMark(url,title) {
        if (window.sidebar) { // Mozilla Firefox Bookmark
            window.sidebar.addPanel(title, url,"");
        } else if( window.external ) { // IE Favorite
            window.external.AddFavorite( url, title); }
        else if(window.opera && window.print) { // Opera Hotlist
            //etc }
    </script>
    could be placed in your embedding html and you can use the following actionscript:
    BookMark_mc.addEventListener(MouseEvent.CLICK,gotoBookMark_mc);
    import flash.external.ExternalInterface;
    function gotoBookMark_mc(event:MouseEvent):void {
        ExternalInterface.call('bookMark','http://www.actionscript.org/','ActionScript.org Flash Resources');

  • Beginner Actionscript Resource Question

    Are there any good resources that explain how to set up a .as file to run a flash app?  I've purchased two books and they both utterly suck at this.  This should be easy material, but I can't find anything.  I don't want to code in the timeline.  I don't want to buy another book for this.
    Thanks for any help.

    if you want to use a .as file without code, you are basically screwed. .as files are code, and the file does not have any way to know you want to use it without you explicity telling it to use it. if the file is in the same work directory of the rest of your project, you dont have to do that much, you can use it as you would any code written in the same movie, if you are using a class declaration (but the filename of the .as should be the same name as the class declared inside). if you are keeping this file in some other directory, you must use 'packgage' and import declarations according to your file tree structure
    filename example.as
    package {
    public class example { // extends Sprite {
    public static function example_func():void {
    trace("called from a movie");
    } //example_func
    }//class
    }package
    _________in a movie inside the same directory:
    example.example_func();

  • Resources,tutorials, samples and actionscript code free

    Hello:
    Do you know some cool webs, samples, resources, code and
    tutorials to
    download?
    Thank you.

    Hi,
       I'm a little lazy right now, and I can't add "www." and ".com" to every link. So please bare with me. You can paste the data here in a browser, and click CTRL + [enter]. (Links other than ".com" are mentioned, so dont worry).
    techiwarehouse
    flashkit
    kirupa
    acrionscript.org
    flash-db
    flashadvisor
    flashbuttons
    poqbum
    flzone
    flashguru.co.uk
    flash-creations
    tutorials.flashvacuum
    swftools
    tutorialdash
    permadi
    flashjester
    flash-applets
    peachpit
    flashscript.biz
    webwasp.co.uk
    experiments.flashmatics.co.uk
    flvskins
    vtc
    flashloaded
    theflashblog
    communitymx
    flashwanted
    designorati
    flash8.betaruce
    fumiononaka
    flashvalley
    tutorialized
    3dnirvana.blogspot
    Some of my favorites. There are more online.

  • I am getting an error while coding between CS5 and Flash CC specifically: Access of undefined property instrument_txt. I am using a book that is made for CS5. Is there a current book or resources for Actionscript 3.0 and Flash CC?

    Scene 1, Layer 'actions', Frame 1, Line 47, Column 2
    1120: Access of undefined property instrument_txt.
    this is my problem. any ideas. thanks

    I did try this and nothing happened, same error codes. The code works fine from CS5 and CS6 Flash versions. The animation runs well, the text displays where it should in the instrument_txt frame. It is when I try this in Flash CC that it creates the code error. here was an error that came up regarding text problems, something with FLT text converted to another text (I am not sure of the name of the text-type and the "FLT" I am not sure of either).
    thanks

  • How can I convert an ActionScript 2 website to ActionScript3?

    I have a website which currently uses Action Script 2.
    When I change the Publish settings from Flash 7 to Flash 9
    and from ActionScript 2 to ActionScript 3, then publish the file, I
    get the following warning:
    WARNING: Actions on button or MovieClip instances are not
    supported in ActionScript 3.0. All scripts on object instances will
    be ignored.
    What can I do to correct this error?
    Is there a simple tutorial that explains how to make the
    changes?
    I subscribe to Lynda.com but I haven't seen useful there.
    I should warn you that I am a beginner when it comes to
    coding.
    Thank you

    Hi NickLW,
    In AS3 there's (like the error mentions) no attaching script
    to
    instances directly. You probably have something like:
    on(release){
    gotoAndPlay( 5 );
    well, atleast the "on( something )" part...
    That's a nono in AS3.
    You'd have to change it to code in a keyFrame in the timeline
    like:
    my_btn.addEventListener( MouseEvent.CLICK, onClick );
    function onClick( e:MouseEvent )
    gotoAndPlay( 5 )
    where my_btn is the instancename of the button.
    Look for migration from as2 to as3 in available resources
    (like:
    http://www.mandalatv.net/fcny/)
    Sure there's no mention on the Lynda courses?
    NickLW wrote:
    > I have a website which currently uses Action Script 2.
    > When I change the Publish settings from Flash 7 to Flash
    9 and from
    > ActionScript 2 to ActionScript 3, then publish the file,
    I get the following
    > warning:
    >
    > WARNING: Actions on button or MovieClip instances are
    not supported in
    > ActionScript 3.0. All scripts on object instances will
    be ignored.
    >
    > What can I do to correct this error?
    > Is there a simple tutorial that explains how to make the
    changes?
    > I subscribe to Lynda.com but I haven't seen useful
    there.
    > I should warn you that I am a beginner when it comes to
    coding.
    >
    > Thank you
    >
    Manno Bult
    http://www.aloft.nl

  • How do I use Embed with an environment variable in an Actionscript AIR project Flash Builder 4.7

    I am using Flash Builder 4.7 to build an Actionscript AIR project.  The project embeds a number of png files from my local directory and I have been using absolute paths which all works fine.
    I have a laptop with which I want to start developing the same project - I set up a git repository that both the laptop and main pc can pull from and so I can get the source where I need it and push it back to the central repository.
    My problem is that the absolute paths for the embed commands don't work on the laptop as it has a different filesystem setup (Windows 8 with one drive as opposed to Windows 7 with a SSD and a data drive).  I thought the solution would be as easy as using an environment variable to specify the path which could then point to a different physical directory on both machines, i.e:
    [Embed(source = "DEVELOPER_RESOURCES/graphics/are/here.png"]
    I did a bit of research and there was quite a lot mentioned about setting up resource directories using path variables which I worked through but I just can't get it to compile.  The Actionscript compiler just won't find the png files however I specify the path.  I tried something with a FLEX project and the compiler didn't complain but I think this is because the compiler for FLEX uses a different convention.
    [Embed(source ="/Project Name/DEVELOPER_RESOURCES/graphics/are/here.png"]  works with FLEX but not Actionscript.
    So does anyone have a recipe for using the Embed command referencing assets using an environment variable that works across multiple machines with different file structures?

    I managed to find a solution on Windows which was to use symlinks and absolute paths.  You an basically point one directory to another so I did something like:
    mklink c:\developer_resources c:/the/local/path/to/my/resources
    and then reference all resources as c:\developer_resources\...
    Now as long as a developer machine has the right link (from c:\developer_resources to the place where the resources are kept) then it seems to work. 
    This doesn't however work for Mac and certainly isn't a solution for passing files between Mac and windows

  • New to flash actionscript, making a game.

    Hi. My name's Rory.
    I am an artist.
    http://www.youtube.com/profile?user=PimpOfPixels
    http://roaring23.cgsociety.org/gallery/
    I am learning action script and Flash so that I can make
    games.
    I am not a complete novice in programming. I am proficient in
    Java and in MaxScript (3DSMAX embedded language).
    I have been making some progress in action script and I have
    a functional (although incomplete) game in the works. You can view
    it here:
    http://secure2.streamhoster.com/~rlu...orniverous.swf
    The idea is it's a color game
    red beats green, green beats, blue beats red. Think paper
    scissor rock.
    The idea is to change the entire circle into one color.
    The graphics are place holders BTW.
    I am using FlexBuilder 2.0 and Flash CS3, and I have come
    across a problem not covered in either of my books.
    I'd really appreciate any help that you guys can offer.
    I have gotten this far on my own.
    My #1 question (and I have many more) is:
    How do you through Flash specify animation segments for a
    MovieClip Symbol?
    Notice how the red creatures occasionally open their mouths.
    I want to have a walk, an attack, an absorb, and a bounce animation
    on the same timeline and trigger the appropriate one depending on
    which color the creature collides with. I do not know how to go
    about this problem. I’ve just been trying to get the walk
    animation to loop without playing the attack animation so far.
    I've tried frame-labeling in flash, with scripts on the key
    frames of a second layer that specify when to stop or repeat the
    animation... No dice.
    I have a symbol named RedShot in the library of a flash
    project named "graphics"
    In my timeline I have 2 animation segments, and I have a
    second layer denoting two corresponding frames named "walk" and
    "attack" from the properties menu.
    On the final frames of the animations I have scripts.
    Code:
    gotoAndPlay("walk");
    and
    Code:
    gotoAndPlay("attack");
    respectively.
    Im my library I have linkage options specified as such:
    Class:RedShot
    BaseClass:flash.display.MovieClip
    export of actionscript#CHECKED
    export on 1st frame#CHECKED
    on the main stage of my flash project I have actionscript for
    2 functions:
    Code:
    function walk(){
    red_shot.gotoAndPlay("walk");
    function attack(){
    red_shot.gotoAndPlay("attack");
    I export the project and the opened window has the "walk"
    animation looping properly.
    In my FlexBuilder project I embed the symbol
    Code:
    //Inside class global variables:
    [Embed(source="../graphics.swf", symbol="RedShot")]
    public var RedShot:Class;
    private var _shot:MovieClip;
    Code:
    //and in my buildShot function:
    _shot = new RedShot();
    addChild(_shot);
    When I build the project the characters appear, and they
    animate. The only trouble is that there are no breaks in the
    animation. The animation loops right through the frames where I
    have specified that the animation should "gotoAndPlay" from a
    different part.
    What's weirder is that I can call
    Code:
    "gotoAndPlay("attack");"
    without an error and it will go to and play from that point.
    The only trouble is that it will begin to loop the entire animation
    again without stopping at the gotoAndPlay events stored in the
    frames of the timeline.
    It seems like all embedded actions are ignored, add I can't
    think of another way to controll the animation.
    Any thoughts?

    After hours of searching the internet I finally got this
    blasted question figured out.
    How to you export a symbol from Flash for use in a Flex
    Builder project without destroying actionscript stored within the
    frames of the Symbol's timeline?
    That's a long winded way of saying: "In FlexBuilder, how do
    you control MovieClips from Flash". I'm trying to make games, and
    this was a particularly important question for me :).
    Here's how:
    1) You need a hotfix from Adobe.
    [HTML]http://kb.adobe.com/selfservice/viewContent.do?externalId=kb401493&sliceId=2[/HTML]
    This allows Flash CS3 to export a SWC file.
    2)You have to set the linkage properties for your various
    symbols in the flash library panel.
    a)right click on symbol in library panel
    b)choose "linkage"
    c)"Class:" = (pick a name)
    d)"Base class:" = flash.display.MovieClip;
    e)"Export for ActionScript" = CHECKED
    f)"Export in first frame"=CEHCKED
    3)If you want to have multiple segmented animations as I
    certainly did you'll want to create frames and actionscripts within
    the symbols timeline to define where these animations are.
    a) in the symbol's timeline make a second layer. We'll name
    that layer "labels" for the sake of not having this get too
    confusing.
    b) on that layer create a new frame for each of the animation
    segments that you'd like to define and stretch them to the length
    of the corresponding animations.(I'm assuming that you have a
    keyframe animation on the 1st layer... otherwise what's the point
    of all this :P?)
    c)in the properties panel name the frames in the "labels"
    layer accordingly ie. "walk" "run" shoot" etc.
    d)Define whether the various animations play once or loop by
    adding a script to the last frame of the animation. If you want the
    animation to loop add
    [CODE]gotoAndPlay("name-of-the-animation");[/CODE]
    if you want the animation to play once and stop add
    [CODE]stop();[/CODE]
    if you want the animation to play once and then return to a
    different animation add
    [CODE]gotoAndPlay("name-of-a-different-animation");[/CODE]
    4) now you can export the symbols to an SWC file. Note: you
    do not get this option unless you have installed the hotfix.
    [HTML]http://kb.adobe.com/selfservice/viewContent.do?externalId=kb401493&sliceId=2[/HTML] .
    a)rightclick on a symbol in the library panel
    b)choose "exportSWCfile..."
    c)export the file to a logical place such as the root of your
    FlexBuilder project.
    5) Now you have to tell flexbuilder about the new SWC file.
    Note: Once this file is added to the FlexBuilder library you can
    instantiate classes from it as though they were included using the
    "include" function.
    a)Right clicking on the root of the project in the Navigator
    view.
    b)going to properties.
    c)Going to library path. (2nd tab)
    d)and pressing the "Add SWC" button
    Now you're done and you can instantiate any of the symbols
    from your library while preserving any actions from your symbols
    timeline just as though you had imported it as a class from a
    typical library.
    Sweet huh?
    Thanks to the countless people and internet resources I found
    on the subject. Hopefully it will be easier for anyone who finds
    this post.
    Here's an adobe video which covers the basic process.
    https://admin.adobe.acrobat.com/_a300965365/p75214263/

  • FAQ: How do I go about learning ActionScript 3.0?

    Here are a few hand-picked resources for getting started with AS3  that hopefully will give new users confidence to try ActionScript and to  know that they are looking at some of the best resources for learning  it. These are all video tutorials.
    Code Snippets and AS3 enhancements – Code snippets were introduced in Flash Pro CS5 and provide  pre-written code that you can apply as a way to get a lot of basic  functionality implemented without learning really any code. They are  also a great way to begin learning ActionScript 3.0 because they are  very small in most cases and reading them will quickly begin to shed  some light on the conventions that are used.
    ActionScript 3.0 101 – Flash Downunder – In this one, Paul Burnett gives a nice long intro lesson covering a lot of the basics. He’s a really good instructor with a good pace.
    Building an application – This is a quick lesson by Todd Perkins that gives a basic intro to some must-have concepts, including event listeners and stop() actions.
    ActionScript 101 with Doug Winnie – This is Doug’s show on Adobe TV. There are many, many episodes that  go from the basic to more specific topics. Most of the episodes are 5-7  minutes long. A great free resource from a very good teacher with a  manageable pace. Note that the episodes are listed in reverse  chronological order (newest first) on the Adobe TV page.
    In this set of tutorials, Ryan Hodson takes an interesting and interactive apporach to teaching AS3. This will get you typing ActionScript in Flash right away:
    Introduction to AS3

    Srami... welcome to the forum...
    your question is MASSIVELY broad and depends on your requirements and delivery expectations.
    Basically... 'best' for what?
    It's helpful if you provide some details for people to assist you.

  • Looking for a contract actionscript developer

    San Francisco Based Contract Actionscript -  Flex Developer | Streaming Video Solution
    We are currently seeking a full or part time (at least for the next several months) senior Actionscript & Flex contract developer to help establish our online streaming video abilities.
    This person must:
        •  have strong application development skills in AS3
        •  be comfortable working with Flexbuilder, Eclipse, Ant or similar tool-sets
        •  have experience with Adobe FMS
        •  be familiar with latest video streaming abilities including use of Dynamic Stream-switching with QOS
        •  be comfortable modifying an established Flash VOD product (such as flowplayer, JW Player, OSMF)
        •  have strong skills in communicating between AS and external supporting applications (Webservices, JSON)
    Our player is the centerpiece of our web experience and must be flexible, secure, and intelligent. The person we are seeking must have strong application development instincts to drive this to successful completion. While we'd prefer candidates with some creative-integration abilities, this is primarily an opening for a veteran application developer with strong, standards-based coding skill and a passion for establishing bullet-proof online solutions.
    Ideally, we are seeking an SF local who would be able to meet on-site when needed, but would consider exceptions for the right fit.
    If interested and qualified please send your resume to [email protected]

    I sure wouldn't turn a new user loose on Wordpress. It gives
    me a headache,
    and a new user would be just lost....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Vix" <[email protected]> wrote in message
    news:eo2urs$pdn$[email protected]..
    > Have you thought about using a system like Wordpress or
    Textpattern? It's
    > free and pretty customisable. It will make it easy for
    you to edit the
    > content yourself too.
    >
    > KJP88 wrote:
    >> Looking for someone versed in dev. i.e. enough to
    include flyout menus,
    >> flash and php to develop a css site for me ( for
    money). Fairly straight
    >> forward, I would add the content, but I live in a
    country where the
    >> average income is about 700 USD a month, so
    hopefully someone with a kind
    >> heart will reply.
    >>
    >> If interested, plz email me here:
    [email protected]
    >>

  • AlivePDF, PurePDF and actionscript 3.0

    Hi there,
    I hope someone can help.. I have created a label generator, basicly the first page is a series of questions, the next page is a rosette and results graphic based on the answers given, this has been done with actionscript 3.0 ( the calculation, of  the answers from the form, activating the graphics (movie_clips) etc.). the next stage is to generate a PDF (of the results page with the rosette and results graphic on it) which can be downloaded or sent. on the surface it seems a relatively simple task, however, the more research i do, the larger the iceberg, i seem to encounter..
    my first question is: is this acheivable through alivePDF/PurePDF, is it a pure actionscript 3.0 solution and would i need to reference the libraries, and require read/write/execute permissions (on the web server), does it matter as to the operating system of the web server?
    are there any tutorials to steer me in the right direction of how to implement such a solution?
    Kind regards
    Keith
    NB if this is in the wrong forum, i do apologize.

    Here's a super rudimentary example to generate a PDF using PurePDF:
    // click anywhere
    package {
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.net.FileReference;
        import flash.utils.ByteArray;
        import org.purepdf.elements.Paragraph;
        import org.purepdf.pdf.PageSize;
        import org.purepdf.pdf.PdfDocument;
        import org.purepdf.pdf.PdfWriter;
        import org.purepdf.pdf.fonts.BaseFont;
        import org.purepdf.pdf.fonts.FontsResourceFactory;
        import org.purepdf.resources.BuiltinFonts;
        public class PurePDFExample extends Sprite {
            public function PurePDFExample():void {
                stage.addEventListener(MouseEvent.CLICK, stageClick);
            private function stageClick(e:MouseEvent):void {
                generatePDF();
            private function generatePDF():void {
                FontsResourceFactory.getInstance().registerFont(BaseFont.HELVETICA, new BuiltinFonts.HELVETICA());
                var bytes:ByteArray = new ByteArray();
                var writer:PdfWriter = PdfWriter.create(bytes, PageSize.A4);
                var document:PdfDocument = writer.pdfDocument;
                document.open();
                document.add(new Paragraph("Hello World!"));
                document.close();
                new FileReference().save(bytes);

  • How can i call a function of a swf-file which is embedded as a Resource in 3D-Annotation?

    Hi.
    I use a Flash-menu as an embedded *.swf in a 3D-Annotation. Now i want to trigger one of the ActionScript-Function out of the 3D-Annotation.
    How can i get access to that function?
    Cause of it is embedded, the callAS() Methods still not possible. But how else can i do that?
    Can u give me a simple example? How is the usability of Flashvariable in the Ressource-Tab of 3d-Annotation?
    Kind regards
    Florian

    It depends to some extent on how your SWF has been bound to the 3D scene. If you have bound it using a script, then you have a FlashMovie object that has a .call() method - but if you've attached it to something using the binding option on the Resources panel you will need to collect a reference first. If you know you are going to talk to the SWF it's best to bind it using JavaScript.
    Let us assume you have a SWF in the resources collection but it's not bound to anything. In the 3D scene there is an object called 'cube' on which the SWF must appear as a material, and the SWF has declared a function to the ExternalInterface engine that is called "myFunction", which expects a string as a variable. Here's what you would put in the script attached to the 3D scene:
    var fm = new FlashMovie("demo.swf");
    var matl = scene.meshes.getByName("cube").material;
    matl.useFlashMovie(fm);
    fm.call("myFunction","hello");
    The call() method is strictly typed - for example if your AS function expects a boolean and you sent it a string, it will not execute. There is also a limit on the possible returned variables - e.g. you cannot send back an Object.
    Note that commands sent in the other direction using ActionScript's ExternalInterface.call() method are targeted at  document-level by default, not at the 3D API - so if your AS is trying to call something it must exist as a document-level JavaScript function. It is possible to divert this traffic into the 3D API using the FlashEventHandler object, but it gets complicated as your code must implement XML encoding of the traffic - this is done automatically by the document-level script but not by the 3D API.
    To answer your second question, in the resources dialog you can define the FlashVars string which is passed to the SWF when it loads - this is the same URL-encoded set of variables that you would send to a SWF when embedding it in an HTML page. It's a static string; you cannot read or edit it with JavaScript but this means it will still work if the user disables the JavaScript engine.

  • Need information about interfaces and namespaces in actionscript 3.0

    Hi,
    I need information about actionscript interfaces and
    namespaces, I'm preparing for ACE for Flash CS3 and I need to learn
    about this subjects and I can not find resources or simple examples
    that make these subjects understandable.
    Anybody can help me!
    Thanks a lot.

    Interfaces (cont.)
    Perhaps the most useful feature of interfaces is that you not
    only can define the data type but also method signature of the
    class that implements this interface. In other words, interface can
    define and enforce what methods class MUST implement. This is very
    useful when classes are branching in packages and team of
    developers works on a large application among others.
    The general syntax for an Interface with method signatures is
    written the following way:
    package{
    public interface InterfaceName {
    // here we specify the methods that will heave to be
    implemented
    function method1 (var1:dataType,
    var2:datType,…):returnType;
    function method2 (var1:dataType,
    var2:datType,…):returnType;
    To the previous example:
    package{
    public interface IQualified {
    function method1 ():void;
    function method2 ():int;
    Let’s write a class that implements it.
    If I just write:
    package{
    public class ClassOne extends DisplayObject implements
    IQualified {
    public function ClassOne(){}
    I will get a compilation error that states that I did not
    implement required by the interface methods.
    Now let’s implement only one method:
    package{
    public class ClassOne extends DisplayObject implements
    IQualified {
    private function method1():void{
    return;
    public function ClassOne(){}
    I will get the error again because I implemented only one out
    of two required methods.
    Now let’s implement all of them:
    package{
    public class ClassOne extends DisplayObject implements
    IQualified {
    private function method1():void{
    return;
    private function method2():int{
    return 4;
    public function ClassOne(){}
    Now everything works OK.
    Now let’s screw with return datatypes. I attempt to
    return String instead of void in method1 in ClassOne:
    private function method1():String{
    return “blah”;
    I am getting an error again – Interface requires that
    the method1 returns void.
    Now let’s attempt to pass something into the method1:
    private function method1(obj:MovieClip):void{
    return;
    Oops! An error again. Interface specified that the function
    doesn’t accept any parameters.
    Now rewrite the interface:
    package{
    public interface IQualified {
    function method1 (obj:MovieClip):void;
    function method2 ():int;
    Now compiler stops complaining.
    But, if we revert the class back to:
    private function method1():void{
    return;
    compiler starts complaining again because we don’t pass
    any parameters into the function.
    The point is that interface is sort of a set of rules. In a
    simple language, if it is stated:
    public class ClassOne implements IQualified
    it says: “I, class ClassOne, pledge to abide by all the
    rules that IQualified has established and I will not function
    correctly if I fail to do so in any way. (IMPORTANT) I can do more,
    of course, but NOT LESS.”
    Of course the class that implements an interface can have
    more that number of methods the corresponding interface requires
    – but never less.
    MORE means that in addition to any number of functions it can
    implement as many interfaces as it is desired.
    For instance, I have three interfaces:
    package{
    public interface InterfaceOne {
    function method1 ():void;
    function method2 ():int;
    package{
    public interface InterfaceTwo {
    function method3 ():void;
    package{
    public interface InterfaceThree{
    function method4 ():void;
    If our class promises to implement all three interface it
    must have all four classes in it’s signature:
    package{
    public class ClassOne extends DisplayObject implements
    InterfaceOne, InterfaceTwi, InterfaceThree{
    private function method1():void{return;}
    private function method2():int{return 4;}
    private function method3():void{return;}
    private function method4():void{return;}
    public function ClassOne(){}
    Hope it helps.

  • How to access android resource in java native extension....??

    hi..
    i want access android resource..
    for example, res/menu/menu.xml, res/values/strings.xml ... etc...
    - R.java -
    /* AUTO-GENERATED FILE.  DO NOT MODIFY.
    * This class was automatically generated by the
    * aapt tool from the resource data it found.  It
    * should not be modified by hand.
    package com.flash.extension.nativelib;
    public final class R {
        public static final class attr {
        public static final class drawable {
            public static final int icon=0x7f020000;
            public static final int notification_icon=0x7f020001;
        public static final class layout {
            public static final int main=0x7f030000;
        public static final class string {
            public static final int extension_app_name=0x7f040001;    -> "hi extension"
            public static final int extension_hello=0x7f040000;
    so i used getResourceId("string.extension_app_name");
    but it's not work.. throw NotFoundException error..
    so i used context.getString(R.string.extension_app_name);
    it's work, but return incorrect value.. -> return value is "0.0.0".. it's versionName in actionScript Client Project..
    why can't access android resource in native extension?
    how to get android resource in java natvie extension..??
    Is there anyone who has a sample source??
    help.. me.. please..

    Hello,
    I am facing the same issue with the native extension i am using follwing code to get the resource id
             Intent inte = new Intent(context.getActivity().getApplicationContext(),SecondActivity.class);
              inte.putExtra("layout",context.getResourceId("layout.secondactivity"));
              context.getActivity().startActivity(inte);
    i am getting this exception "android.content.res.Resources$NotFoundException:layout.secondactivity"
    I have included activity in the native manifest file as well as flex's manifest file for android.
    please help me with this or an example will be great thanks.

Maybe you are looking for