How do I add flash cs4 game with AS3 to flash cs4 website??

I have created a game in flash with ActionScript 3 and now want to add it to a website I have created with pages seperated into keyframes. Ideally, I am trying to have the game start when a link on the home page is selected. I would also like the users to be able to download the game themselves??? Any ideas for a flash novice??

Thank you so much!!! I just added it with a UI Loader Component! Worked really well... although it looks like doing that picked up an issue with some of my code? It's now looping over and over again and the counter within my game (for giving players their score - highlighted in red), is not working?If you are a AS3 guru any help would be greatly appreciated, otherwise thank you so much for your earlier tips
package
    import flash.display.MovieClip;
    import flash.events.*;
    import flash.utils.Timer;
    import flash.text.*;
    public dynamic class Gift extends MovieClip
        private var dx:Number = Math.random() * 10; // make gift scurry
        private var dy:Number = Math.random() * 10;
        public function Gift ()
            this.gotoAndStop(Math.ceil(Math.random() * 4));
            this.addEventListener(Event.ENTER_FRAME, scurry);   
            stage.addEventListener(MouseEvent.MOUSE_DOWN, kill);
        public function scurry (e:Event)
            if (this.x < 0 || this.x > 550)
                this.dx *= -1;
            if (this.y < 0 || this.y > 576)
                this.dy *= -1;
            this.x += this.dx; // make gift scurry
            this.y += this.dy;
        public function die()
            this.removeEventListener(Event.ENTER_FRAME, scurry);
            parent.removeChild(this);
        private function kill (e:MouseEvent):void
            if(e.target is Gift)
                e.target.die();
                score += 10;
                scoreText.text = score.toString();

Similar Messages

  • How do I add URI web link with custom tooltip like "CLICK HERE TO UPDATE" instead of URI web link in tooltip.

    How do I add URI web link with custom tooltip like "CLICK HERE TO UPDATE" instead of URI web link in tooltip.

    You've probably found an answer to this by now, but I think this has been addressed in another forum -- The link below suggested using a button and adding the tooltip to the button. 
    https://forums.adobe.com/thread/304974?start=0&tstart=0
    Sounds like it would work but I haven't actually tried it. 
    Good luck~!

  • How do I add an Airport Extreme with Time Capsule to an existing non-Apple network?

    How do I add an Airport Extreme with Time Capsule to an existing non-Apple network?  I have an ISP provided wireless Router that has to remain as the base station.  I am able to join my 1/2TB Airport Extreme and Airport Express to the network, but I can't access/use Time Machine.

    One option would be to connect the Time Capsule (TC) to the ISP-provided wireless router by Ethernet. You can then configure the for a roaming network. Then, depending on what your goal is for the AirPort Express, you can either: 1) Add it to roaming network, 2) Configure the TC & the Express for an "extended" network, or 3) Configure the Express to "join" the roaming network for AirPlay.

  • How can I add header on printing with Numbers

    How can I add header on printing with Numbers? The previous version use to have it and I cannot find it in the new one ...

    Hi Tanya,
    Glad to hear that you found how to edit page headers and footers in Numbers 3.2. I agree that Help in Numbers 3 is woeful. No searchable PDF to download and use offline. All is online (one page at a time) and we need to know the terms we are looking for before we look.
    The first HelpDesk:
    http://www.youtube.com/watch?v=pQHX-SjgQvQ
    For printing to paper where layout is important, I use Numbers '09 (Numbers 2.3) with its Print View. But it is orphanware. As the name suggests, there has not been a major overhaul since 2009. With that in mind, it is a useful version to hang onto while we hope and wait (and provide feedback to Apple) for something in future versions of Numbers 3.x to provide better layout capability.
    Indeed, each new update of Numbers 3.x has restored more of the old features while adding new features that are enhancements over Numbers '09. Many of the Numbers 3 enhancements reflect long-awaited wishes through this forum, and were passed on by Numbers Feedback to Apple. So it seems that Apple does take heed of feedback.
    In the meantime, I enjoy the charm of Numbers '09 whilst exploring the new features of Numbers 3.
    What has been GAINED in Numbers 3 is here:
    https://discussions.apple.com/thread/5473882?start=75&tstart=0
    (Very long thread because it started with Numbers 3.0, and enhancements have continued through Numbers 3.2).
    Hints on workarounds in Numbers 3 is here:
    https://discussions.apple.com/message/23622372#23622372
    Some workarounds are no longer needed, but what amazes me is how many Numbers '09 features (the so-called "lost" features) were not lost; the settings have simply been moved. Moreover, many features such as margin settings carry over with a Numbers '09 document or template into Numbers 3.
    Hints for layout on screen before printing to paper:
    Try Alignment Guides and Rulers as suggested here:
    Print View workarounds
    Use a layout guide:
    Layout Guide for Numbers
    Regards,
    Ian.

  • How to i add an image path with spry data set

    hi
    how to i add an image path with spry data set. I made a xml file and then created a data set in html but image won't load
    this is my XML
    <?xml version="1.0" encoding="UTF-8"?>
    <banner width = "185" height = "400">
        <item>
            <image scr = "nui-panforte-recipe_01.jpg" ></image>
            <description>CHOC-COCONUT PANFORTE</description>      
            <text1>Try this delicious GLUTEN FREE Christmas treat</text1>
            <text2>CHOC-COCONUT PANFORTE</text2>
        </item>
    </banner>
    this is my HTML
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="../../SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="../../SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.XMLDataSet("recipe_banner.xml", "banner/item");
    //-->
    </script>
    </head>
    <body>
    <div spry:region="ds1">
      <table>
        <tr spry:repeat="ds1">
          <td>{image}</td>
          <td>{description}</td>
          <td>{text1}</td>
          <td>{text2}</td>
          <td>{text3}</td>
          <td>{text4}</td>
          <td>{link}</td>
          <td>{url}</td>
          <td>{target}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>

    It would be helpfull if you actually created an <img> tag to start with
    <img src="{image/@src}" />
    would work.

  • HT5312 how do i add my music library with another apple id user's music library?

    How do I add my music library with another Apple ID user's music library?

    Locate the folders containing the song files, and use the command File > Add Folder to Library.

  • How do I add appointments in calendar with iOS5?

    How do I add appointments in calendar with iOS5? The + button is gone.

    My + button is still there on my Calendar App. Suggest you do a reset.

  • How do I import SWC files created with Flex info Flash CS4?

    I've created very nice UI component using Flex 3 and I have exported it into a SWC file.
    How can I import it into Flash CS4 to use it there?

    Hmm... if you happen to be familiar with C#, then you may probably know about the problem of P/Invoke (this is a command that lets you access Windows API through C# code, which will apparently prevent it from functioning on other OSs).
    What happens with Flex framework is somewhat similar to this. I.e. it relies to much on the features of Flex compiler and the components of the framework create a lot of cross-dependencies, which makes them barely usable outside the framework.
    So, if you have time and doing this just as a matter of learning, I'd suggest you start an AS project in Flex builder and advance with it compiling it both with Flex and Flash to see if there are any differences (basically, once you see it doesn't compile / doesn't behave as you'd expect in Flash, you'll know you used something that is specific to Flex). These would be mostly meta tags, like [Bindable] for example.
    And, if you need any tutorials on how to code in pure AS, then, well, there are really to many So that you can even choose what's appropriate / goes better with your learning habits.
    If you like video lessons, there're tons of them at gotoandlearn.com, if you prefer reading documentation, here you go: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/class-summary.html
    if you prefer forums / written tuts, then, kirupa.com, actionscript.org, flashkit.com as well as Adobe forums will provide you with a lot of information.

  • How to put Flash video game onto inDesign PDF file and Website page or link?!

    I am making a video game using Adobe Flash 2.0. I need to be able to show what I have through a website (my portfolio) and/or insert it into an interactive Indesign PDF file. The game needs to be able to be played and be used and tested by whoever I send the pdf file to, or whoever is would be view my the site I post it on. I have attempted many different ways to put my game onto my website (cargocollective) and Indesign, but nothing is working! I need help.
    For example I need my game to be placed on the website page, and on the pdf document as an image. When it is clicked on I need it to start so people can play the game. I don't know how to do this and I would really love and need to know how! Thanks.

    Flash should be able to publish an html page which will provide the web page code needed for embedding the swf.  The page it publishes should be sufficient for planting on a server unless you plan to dress it up with other content as well.
    As far as incorporating Flash content into a PDF using InDesign goes, you are best to ask questions about using InDesign in the InDesign forum.  Here is a link to the Overview page whee you can pick which forum applies best to your situation:
    InDesign

  • How do you add people's pictures with contact info?

    How do I add photos of my friends with their contact info?

    See this...
    http://docs.info.apple.com/article.html?artnum=302493
    I would imagine that they just have to be in the program you are syncing from. If you are on Windows XP, the pics would have to be in Microsoft Outlook.
    You would add it here in outlook...
    If you are adding contacts manually (by dragging the vCard files to the iPod) then you cannot have pictures displayed.
    btabz

  • How do I add an email signature with graphic (logo)?

    On my iPhone 5 Im trying to add an email signature with logo to my email account.

    Firefox doesn't do email, it's a web browser.
    If you are using Firefox to access web mail, you need to seek support from your service provider or a forum for that service.
    If your problem is with Thunderbird, see this forum for support.
    [http://www.mozillamessaging.com/en-US/support/]
    or this one
    [http://forums.mozillazine.org/viewforum.php?f=39]

  • How do I add a dismissable notice to my (office 365) public website?

    Hi
    I have a public website and I want to add a small pop-up message that says something like "We have placed cookies on your computer to help make this website better. We use a Google Analytics script which sets cookies. More details can be found in our
    privacy policy. Click here to dismiss this message".
    Ideally this would appear at the top of the page and disappear when clicked.
    Does anyone know how I can do this? There are open source JavaScript's available but all seem to need html changes to the site and I don't think this can be done with the office 365 public website. I can't find anything relevant on the forums but I need
    to do this under EU law as it appears SharePoint uses a cookie and I also want to use google analytics.
    Any help appreciated.
    (this was originally posted on the office 365 forum and MS directed me here)

    hi,
    you can edit the master page for sharepoint online using the sharepoint designer 2013.
    you can add the google analytics and dismissal notice using javascript in master page.
    this link shows how to use sharepoint designer 2010 to change master page this is valid for sharepoint 2013 with office 365 online.
    https://support.office.com/en-in/article/Customize-a-master-page-to-brand-your-site-0a57b837-4c97-4af9-a088-fedf3dfd1dd5?CorrelationId=d0007b5a-c45c-4661-b5fd-4d75c148e2d5&ui=en-US&rs=en-IN&ad=IN
    http://www.sharepoint2013.me/Blog/Post/158/Edit-existing-master-page-in-SharePoint-2013
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

  • How do i add a countdown timer in as3 that starts when the program begins?

    I also want it to remove everything that is on the stage when it reaches 0 and produce a Game Over screen.

    import flash.events.TimerEvent;
    import flash.utils.Timer;
    var countdown:Timer = new Timer (1000,TARGET_TIME);
    //after 60 Seconds every DisplayObject will be removed from stage
    const TARGET_TIME:int = 60;
    countdown.addEventListener(TimerEvent.TIMER, tick);
    countdown.addEventListener(TimerEvent.TIMER_COMPLETE, gameOver);
    function tick(e:TimerEvent):void {
        //this will count upwards 1.2.3.4....
        trace(e.currentTarget.currentCount);
    function gameOver(e:TimerEvent):void {
        // this function will remove all DisplayObjects from your Stage
        // starting from the top
        //It will not remove shapes or anything the user might have drawn on the stage
        //just things that are accessible to ActionScript (Sprites, MovieClips)
        for (var i:int = this.numChildren-1 ; i >= 0; i--) {
            removeChildAt(i);
    //countdown will start only if you call it explicitly
    countdown.start();

  • How can i add a new signature with PKCS1?

    The default sign method of Acrobat is PKCS7,how to change to PKCS1?
    Thanks!

    Hi,
    There are two different tacks you could take here. One way is to set a Seed Value that works on a per signature field basis and the other is to make a change to the registry that works on a general basis. Of course, a change to the registry it's on a per computer basis where as Seed Value, because it's on a per document basis will travel from computer to computer.
    If you want to set the Seed Value it's done via JavaScript. Go to http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.ht m?href=JS_API_AcroJS.88.1.html#1515776&accessible=true and click the Search button and look for "Seed Value". When it returns, click on "signatrueSetSeedValue" and then scroll down to Example 2 to see how to set the subFilter. You're going to want to use the value adbe.x509.rsa_sha1 as opposed to what is shown in the example.
    If you would rather make the change global to the computer then you need to modify the registry (Windows) or plist (Mac). I'll give you an example for Windows, but if you need help with the Mac let me know. Run regedit and then go to HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\9.0\Security\cPubSec with the following caveats. First, if you are using Reader, as opposed to Acrobat, change \Adobe Acrobat\ to \Acrobat Reader\. The other thing is, if you are using an earlier version of Acrobat change "9.0" to the major version number you are currently running. Even if you were using version 8.1 you would still look for 8.0.
    Now that you've navigated to the correct location add the Binary Value "aSignFormat" (without the quotes). Next, edit the value and click into the right side of the dialog and add the same plain text string noted above for use with Seed Value. Please see the attached screen shot (click on the link below to open the picture and then click on the black X to close it). An important thing to note here is the string needs to be NULL terminated. After you've type the plain text string into the right side of the dialog, click into the end on the hex string at the left side and type a zero. You'll note that it adds what appears to be a dot at the end of the plain text string on the right, but it's not really a dot.
    I hope this helps,
    Steve

  • How can I add roles or features with using WMI?

    Can I add features in Windows server 2008/2012 with using WMI? I found only how to see installed features, but can`t found anything in my question. Can anybody help?

    Hi,
    I agree with Ed’s suggestion. Just in addition, you can install roles, role services, or features via
    Install-WindowsFeature PowerShell cmdlets. Please refer to following TechNet article and check if can help you.
    Install-WindowsFeature
    If any update, please feel free to let us know.
    Hope this helps.
    Best regards,
    Justin Gu

Maybe you are looking for