Help with actionscript

Hey guyz. I imported a swf created in After Effects to Flash
CS3 to make it interactive. Flash broke the "swf" movie into a
number of keyframes (apprx 65 keyframes) which when previewed,
plays all the keyframes one by one. I want it to stop at first
keyframe and have a button over there, which when clicked will let
the next 30 keyframes run without stopping. Then stop at the 30th
keyframe which will have another button to be clicked to proceed to
the the next 34 keyframes without stop.
I have been trying the stop(), and gotoAndPlay nextFrame, but
it stops at the next frame. Kindly help.
One more thing, do I need to convert all the imported
keyframes to graphic or movieclip ?

Hey..thanks for ur reply. I created a new layer with 2
keyframes, but it still didn't work. I still have to click in each
frame of the movie to go to the next. Maybe it has to do something
with the action script. This is what I put in the first keyframe of
the "actions" layer.

Similar Messages

  • Need Help with ACTIONSCRIPT for Interactive Music Video

    I am trying to create an interactive music video in After Effects and Flash.
    The concept is that while the music video is taking place the user can  decorate the hair of the woman with any of the objects they select.   There will be predetermined animations and destination spots but the  user can choose whatever objects they select to be delivered to the  predetermined spot.  I need to figure out how to let the user to select  an object that will become part of the animation.  I created a PDF  Roughly explaining what I am trying to do.  If anyone can help me I'd be  very grateful as I am more versed in After Effects, I don't know  ActionScript well enough to execute what I am trying to do.
    Below is a rough example of what I am trying to do.  There will be a music video of an animated woman singing.  As she is singing the user will be able to click any of the objects , below the numbers 1-10.  Below it is illustrated that the user wants to press the blue number 2.  If the user presses the 2 the 2 will animate in the mouth of a bird to a predetermined pre-animated spot.  I assume I need to send a movieclip to a blank  holder on the timeline and use a gotoAndPlay() action ???  I am not well versed in ActionScript so any advice would help
    Now whatever number (movieclip) the user chooses next needs to be placed in another blank spot in the timeline? Below the user selcts the Pink 5.
    If the user just wanted to Place two "Blue 2's" then the "Blue 2's" would follow the same animated path and end up at the same predetermined space.
    If the user selected just 5's and 7's they would go to the predetermined preanimated paths
    How would I go about writing the Actionscript for this?

    Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
    If I say that the code for placing one MovieClip into another is:
    clip1.addChild(clip2);
    will it make any difference in terms of implementation?
    Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
    I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
    What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start.

  • Need help with actionscript for media controller

    I seem to be having a slight problem. I've been looking
    around and everything I see is for .flv playback. Anyways, here's
    my problem.
    Client wants a video that's interactive. When a transition
    occurs a simple tex button shows up which links to certain web
    pages. Deploying this as a .swf would be no problem, but they want
    a controlbar with it so a user can scrub back and forth in the
    video. So the best way to do this would be progressive or
    streaming.
    I created a source file that utilizes the "loader component"
    and inserted the "media controller component". I'm not very good
    when it comes to actionscript and can't seem to find the proper
    script which utilizes the media controller so the user can scrub
    back and forth. Everything else seems to work fine with the loader
    as it loads an external .swf file.
    Just need to get the controller working properly. Total
    frames of the swf is a little over 3,000 and dividing the total
    frames by 30 was 107.7 seconds. So I round that to 108 seconds. The
    online docs seem to be fragmented and not always consistant
    especially when i'm not using the flvplayback or display.
    Does anybody know the actionscript for this? Or where I can
    find the information on this? I've associated the loader with the
    controller and vice versa in the behaviors panel as well if that's
    any help. Any help is much appreciated thanks.

    Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
    If I say that the code for placing one MovieClip into another is:
    clip1.addChild(clip2);
    will it make any difference in terms of implementation?
    Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
    I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
    What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start.

  • Help with ActionScript/PHP email form

    Hey guys, hope someone can help me out with this!
    Haven't programmed in a while, but a friend asked me to look
    at this and figure out why it isn't working. It's a simple form,
    with the text boxes labeled inTxt_1, inTxt_2 ..... inTxt_13.
    The ActionScript looks like this ...
    Code:
    submit.onRelease = function () {
    var loadv = new LoadVars();
    loadv._level0.mc1.inTxt_1 = _level0.mc1.inTxt_1.text;
    loadv._level0.mc1.inTxt_2 = _level0.mc1.inTxt_2.text;
    loadv._level0.mc1.inTxt_3 = _level0.mc1.inTxt_3.text;
    loadv._level0.mc1.inTxt_4 = _level0.mc1.inTxt_4.text;
    loadv._level0.mc1.inTxt_5 = _level0.mc1.inTxt_5.text;
    loadv._level0.mc1.inTxt_6 = _level0.mc1.inTxt_6.text;
    loadv._level0.mc1.inTxt_7 = _level0.mc1.inTxt_7.text;
    loadv._level0.mc1.inTxt_8 = _level0.mc1.inTxt_8.text;
    loadv._level0.mc1.inTxt_9 = _level0.mc1.inTxt_9.text;
    loadv._level0.mc1.inTxt_10 = _level0.mc1.inTxt_10.text;
    loadv._level0.mc1.inTxt_11 = _level0.mc1.inTxt_11.text;
    loadv.send("email.php",loadv,"POST");
    (Quick question ... why is the _level0.mc1 part needed? Or is
    it even required?)
    Here's the PHP ...
    Code:
    <?php
    $To = "[email protected]";
    $subject = "site reply";
    $Name = $_POST["inTxt_1"];
    $Email = $_POST["inTxt_2"];
    $Company = $_POST["inTxt_3"];
    $Position = $_POST["inTxt_4"];
    $Address = $_POST["inTxt_5"];
    $Address1 = $_POST["inTxt_6"];
    $Address2 = $_POST["inTxt_7"];
    $ZipCode = $_POST["inTxt_8"];
    $Country = $_POST["inTxt_9"];
    $Tel = $_POST["inTxt_10"];
    $Enquiry = $_POST["enquiry"];
    $Comments = $_POST["inTxt_11"];
    \$headers = "From: " . $_POST["inTxt_1"]. "<" .
    $_POST["inTxt_2"] .">\r\n";
    $headers .= "Reply-To: " . $_POST["inTxt_2"] . "\r\n";
    $headers .= "Return-path: " . $_POST["inTxt_2"];
    $message = "Name: $Name\n";
    $message .= "Position: $Position\n";
    $message .= "Company: $Company\n";
    $message .= "Email: $Email\n";
    $message .= "Address: $Address\n";
    $message .= "Address1: $Address1\n";
    $message .= "Address2: $Address2\n";
    $message .= "Zip Code: $ZipCode\n";
    $message .= "Country: $Country\n";
    $message .= "Enquiry: $Enquiry\n";
    $message .= "Phone: $Tel\n";
    $message .= "Comments: $Comments\n";
    mail($To, $subject, $message, $headers);
    Print "Your mail has been sent";
    ?>
    (Another question - why does the one $headers line have a /
    infront of it? Should it be there?)
    Now when I submit it, "Your mail has been sent" appears on
    the screen, but I don't receive an e-mail. Can anyone help me??
    Thanks so much!!
    ~Ganj

    all those loadv._level0.mc1.whatever variables are incorrect.
    they should be:

  • Pls view SWF and help with Actionscript

    I am trying to get my thumbnails (Which are individual
    buttons) to show in the box to the right when you click on them but
    I don't know the code to put on the buttons to make that happen.
    Can someone please help me.
    http://www.geocities.com/demetriusmcclain/

    there are weekend course offered from time to time i large
    cities. but i think it would be less expensive to look at your
    local community college(s) and see if they have anything offered.
    you could search google for actionscript classes.
    i looked at your project and i really don't see an easy way
    to accomplish what you want. there are reasons i say that but all
    of them are solvable but one.
    the one that can't be resolved is that you cannot change the
    parentage of a duplicated movieclip.
    so, each of your elephant thumbnail duplications, for
    example, is going to be a child of panel. and panel is masked. so,
    all your duplicated elephants are going to be masked and therefore
    cannot be positioned over your canvas and still be visible. there
    is not work-around with your current set-up.
    the only way i can see to resolve the issue is to assign a
    linkage id to each of your panel buttons, use shared library assets
    and attach the corresponding button to the _level0 swf.

  • Help with ActionScript 2.0 and XML

    Here  I am trying  to use actionscript to load my content with is an XML file with html formatting. I have the actionscript on only 1 Scene  and i have links that switch between scences. The problem(s) is(are) that when I click the link  for the scene that has the actionscipt all it says is "null" where it should have the text i want to display from the XML file. Here is the code for the AS and XML:
    xml = new XML();
    xml.ignoreWhite = true;
    xml.load("contenido.xml");
    xml.onLoad = function () {
        txt = createTextField("txt",getNextHighestDepth(), 30, 300, 300, 100);
        txt.html = true;
        txt.htmlText = xml.firstChild.nodeValue;
    <?xml version="1.0" encoding="UTF-8"?>
    <htmlData><![CDATA[   Here is my <br/> html text   ]]></htmlData>
    any help is greatly appreciated

    Try...
    xml.onLoad = function () {
         txt = createTextField("txt",getNextHighestDepth(), 30, 300, 300, 100);
         txt.multiline = true;
         txt.html = true;
         txt.htmlText = xml.firstChild.childNodes[0].nodeValue;

  • Help with actionscript to make page jump back to top

    Ok so I wanted the page to jump back to the top when the
    buttons are pressed. I found some help in an old thread. It worked
    great but for the first button only that i put the script on. All
    the others don't work at all. Even if its the same button just on a
    different frame. Not sure what i am doing wrong at all. I really
    don't know anything about actionscript so if anyone can please help
    me. Below is the script that i added to the tree buttons and the
    script i added to the html code.
    thanks- joe
    Button1:
    on (release) {
    nextFrame();
    import flash.external.*;
    flash.external.ExternalInterface.call('pageTop');
    Button2:
    on (release) {
    gotoAndStop(1);
    import flash.external.*;
    flash.external.ExternalInterface.call('pageTop');
    Button 3:
    on (release) {
    prevFrame();
    import flash.external.*;
    flash.external.ExternalInterface.call('pageTop');
    At the top of my html:
    <head>
    <script http-equiv="Content-Script-Type"
    content="text/javascript">
    function pageTop() {
    window.scrollTo(0,0);
    </script>

    you don't need all the import statements but the problems are
    likely caused by your buttons failure to exist when the timeline
    goes to the frame indicated in the line above the externalinterface
    call().

  • Help with actionscripting multiple drop-down menus

    So I have 3 different drop down menus that I want to use, and I want them to all work together so that if I have drop down menu number one open, the 2nd menu will drop down while the 1st one is still down.
    (I'm using Flash cs3)
    Here are some screen shorts:
    Layers: http://gyazo.com/3f24c53d5b91b7edb7fbbb1e6aa99c7c
    First action: http://gyazo.com/320857b1a6a94ba3fef153d1beb4ad6c
    Second action: http://gyazo.com/052bf8f1d673d533afc9b11488634869
    Stage before opened: http://gyazo.com/698353db25de7e589126a8800d7fdb25
    Stage opening up: http://gyazo.com/f905b9f20ee7b6205a978e304c27b934
    I'm relatively new to actionscripting all together, and I'm not a great programmer either. I'd greatly appreciate any help, I'm completely stuck and have no idea what to do.
    Thanks!

    fixed it

  • Need help with actionscript (flash professional)

    Ok so its been a while since I've used flash and i need a
    little bit of help. I've searched through the help books and tried
    to figure it out on my own but im stuck.
    I'm making a website for my music page using flash
    professional on Mac OSX.
    I'm trying to make a menu along the left side that when you
    press the "more" button at the bottom of multiple other buttons it
    will make the set of links (which i have as buttons) switch out
    with another set of links. (also buttons)
    I cant get this more button to do it though!
    here is a link to my .fla file
    http://rapidshare.com/files/196874495/website.fla.html
    Help would be GREATLY appreciated.
    Thanks.
    -Ken

    _parent tells the guy that's holding the movieclip (its
    parent) to do something.
    The reason I say something seems corrupted with the file is
    because I took your button out of the movieclip and used it with
    the code you had for the movieclip, which should have worked as you
    had it on(release){ gotoAndPlay(2)} because for whatever reason,
    buttons don't consider the guy holding them as their parent...
    bitter adopted orphans I reckon.
    but it didn't work, and I gave up trying to figure out why.
    Sometimes files just need to find a new home in another
    file.

  • I need help with Actionscript!

    I built my first site in flash.
    My pages have a UILoader which uploads a different image when clicked. Actionscript for my entire site is as follows:
    //LOAD A RANDOM BACKGROUND (FROM 1 TO 10)
    var randomNumber:Number = Math.ceil(Math.random()*19);
    trace (randomNumber);
    bkgrndimage.source = "images/image"+randomNumber+".jpg";
    stop();
    //handle events for buttons...
    about.addEventListener(MouseEvent.CLICK, clickSection);
    home.addEventListener(MouseEvent.CLICK, clickSection);
    design.addEventListener(MouseEvent.CLICK, clickSection);
    photo.addEventListener(MouseEvent.CLICK, clickSection);
    resume.addEventListener(MouseEvent.CLICK, clickSection);
    contact.addEventListener(MouseEvent.CLICK, clickSection);
    function clickSection(evtObj:MouseEvent) {
    //trace shows what's happening..in the output window
    trace ("The "+evtObj.target.name+" button was clicked!")
    //go the the section clicked on...
    gotoAndStop(evtObj.target.name);
    On two of my pages, I want a link to an external swf file that i created with slideshowpro. How do i link the button to the swf file??

    Yeah, you're missing what I'm explaining, so I'll try with a little more detail, though you won't learn by being handed a solution.
    An event handler function is the function that you are assigning your event listener to call when you assign an event listener.  For the code you showed, your group of event listener assignments all point to the same event handler function... clickSection.  So you need to create another event handler function for the other button you want to click to open a different browser window... it has to have a different name than the one you already have.
    Let's say you call your button swfBtn
    swfBtn.addEventListener(MouseEvent.CLICK, clickSwfBtn);
    function clickSwfBtn(evt:MouseEvent):void {
         navigateToURL(new URLRequest("your.swf"), "_blank");
    Note that you probably want to have your swf in a web page rather than linking directly to it.

  • Snow falling: pls help with actionscript

    Hallo,
    I made a flash movie with snow  falling from the sky in Flash 8 (actionscript 2.0)
    However, the snow I made differs  from the original.
    The original is here:
    http://www.kirupa.com/developer/mx/snow.htm
    I  put mine here:
    http://toetssite.webs.com/
    You  will notice that my snow only falls downward: there is no randomness  for the flakes to go left or right. there is no movement.
    WHere  in the script below can I change that so that there's more movement for  the flakes? Thank you
    I use  the following script for the snow itself:
    onClipEvent (load) {
         //specifies the size of the movie stage
         movieWidth = 300;
         movieHeight = 200;
         //variables that will modify the falling snow
         i = 1+Math.random()*2;
         k = -Math.PI+Math.random()*Math.PI;
         //giving each snowflake unique characteristics
         this._xscale = this._yscale=50+Math.random()*100;
         this._alpha = 75+Math.random()*100;
         this._x = -10+Math.random()*movieWidth;
         this._y = -10+Math.random()*movieHeight;
    onClipEvent (enterFrame) {
         //putting it all together
         rad += (k/180)*Math.PI;
         this._x -= Math.cos(rad);
         this._y += i;
         if (this._y>=movieHeight) {
             this._y = -5;
         if ((this._x>=movieWidth) || (this._x<=0)) {
             this._x = -10+Math.random()*movieWidth;
             this._y = -5;
    and on the first frame of my movie I put the following:
    for (k=0; k<50; k++) {
        duplicateMovieClip(this.snow,  "snow"+k, k);
    Thank  you!

    Just initialize the rad variable. I added following line to your code and it works fine.
         rad = 0; //line I inserted.
    No other change required. It is advised to initialize all your variables before you use them.
    Anyways, below I am providing the whole script for the snow after modification
    onClipEvent (load) {
    //specifies the size of the movie stage
    movieWidth = 300;
    movieHeight = 200;
    rad = 0; //line I inserted.
    //variables that will modify the falling snow
    i = 1+Math.random()*2;
    k = -Math.PI+Math.random()*Math.PI;
    //giving each snowflake unique characteristics
    this._xscale = this._yscale=50+Math.random()*100;
    this._alpha = 75+Math.random()*100;
    this._x = -10+Math.random()*movieWidth;
    this._y = -10+Math.random()*movieHeight;
    onClipEvent (enterFrame) {
    //putting it all together
    rad += (k/180)*Math.PI;
    this._x -= Math.cos(rad);
    this._y += i;
    if (this._y>=movieHeight) {
    this._y = -5;
    if ((this._x>=movieWidth) || (this._x<=0)) {
    this._x = -10+Math.random()*movieWidth;
    this._y = -5;

  • Timeliner needing help with actionscript

    i'm on an inherited project. The developer wrote everything
    as actionscript in the first frame. It's a web banner that after
    //scene1 needs to on rollover (or after 60 seconds) begin playing
    //scene 2, and right now it plays automatically. I'm a total
    timeline guy and need help. I know it's simple but I seem to be
    spinning my wheels.Thanks!

    is there more code in that textTween.onMotionFinished
    method?

  • I need help with Actionscript 2.0

    Ok so I am made a button using flash 9 and actionscript 3.0
    then I sent it to someone and they told me to make it in flash 8
    using actionscript 2.0 now everything works except for the button.
    The button keeps having errors so is there diffrent html I have to
    insert in 2.0 then 3.0? If so can you please tell me what it i and
    I will just rename stuff like the web address and the instance
    name. Please!
    Thanks a lot Jessica

    What actionscript do you currently have attached to your
    button?
    What errors are you getting? It's hard to tell what the
    problem is if you don't provide a little more information.
    However, buttons are simple. After clicking on the button on
    the stage, go to the Actions panel, and code like this will work
    fine for you...
    on (release) {
    getURL("
    http://whatever", "_blank"); // you may
    leave off the "_blank" if you don't want a new window
    }

  • Help with Actionscript error

    What I will be trying to acheive is to read from an XML file
    that will be located in my assets folder in my Project directory.
    So as I will try to use the E4X concepts for obtaining data
    from XML, I started to write my code but am getting an error as
    follows: 1120: Access of undefined property contactsXMLLoader
    Here is my initial code which is giving the error on the last
    line:
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    var contactsXMLLoader:URLLoader = new URLLoader();
    contactsXMLLoader.load(new URLRequest("assets/mydata.xml"));
    Not sure why this error is occuring?
    Also is there a way in FlexBuilder 3.0 to view the actual
    code of the URLLoader and URLRequest classes? Where and which files
    is the code contained in, if available?
    Thanks

    hkpadobe,
    recently when I saw someone else post an error of this kind,
    the code they were exploring with was not actually in a method of
    any sort but just written straight into the <mx:Script>
    block. Have you tried putting these lines into a method such as
    creationComplete() - eg
    <mx:Application creationComplete="setup_items()">
    <mx:Script>
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    public function setup_items():void
    var contactsXMLLoader:URLLoader = new URLLoader();
    contactsXMLLoader.load(new URLRequest("assets/mydata.xml"));
    etc etc
    Richard

  • Need help with actionscript 2 (root.attachmovie)

    Hi all!  I have a big problem at work. Here is the situation.  I have an html passing a variable as an array to my flash.  In the flash i want to call a couple of symbols depending on the variable from html and display them as a slideshow. I need to add these symbols dynamically but i dont know where to start.  I have created all my movie symbols and linked them for actionscript.  I have created a simple line of code just to display one symbol using _root.attachMovie and the  symbol does not show. here it the code:
    _root.attachMovie(usb, usb,1);
    usb.x = 276.15;
    usb.y = 199.50;
    Now the symbol should be visible right? What am i doing wrong?

    This is the Flash Player forum; you better ask in the Actionscript forum.

Maybe you are looking for

  • Error in process chain for PCA full load

    Hello everyone, I'm trying to use a process chain in order to delete a previous full load of plan data in a cube prior to the new load (to avoid double records). The successor job in the process chain is loading a delta of actual data into the same c

  • Session State Protection Violation error

    I am developing my first Apex application. I have this page which has been running fine until I made some changes. The error I get is the following: -----Error message: Session state protection violation. This may be caused by manual alteration of a

  • OC4J Standalone Remote Lookup

    Hello everyone, I am getting the following error when I am trying to do a remote lookup to an ejb which has been deployed successfully on OC4J Standalone. My client who is attempting the look up has been successfully deployed in OC4J instance embedde

  • Server not available when trying to set up yahoo mail account

    I keep getting a "service not available message when I try to set up my yahoo mail account

  • Best Video Card for non 3d/compositing work in Premiere CS4?

    Hi all, I'm looking to optimize my system where I can to speed up the editing process. I edit 1080p footage from the Canon 5D MKII (h.264 MOV files)using half-res h.264 proxies, but CS4 seems to hang a lot in the timeline view and clips just disappea