AS3, Flash movies and buttons

Okay, it's been a while since I used Flash (V.4) and things
have moved on just a smidge since. In previous versions Flash was
intuitive... coding was fairly minimal and doing the basics was
straight forward. I need to use Flash to do some fairly simple
stuff - a few buttons linked with various scenes and movies.
I followed the step-by-step instructions in the tutorial for
making a button to play a movie but:
1. The movie (an FLV) doesn't play (I get a flashing movie
icon when I test the page - the movie works fine when imported to
the scene on its own)
2. The button doesn't work
The code (according to the tutorial) should be:
movie1.stop();
but1.addEventListener(MouseEvent.MOUSE_DOWN,startclip);
function startclip(e:MouseEvent):void {
movie1.play();

Hmmm, even posting a message properly seems to be beyond at
the moment!
I meant to add the code that I get (following the steps in
the tutorial):
import flash.events.MouseEvent;
import flash.events.IEventDispatcher;
import flash.display.MovieClip;
movee1.stop();
but1.addEventListener(MouseEvent.MOUSE_DOWN,startclip);
function startclip(e:MouseEvent):void {
movee1.play();

Similar Messages

  • Obtaining the full file path specification from Flash Movie and QuickTime icons?

    How do you obtain the full file path specification from Flash
    Movie and QuickTime icons? I want the path and the file name that
    is contained in these icons. I am using a "dive" to run through the
    icons of a file, and when I come upon these two types of icons, I
    want to obtain the above information that is contained in them. I
    certainly can look in the property dialog box to get this info, but
    there are many icons in these files, and I want to generate a list
    of info based upon the various types of icons that I am processing.
    Thanks

    > How do you obtain the full file path specification from
    Flash Movie and
    > QuickTime icons? I want the path and the file name that
    is contained in
    > these
    > icons. I am using a "dive" to run through the icons of a
    file, and when I
    > come
    > upon these two types of icons, I want to obtain the
    above information that
    > is
    > contained in them. I certainly can look in the property
    dialog box to get
    > this
    > info, but there are many icons in these files, and I
    want to generate a
    > list of
    > info based upon the various types of icons that I am
    processing. Thanks
    >
    For Flash
    Trace(GetIconProperty(iconID, #pathName))
    for QuickTime
    Trace(GetIconProperty(IconID, #filename))
    For full scripting reference for each of these sprites, open
    up the
    Properties panel for each sprite and press the Help button
    that appears on
    the properties page ... or else navigate to these folders for
    the Flash and
    QT help
    C:\Program Files\Macromedia\Authorware
    7.0\xtras\FlashAsset\Help
    C:\Program Files\Macromedia\Authorware
    7.0\xtras\QuicktimeAsset\Help
    You don't want to know how many times I asked Macromedia to
    stop hiding that
    Help!
    Steve
    http://twitter.com/Stevehoward999
    Adobe Community Expert: eLearning, Mobile and Devices
    European eLearning Summit - EeLS
    Adobe-sponsored eLearning conference.
    http://www.elearningsummit.eu

  • Internet Explorer 7, htm page, flash movie and page jump

    I'm developing a simple htm page in dreamweaver which
    contains a flash movie. the page works fine in firefox and
    netscape, but in internet explorer 7 the page jumps when the
    navigation of the flash movie is used. any clues? pls see:
    http://www.multicultural.co.uk/islam.htm
    many thanks

    Hi Arif:
    No i haven´t solved the problem jet, i'm investigating about it but the only thing i've found so far is that i.e. 7 and firefox 2.0 are not entirely compatible qith crm icwc, but they haven't released any support package or update to fix the problem, i've just uninstalled it and re-install i.e. 6 and updated it.
    Regards

  • Flash video and buttons in linux

    Whenever I use flash in firefox and flash on Fedora Core 11, the video goes crazzy.
    Any ideas?

    Thank you...
    I did this, but when I upload to my website -- all I get is a blank screen:
    FYI - I imported the video as FLV and then published as a swf -- was this correct?
    Here is the code:
    <div id="flashContent">
       <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="lighting_examples" align="middle">
        <param name="movie" value="lighting_examples.swf" />
        <param name="quality" value="high" />
        <param name="bgcolor" value="#ffffff" />
        <param name="play" value="true" />
        <param name="loop" value="true" />
        <param name="wmode" value="window" />
        <param name="scale" value="showall" />
        <param name="menu" value="true" />
        <param name="devicefont" value="false" />
        <param name="salign" value="" />
        <param name="allowScriptAccess" value="sameDomain" />
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="lighting_examples.swf" width="550" height="400">
         <param name="movie" value="lighting_examples.swf" />
         <param name="quality" value="high" />
         <param name="bgcolor" value="#ffffff" />
         <param name="play" value="true" />
         <param name="loop" value="true" />
         <param name="wmode" value="window" />
         <param name="scale" value="showall" />
         <param name="menu" value="true" />
         <param name="devicefont" value="false" />
         <param name="salign" value="" />
         <param name="allowScriptAccess" value="sameDomain" />
        <!--<![endif]-->
         <a href="http://www.adobe.com/go/getflash">
          <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
         </a>
        <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
       </object>
      </div>

  • Flash, Flex, and Buttons oh my :)

    Hi world.  I have a programmer who is writing an application in Flex Builder 3.  I am doing all of the graphics in Adobe Illustrator, and we are now facing a situation with the buttons.  I am wondering if there is a way to make a button in Flash and export it to a file that he will have access to the three button states in his programming?  Of course I tried to just export an SWF of a button, and when he imported it, those three states were not available to him.  I have a feeling a solution involves a bit of Actionscript and naming an asset and a symbol for each state.  If anyone could point me to a solution or tutorial to making a button in Flash that would be importable to Flex would be greatly appreciated.  Thanks!

    Well, between the two of you I'm sure this will blow one of your minds:
    http://labs.adobe.com/technologies/flashcatalyst/
    "Transform artwork created in Adobe Photoshop®, Adobe Illustrator®, and Adobe Fireworks® into interactive designs."
    Free download...
    HTH,
    -Ted

  • Flash videos and buttons are disappearing...?

    I start my home with a site that has an editable reigon, and
    a few flash buttons which are layered above a "transparent" flash
    video, the video plays perfectly the first time. I proceed to click
    on one of the links which leads me to another page with one of
    these flash videos nestled behind yet more flash linking buttons
    and a table, this also is working perfectly the first time. Then I
    click yet another link from that page and am now at a simple page
    that consists of only a background and 2 flash link buttons which
    each lead back to the two previous pages described. If i click on
    the link that leads to the first page the Flash buttons reman in
    full working order on the 1st page but the video fails to start
    playing again, even if I refresh. The same goes for if I click the
    link to the second page described, except the buttons do not appear
    as well as the flash video failing to start. I am fairly new to
    dreamweaver, but have been using flash for quite some time. I
    cannot paste the codes here since they are way too long. please
    tell me if you have any ideas on what I should do, your help is
    greatly appreciated. Sorry about this post is confusingly worded.
    Thanks, Rumsey

    Try running Firefox 4.0 Beta 7 in 32-bit mode (close Firefox, control-click the Firefox.app icon, select "Get Info", and then check the box, "Open in 32-bit mode"). This worked for another Mac user in [http://support.mozilla.com/en-US/questions/765367 this other thread].

  • ImageIcon moves and buttons don't when resizing!

    Hi,
    when i resize my applet window, ImageIcon (which i'm using as background) moves along with the applet window, so it stays in the center. The buttons don't. As a result the buttons end up in the wrong place in the applet window compared to the background.
    Does someone have a suggestion for me how to make the ImageIcon stay where it is?
    Here is a piece of my source code. If more is needed, let me know.
    static String imageFile = "kamer zonder kleppen.jpg";
    public Kamer() {
         Container contentPane = getContentPane();
         contentPane.setLayout(new BorderLayout());
         Dichtbutton = new JButton("Dicht");
         Dichtbutton.setBounds(230, 271, 46, 25);
         Dichtbutton.setMargin(new Insets(0, 0, 0, 0));
         Dichtbutton.addActionListener(this);          
         contentPane.add(Dichtbutton);
         picture = new JLabel(new ImageIcon(imageFile));
         picture.setBounds(0,0,800,600);
         contentPane.add(picture);
         setVisible(true);
    I hope someone can help me with this.

    hi, i notiested that you set yoour buttons to be in certain predefined place:
    Dichtbutton.setBounds(230, 271, 46, 25);
    if you would upon any resize event calculate new position, then you would not have the problem you're having right now.
    if you consult JButton's API then you find that there is inherited method from Component that allows you to set new location (setLocation()) for your button
    see following url, that should end after 'int)' not before it:
    http://java.sun.com/j2se/1.4.1/docs/api/java/awt/Component.html#setLocation(int, int)
    but if you would like this button to move without you to code any resize event listeners, then you should use some layout manager, these pack your components on some certain places and upon resize repack it where they think it is apropriate for them to be.
    L.

  • Adobe Flash games and buttons super small in Firefox

    I recently got a new computer and I've noticed certain Adobe Flash games or other features of Adobe Flash don't load to the proper size that they used to. There is room on the screen to be bigger but it just looks like the game or features have shrunk.
    I am running Windows 8.1 and have the latest versions of both Firefox and Adobe Flash. I've tried going back to past versions of FF and Flash; hasn't worked. I tried FF in Safe Mode and resetting it but those didn't work either. They worked fine on my previous computer (5 years older and running Windows Vista). I also tried resizing the pages but the games/images stay small in proportion to the resizing. I have loaded the same problem pages/games in Chrome and IE without the errors reoccurring so there has to be some combo of problems between FF and Flash. On another note... not every game running has this problem. x_x
    Here's some links to some screenshots of my problem:
    http://img.photobucket.com/albums/v509/chibi_ryoko/gameproblem1_zps4e5982f5.png
    http://img.photobucket.com/albums/v509/chibi_ryoko/gameproblem2_zpsd3cb90f3.png
    http://img.photobucket.com/albums/v509/chibi_ryoko/gameproblem3_zps523c0487.png
    Maybe something went wrong when I switched over my Firefox from my previous computer?

    Did you try to right-click in the Flash player area to see if you can restore the full size?
    Try to clear the Flash local storage and settings.
    *Windows Control Panel > Flash Player > Storage: Local Storage Settings
    **Remove a specific domain: Local Storage Settings by site
    **Remove all domains: Delete All and Delete Data
    Flash Website Storage Settings panel:
    *http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html
    Global Storage Settings Panel:
    *http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html

  • Flash text and flash buttons in DW CS4

    Hi,
    I have installed DW CS4 on my pc with Vista Home Premium 64
    Bit...I have edit my website homepage and I have discovered that I
    can't edit all flash text and buttons that I have created with DW
    CS3! I have see that the adobe has removed from CS4 version this
    option! So, now how I can resolve this problem??
    I have try to install also the CS3 version but I don't
    understand because I can't no more activated it from internet or
    phone option!
    I'm very angry for this, now I have to recreate from the
    begin all flash text and buttons of my website with other software?
    perhaps to buy also the Flash CS4 version for the solution? is this
    the new idea of adobe with their new CS4 version?

    > I'm very angry for this, now I have to recreate from the
    begin all flash
    > text
    > and buttons of my website with other software? perhaps
    to buy also the
    > Flash
    > CS4 version for the solution? is this the new idea of
    adobe with their new
    > CS4
    > version?
    It was a poor choice on Adobe's part to ever include such an
    option, and on
    your part for using it. Think about it -
    1. Some people don't have Flash installed - what do they do?
    Especially
    consider those people who are browsing from a corporate
    internet where Flash
    is not allowed by the IT staff.
    2. Search engines may not parse Flash links - your site will
    not be
    spidered unless you have redundant HTML links
    3. Screen assistive devices don't parse Flash links - what
    will those users
    do?
    4. DW cannot maintain links within a Flash movie, so if you
    move or rename
    a linked file, your navigation will break - what will you do?
    You will have
    to remake those buttons.
    It's almost always a very bad idea for these reasons.
    The solution is to make graphics to replace the Flash
    elements, or just use
    CSS styled text.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "s76x" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > I have installed DW CS4 on my pc with Vista Home Premium
    64 Bit...I have
    > edit
    > my website homepage and I have discovered that I can't
    edit all flash text
    > and
    > buttons that I have created with DW CS3! I have see that
    the adobe has
    > removed
    > from CS4 version this option! So, now how I can resolve
    this problem??
    > I have try to install also the CS3 version but I don't
    understand because
    > I
    > can't no more activated it from internet or phone
    option!
    >
    > I'm very angry for this, now I have to recreate from the
    begin all flash
    > text
    > and buttons of my website with other software? perhaps
    to buy also the
    > Flash
    > CS4 version for the solution? is this the new idea of
    adobe with their new
    > CS4
    > version?
    >

  • Adding a Print button to a Flash movie

    Hi. I've created a Flash movie and now want to add a simple
    print button to it - one that will just bring up the users default
    print dialog box.
    I've created a new layer, highlighted the first frame and
    dragged a print button in from the library.
    When I press F9 to bring up the Actions pane, selected the
    Print section all that comes up is print(). Can somebody tell me
    what other code I need to add? I'm pretty new to Flash but getting
    there, but the ActionScript is baffling me - I'm a designer, not a
    developer!
    Many thanks.

    If Flash 8, try looking into the printAsBitmap function. It
    might be what you are looking for.
    For AS 3.0, try the PrintJob class.

  • How do I stop Flash timeline and play imported movie?

    I have a Flash movie that has a button in it to start a movie
    clip that I imported that was created in After Effects. I want this
    movie to play if a user clicks on the link that appears art-way
    through the intro flash movie. If I stop the Flash movie, the
    button won't start the imported movie. If I leave it, the imported
    movie does play, but it covers the intro. Here are my two versions
    http://www.sociusdesign.com/flash/TestMovieGone.html
    and
    http://www.sociusdesign.com/flash/TestPhotosGone.html
    I also uploaded the SWF files to that same directory.
    What am I missing?

    How exactly does it "demand to reinstall"?  I have exactly the same system as you, and I have never observed anything like that.
    What files do you have in C:\Windows\system32\Macromed\Flash ?
    What is the contents of the mms.cfg file in C:\Windows\syswow64\Macromed\Flash ?

  • Dreamweaver preview and flash movie

    Greetings All,
    Im sure this question has been answeredmany times but i cant seem to find any solutions. Here it is:
    - In dreamweaver I add an .flv file to play on my web page.
    - When previewing from dreamweaver into Firefox or Safari the movie shows up and plays just fine
    - The entire site is uploaded to my FTP ( hosted by godaddy ) and when I check the page the movie is gone. If I right click on the are where the    movie is supposed to be, it says "movie not loaded"
    I have tried almost everything I can think of. This site is for a client and I could really use any help. here is the link to the page. If someone out there can help and needs more than the link supplied, please let me know.
    Thanks in advance, Jay
    http://nashsignature.com/xpod.html

    Is that code something which i missed in dreamweaver. i added a flash movie and did everything that was asked in the pop up. this is above my ability and i am trying to help out a friend. if its not an easy fix, would you be willing to fix it for a fee? please let me know as his boss is applying pressure to get it up and functioning properly.
    thanks

  • Flash Animations and Movies are lagging after having played a flash game which was graphics intense heavy and frequently refreshed which caused lags, how can I fix this lagging problem for Flash?

    On June 30th, I was playing a game called Lil Einstein's Manhattan project over at Newgrounds.com and the game although fine at first, later on in the advanced levels of the game, started to cause my browser to lag intensely and heavily. Now, when I try and watch other flash movies and animations, the flash doesn't run as smoothly, there are skips in the flash animations and movies, and it slows down.
    I tried scan disks, I tried defragmenting my computer, I tried uninstalling and re-installing Firefox.. Nothing worked to restore the Flash.
    But when I view Flash movies and animations on Internet Explorer, they run fine... but not anymore on Firefox.
    Other Firefox users who have played this game also reported problems as well..
    How can I fix my Firefox Browser and return the Flash running to normal?
    == This happened ==
    Not sure how often
    == June 30th, 2010

    If you have already scanned PC with an updated Anti-Virus and still the issue exists then I would suggest some troubleshooting techniques to resolve this problem:
    Update browser
    Remove unwanted Add-ons
    Remove unwanted Tool-bars
    Repair Registry
    Repair ActiveX objects and shared DLLs
    In case of facebook and Zynga I would suggest to Check for Problems with your Internet Connection.Try to Update Java and Reduce the Number of Running Internet Applications.
    Sometimes Multimedia content lag due to Hardware Acceleration, so disabling Hardware Acceleration should fix your problem.
    Open Flash Video in browser
    Right click on Video Player | Settings
    Open Display Panel
    Uncheck Enable Hardware Acceleration
    If issue still exists then you can find some more techniques described in detail here:
    http://www.shockwaveflashcrash.com/Easiest-fix-for-shockwave-flash-plug-in-Crash.html

  • Need help with FLV type SWF playback in flash movie

    Hi,
    I have three external SWF files from a client without FLA
    sources. The SWFs were done 3 years ago by someone else so there is
    no way to modify the existing SWF files. These contain no
    interactivity but may involve nested clips on the main timeline.
    They are AS1 or AS2 files so they need to be done with AS2
    scripting to keep it simple.
    I need to call these SWF files inside another flash movie and
    play them in a player window as if they were video files with
    play/pause, seekbar and volume controls. The needed functionality
    is similar to FLV players. My controls will use custom graphic
    buttons and sliders mimicking the look of CNN video player window.
    Does anyone know a good tutorial on how to script these
    controls for SWF?
    Most likely I think I will load it in a clip and I am
    thinking that I will need to get the duration of the loaded swf in
    order to set up the seekbar.
    Thanks in advance,
    Attila

    I think your professor, or somebody, gave you directions with ActionScript 2 programming. In AS2, what oyu have here would have worked just fine. But, in AS3, you need to use a fairly different approach. Your buttons, and their instance name, can remain the same. But now, in AS3, you have to add event listeners in the following manner:
    yourButtonName.addEventListener(MouseEvent.CLICK, yourListenerFunction);
    In your case, you can do one of two things - A) assign a unique listener function to each button, or B) assign the same listsner to both functions:
    A)
    start_btn.addEventListener(MouseEvent.CLICK, startPolygon);
    stop_btn.addEventListener(MouseEvent.CLICK, stopPolygon);
    function startPolygon(e:MouseEvent):void{
        polygon.play();
    function stopPolygon(e:MouseEvent):void{
        polygon.stop();
    B)
    start_btn.addEventListener(MouseEvent.CLICK, controlPolygon);
    stop_btn.addEventListener(MouseEvent.CLICK, controlPolygon);
    function controlPolygon(e:MouseEvent):void{
       if (e.target.name == "start_btn") {//Test for the name of the object that dispatched the CLICK event
          polygon.play();
       } else if (e.target.name == "stop_btn") {
          polygon.stop();
    When I'm using several buttons that do the same/nearly similar things, I favor approach B over A, as it keeps me to jsut one single function to deal with.

  • Multiple flash movies on 1 web page?

    So, I'm working on a new site. Very graphical and will have a
    lot of cool bells and whistles. At first, I was creating it
    entirely in flash but I abandoned the idea because I just can't
    help but click the back button when I feel I need to, and doing
    that takes you all the way back to the previous HTML page instead
    of previous thing in the flash movie and it gets annoying fast, and
    I know if it happens to me it'll happen to plenty of others. So, I
    was thinking about just building it as html/dhtml with all the cool
    css tricks everyone and their mom are doing these days.
    The old versions was set up with one big movie for the
    interface, and smaller movies for the content that get loaded in
    with the loader component. Worked pretty well. So, I was thinking..
    what if I still kept those content pieces and loaded them in over
    the HTML, using DHTML to position stuff and the little
    wmode=transparent thingy so you can still see the background HTML
    bitz that need to be there. I mean, I know it can be done and how
    to do but my question is, what if I want to have the menu in flash
    too? and maybe the site logo animated? Or a rotating flash add at
    the top that's loading in a few different ads and cycling through
    each one like a slideshow? Will 3-4 different flash elements on 1
    page be bad? My first guess is it will slow things down a lot, but
    will it? I mean, it's not HUGE files it's more like smaller bits..
    logo, menu, ad and content .. the content will mostly just be text
    and some photos, nothing too fancy. I don't want it to slow down
    people's computers OR take forever to load/display (which it
    shouldn't). So it will be HTML pages loading in flash movies, so
    the back button will finally work!
    The reason I'm considering doing this is more for font issues
    than anything else, and some cool transparency effects I can
    accomplish with smaller files and better compatibility than if I
    use PNG files
    Any thoughts? is this a good idea or should I just try to do
    it all with DHTML stuff? I can do it that way, i was just thinking
    using Flash might be easier & better for some parts...

    Yes, it is fine to do that.
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

Maybe you are looking for

  • Send reminder mails to the outlook

    Hi everyone, I have a scenario where i have a modeled deadline branch where if the deadline is missed i am sending recursive mails to the recipients using Rule in an activity . In the Rule i am using FM SO_NEW_DOCUMENT_ATT_SEND_API1 for sending mails

  • My iphone 6 battery duration is just 4 hour or less, please help me

    my iphone 6 battery duration is too low, just 4 hour or less, please help me with this?

  • How can I fix software that no longer opens after an upgrade?

    HI folks I really hope someone can help me.  I'm a teacher and use the activinspire software on my mac.  I upgraded to Yosemite in October and had no problems with the active software but when I updated that to its latest version it will no longer op

  • Parent and child keywords problem

    Hi, in bridge cs and cs2 it was possible to click on the parent keyword to automatically include te child keywords. In cs3 it seems to be the total opposite. Clicking on a child keyword activates the parent keyword... Does anybody know if there is a

  • Macbook Pro 13" can't update bootcamp

    Im a student and my school have installed for me windows 7 in mac. When i want to update the bootcamp, it pop out an error and told to download it manualy, i did that but the error still occurs. Please help me, the update name: "Boot Camp Update for