Simple Actionscript Help

Ok, well i was playing around attempting to make a website (which will not be used)... but i want to know anyway.
Here is a link to what it looks like at the moment.
http://tozzel.webs.com/index.htm
I want:
The black 'curtains' to stop before moving.
To make a 'play' button that enables the 'curtains' to draw back.
When the 'curtains' draw back i want it to be the 'home' page and not the 'requirements' page.
I understand you will probably need the FLA file, so if you know where i can upload it, please post or PM. (I've looked on google and couldn't find anywhere.)
Please help!

Make two layers: one for the curtain and one for the words. You make a button and press F9 to add actionscript:
on(press){
     _root.curtains.play()
You need to put the stop code at the beginning of the curtain MC, and give it the instance name:curtains
At the other layer, put the "Home" page at frame 1.
P.S. put the stop code on every frame of the words
P.S. You can upload the file at the attach Files below! ( when you post the message )

Similar Messages

  • Simple Actionscript Help - Keypress

    Hello
    I am VERY new to Flash, so please excuse me if this seems very simple but all I am trying to achieve is to press a keyboard button to jump to the next frame.I have a button symobl off the stage and i am putting my code into that.
    I can get it to jump to the next frame using the following code:
    on (keyPress "<Left>") {
        gotoAndPlay(2);
    but instead of the left key i want to press 'R' in order for it to jump to frame 2. I've tried using the code:
    on (keyPress "r") {
        gotoAndPlay(2);
    but this does nothing. Can anyone tell me what the correct syntax to use is.
    Thanks

    If you're just learning, now is as good as time as any to learn to avoid placing code "on" objects.  You can use a Key listener instead of having a button carry the load.  Put the following code in the timeline on an actions layer...
    var keyListener:Object = new Object();
    Key.addListener(keyListener);
    keyListener.onKeyUp = function(){
          // trace(Key.getCode()); // use this to determine which key is which code
          if(Key.getCode() == 37){  // key LEFT
                trace("clicked LEFT");
    When testing in Flash, in the Flash Player you should go to the Control option in the player menubar and select the option to disable keyboard shortcuts.  Otherwise, using most keys will not work because they are associated with shortcuts.

  • Hi when i send imessages it keeps showing up as my email address on the receiving device. I know its something simple! Help please.

    Hi when i send imessages it keeps showing up as my email address on the receiving device. I know its something simple! Help please.

    Hi Megamanfx,
    If you are having issues with the Sent From settings in iMessage on your iPhone, you may find the following article helpful:
    iOS 6 and OS X Mountain Lion: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    Regards,
    - Brenden

  • Need emergency help for simple actionscript commands.

    I havent touched flash for awhile and am now using flash professional to try and create a simple visual prop.
    I used to be able to have the movieclip stop on the first frame and then use the keyboard (anykey) to advance frame by frame in the timeline. Now I cant seem to do it and it just keeps playing through and loops in the publish preview.
    As this is now actionscript 3, Im not familiar with how this is being controlled.
    Help would be greatly appreciated as I have to get this out the door tomorrow.
    JM

    See the following posting: I'D LIKE TO CHANGE MY CODE FROM USING THE LEFT KEY=PREVIOUS FRAME/ RIGHT KEY= NEXT FRAME TO  ANY KEY=NEXT FRAME. HERE IS MY CODE.
    The difference with yours would be that instead of using nextFrame(); inside the function, yours would just use play();

  • Actionscript Help for Simple Button Events

    Hey everyone,
    I'm pretty new to flash and I think this is a fairly simple animation, but I'm not quite sure how to write out the action script for it. I have a website that has very similiar animations to www.cookstreet.net. I have shapes and text that fly in from the bottom when a button is clicked, but I want to get them to fly back out of the top of the screen when any other button is clicked before any new content loads back in from the bottom. What should I add to the action script to tell flash to first check and see if there is content loaded on the screen when a button is clicked, and if there is, to go to the animation that flies that content out of the top and then return to the animation of the new content coming in from the bottom? What I currently have set up for my buttons is:
    function handleClick( pEvent:MouseEvent):void
        if( pEvent.target == reel )
            gotoAndPlay("Reel");
        else if( pEvent.target == home)
            gotoAndPlay("Home");
        else if( pEvent.target == news)
            gotoAndPlay("News");
        else if( pEvent.target == film)
            gotoAndPlay("Film")
        else if( pEvent.target == about)
            gotoAndPlay("About")
        else if( pEvent.target == contact)
            gotoAndPlay("Contact")
    reel. addEventListener(MouseEvent .CLICK, handleClick );
    home. addEventListener(MouseEvent .CLICK, handleClick );
    news. addEventListener(MouseEvent .CLICK, handleClick );
    film. addEventListener(MouseEvent .CLICK, handleClick );
    about. addEventListener(MouseEvent .CLICK, handleClick );
    contact. addEventListener(MouseEvent .CLICK, handleClick );
    Thanks for the help!
    -Sofi

    What you can probably do is have a variable that you use to keep track of who's present on the stage, starting it off as a null value.  That way when you click a button if the value is null is skips processing a moving out scenario and jumps to the moving in one.  So your event listeners would be calling a different handler function that first takes care of the moving out needs, if any, which in turn calls the moving in function after the moving out activity is done (or the timeline for moving out does... I don't know how you plan to implement the moving out stuff).  If it is a functiob to function process, the moving out function could pass the event.target to the moving in function so that wouldn't have to change at all, except to add in somewhere wha the new variable value should be.
    If what I just offered is one big ball of confusion... take your time and inch your way thru it.

  • Simple actionscript please help...

    Heya ... hope someone can help me thanks :D,
    I have a movie clip mc, inside it is another movie clip mc2,
    inside that there is a dynamic text field = btnTitle (instance
    name)
    I am trying to load the variables into the text field but it
    doesnt work....
    this code is on the first frame _root.
    I cannot change the structure of the the movie clips...
    anybody ideas ... thanks

    Hahaaaaa.... Just solved it :D

  • Help this newbie with a 1067 error code on a SIMPLE ActionScript please

    Hi, I am new to this. I am creating a presention in flash and I want to link to the narration mp3 files as oppsed to embedding them as they will change in the future..
    I have two different books with 2 different  pieces of script to use though the overall process is the pretty much same. For both I get the exact same error.
    See below:
    1120: Access of undefined property nar1.

    Thanks Ned.
    It's the posting. I had a nice little post written up for my initial request but when I posted-it truncated and I had to retype everything (it's the kind of morning I am having ) I will fix my typing.
    I suppose I could add the mp3 files to the library and update that way but I was hoping to set the files up so that files could be overwritten as the slides were changed or swapped out without the extra steps.

  • Actionscript help on semi-advance flash

    So I'm trying to create a flat carousel similar to the one
    located here
    http://www.square-enix.com/na/index_f2.html
    (as a side note before reading the 2nd half, my trouble is with
    the thumbnail loop buttons)
    I have created all the graphic elements, now I'm in the
    planning stage of the actionscript, and this is where I'm hitting
    some trouble, so if I could barrow some actionscript pro's mind
    that would be awesome.
    My thought process is to create a movie clip and have it be
    replaced with images imported through an XML file (for easy
    updating). After this part I run into trouble, I'm planning on
    taking the MC that got replaced and duplicating it and running the
    MC's side by side, and when one goes too far to the left or right
    move it to the other end of the other MC, this way I create an
    infinite loop.
    My Questions:
    so like how would you make one of the MC's reposition it's
    self on the X axis to the end of the other movie clip once it has
    moved far enough left or right ? (also what is the method you would
    use to tell flash the limit that the MC is far enough left or right
    and it should reset it's self?)
    How would you make each thumbnail button change the image on
    the main stage upon clicking the thumbnail button when all the
    images are imported through the xml document?
    Thank you for help and time spent reading this.
    if you have any questions, please ask.
    thanks once again.
    -Mark

    Rob,
    First of all I would like to greatly thank you for all you
    have done for me. It has been so useful and such a learning
    experience getting to go through your personal code. and
    manipulating it to my personal flash. Thank you so much!
    However, I'm reaching some trouble when I try to import my
    XML file, or something is just missing.
    so here is the break down:
    in my main .fla file I have this actionscript to import your
    .as file (with modifications made to the name and package)
    var Carousel:carousel = new carousel();
    trace(Carousel);
    now that seems to import into my FLA just fine, the trace
    tells me that [object carousel] which I assume that means the
    object has loaded into the FLA.
    So anyway there is nothing on my stage in the main FLA, which
    I assume is because the XML is not getting loaded properly into the
    flash/actionscript.
    My XML (minus all the images but one):
    <icons>
    <icon image="icon1.jpg" />
    </icons>
    so this is the basic of my XML, when I import the xml into a
    more simpler file the jpgs work just fine.
    now I thoroughly went through your script examining every
    functions and var and I'm able to understand majority of it however
    parts of the import section is what confuses me, so if you could
    help me understand the script more that would be amazing.
    (the line numbers are probably off a little because I deleted
    a couple unnecessary variables for my flash)
    in line 57: urlLoader.addEventListener("complete", loaded);
    why do you have "complete" instead of Event.COMPLETE... is
    there a difference?
    in line 81 & 82: var count1:uint = source.indexOf("/") +
    1;
    var count2:uint = source.indexOf(".");
    please explain what "/" and "." means... do I replace it with
    location of the nodes in my xml?
    so yeah this is the gist of it, if you could help me figure
    out how to import my XML properly that would be great, or if you do
    not have the time do that maybe you could let me check out your
    XML, piece it all together and figure out the difference of your
    working copy and my unworking copy.
    Once again Thank you so MUCH! for taking your time in helping
    me out, I hope things are going well for ya.
    -Mark

  • Publishing/actionscript help needed

    Okay, first time poster and this is a complete newb cry for help:
    I had someone create a template site for me that is pretty simple - a single swf that pulls resources from a directory of xml files and assets. In theory, I should be able to update the xml for my site and provide new assets. Simple.
    I'm not a total neophyte, i know some code and within the xml there are some <font> tags that over ride the swf's formatting or provide and href. Again simple.
    My problem is that I now have to update our logo, which is hard coded into the source .fla file, which I know how to get in and swap out (the guy who did the work is not available). My problem is, when I publish, the new swf with the new logo does not want to read the <font> tags anymore. I have tried everything and I can't crack this. I've narrowed it down to two possibilities:
    1. Something in the Publish settings, though I've tried every conceivable variation to no avail.
    2. Something in the .as file that defines page template.
    I know I need to provide more info but this is a start. I'm working on a Mac (as was the coder) and we were both using CS4.
    Thanks for any and all help/direction.

    If your in the .fla, and you are simply swapping one symbol in the manner that your speaking, I would probably do a couple things, first I would make sure that the logo your swapping is the same type of object/symbol, same size is good, and then I would backup a copy of the original, and then delete the logo symbol and bitmap, import and name the new logo image the exact same as the other, and then convert it to a symbol with the exact same name as original, then either drag it to the stage in the layer and position it should be with the exact same instance names.
    I'm thinking in terms of a currently working product that I don't want to recode. So simply by taking a working one, and doing absolutely nothing more than changing the object, with everything identical, the code should do what it did before because all the actionscript instances, objects, var, event, and function names are identical, and therefore should use the proper instances at runtime.
    I think.

  • Simple code help with streaming  1 file

    I set up the Flash Media Server 2.0 on Windows (test box)
    under the host dl35.tamu.edu (behind a firewall so I don't mind
    giving it out)
    Under the applications directory I create a directory called
    test
    Under this directory I place a flash movie called motion.flv
    In this same directory I copy the main.asc that comes with
    the Flash 8 software
    I load the "test" application and use _definst_ as the
    instance name
    In Flash Professional 8 I create a new fla called test.fla
    I embed a movie and use the ClearOverAll.swf as the skin for
    the movie.
    Under the Paramaters Tab I edit the content path to point to
    rtmp:"//dl35.tamu.edu/test/_definst_/motion.flv
    I test produce the html code and indeed the server shows a
    connection even though nothing is playing.
    Here is probably where I am most confused but I might have
    done something wrong with the above as well. I am not a Flash
    programmer, I am a network guy. All I want to do is the bare
    minimum in the simplest form of streaming. I could not find code
    samples that worked including the tutorial on the Adobe site (seems
    to be fairly common). Digging through other examples I "believe" I
    found what I wanted but apparantly I did not implement it correctly
    or it is not what I need after all and I would like someone to
    verify. The below is the action script that I found that I placed
    within the test.fla. Is this wrong to do?
    nc = new NetConnection();
    nc.connect("rtmp://dl35.tamu.edu/test/_definst_");
    ns = new NetStream(nc);
    my_video.attachVideo(ns);
    ns.setBufferTime(0);
    ns.play("test");
    Is the above correct? Given the names I have told you, what
    should be changed. Also does this even need to go here? Is it
    supposed to be in an action script file all by itself? At any rate
    when producing this to html there are several errors:
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 16:
    Statement must appear within on/onClipEvent handler
    nc = new NetConnection();
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 17:
    Statement must appear within on/onClipEvent handler
    nc.connect("rtmp://dl35.tamu.edu/test/_definst_");
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 19:
    Statement must appear within on/onClipEvent handler
    ns = new NetStream(nc);
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 20:
    Statement must appear within on/onClipEvent handler
    my_video.attachVideo(ns);
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 21:
    Statement must appear within on/onClipEvent handler
    ns.setBufferTime(0);
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 22:
    Statement must appear within on/onClipEvent handler
    ns.play("test");
    Total ActionScript Errors: 6 Reported Errors: 6
    Goal: All I want to do is stream 1 file.. just 1. I have no
    way of knowing whether this server works before taking this simple
    step. It would be nice is Adobe delivered out of the box streaming
    samples like all of the other streaming servers we support do. But
    I digress. Any help is will be appreciated beyond any means that I
    can appropriately convey including a sample code package that works
    that I can just change a few lines in so I can understand what is
    happening.

    Imstamu, I'm relatively new to this myself, but I did notice
    a few items in your message that I wanted to comment on. First, the
    error messages you're coming up with may be the result of putting
    the actionscript in the video object itself, rather than in the
    timeline for the main SWF movie. What I think you may want to do is
    put the actionscript in a layer called "Actions" in the main
    timeline, select the keyframe for that layer in frame 1, and put
    the actionscript in that keyframe. If you have put it in the video
    object (or in some other object such as a button, etc.), you can
    get errors of the type you are reporting (at least it has happened
    to me). However, as noted below, you may not need that actionscript
    at all.
    Second, you may want to try placing a directory under the
    "test" directory called "streams", putting another directory called
    "_definst_" beneath the "streams" directory, and putting the FLV in
    the _definst_ directory. This is where FMS is looking for the files
    to stream, as I understand it. (It sounds from your description
    like you have placed the FLV directly below "test".) Directly below
    test *is* the right place for main.asc, as you have done.
    IMPORTANT: In terms of the path you use in the contentPath variable
    in the video player object, the path for the directory actually
    holding the FLV should *still* be
    rtmp://dl35.tamu.edu/test/_definst_/motion.flv, as you have done --
    i.e., "streams" should not appear in the contentPath variable.
    Don't ask me why, but this worked for me. The reason the server is
    showing a connection is that you have put a "test" directory in the
    right place, and thus have registered the application from the
    point of view of FMS, but you have not put the FLV in the right
    place, and so FMS can't find the FLV file in the path you've
    specified.
    Third, are you using the FLVPlayback component in the swf
    file? (From the fact that you're using one of the canned Flash
    skins, it sounds like that's the case.) If so, and if you're just
    streaming one movie, you don't need to worry about the code to open
    up a new net connection, new netstream, etc. -- all of that is
    embedded in the FLVPlayback object. So all you need to do is put in
    the RTMP path to the file --
    rtmp://dl35.tamu.edu/test/_definst_/motion.flv -- in the
    contentPath variable for the FLVPlayback object; you do not need
    the code opening the NetConnection and NetStream objects.
    I hope this is useful. As noted, I am fairly new to this
    myself, but I have been able to stream files successfully using
    FMS, FLV, and Flash.

  • Simple button help needed!

    I want to make a simple round button that glows when you
    mouse over it and depresses when you click it.
    Apparently to do this I need to use Filters to make the glow
    and bevels. But Filtersonly work on movie clips, buttons and text.
    So I make a circle and convert it into a button symbol
    (Btn1). Then I make another button symbol (Btn2) and use the first
    button symbol (Btn 1) on the Up Over and Down frames of Btn 2.
    Assorted Filters are applied to Btn 1 on the Up Over and Down
    frames to get the effects I want.
    I test the button (Btn2) using Enable Simple Buttons. It
    works perfectly - glows on mouse over and depresses on click. Then
    I try Test Movie -- and the button doesn't work!!!
    Not does it work when exported as a SWF file!!!
    I watched a tutorial video that came with my Flash Pro 8
    Hands-On-Training (HOT) book and he used pretty much the same
    technique -- except he only tested his button with Enable Simple
    Buttons. I'll bet my house his didn't work with Test Movie either!
    The stupid thing, is I was just able to achieve exactly what
    I wanted very quickly using LiveMotion 2!
    What is wrong here? Why is it so impossible to create a glow
    button in Flash? Why has it been easy in Live Motion for years?
    All help appreciated!
    Thanks
    craig

    I thought the nesting button situation might be the problem
    BUT there is no other way to apply Filters to Up, Down, etc. Also,
    a freaking tutorial book described that as a valid method, but
    obviously it ain't.
    I tried using movieclips as well but basically had the same
    problem.
    I mentioned LiveMotion 2 because that ancient program can do
    easily what Flash Pro 8 seems incapable of.
    What is the logic behind not allowing Filters to be applied
    to simple graphics? It's absurd!
    There's got to be a way...

  • Simple Button Help

    Hi
    I am new to flash and having a bit of trouble. All I would
    like to do is be able to create a button and have that button
    navigate to a frame.
    What I am doing now is:
    Insert - New Symbol - Button and name the button (ex: about)
    Go through the up/over/down/hit steps and return to scene 1
    I then drag the about button onto the stage
    I give the about button the instance name of about_btn
    In the action layer, I enter the following code:
    stop();
    _root.about_btn.onRelease = function(){
    gotoAndStop("about");
    "about" being the keyframe I would like to go to
    When I test the button, I get error 1120: "Access of
    undefined property onrelease".
    I am working on adobe flash cs3 on a pc. I know this is a
    very simple issue and any help would be greatly appreciated.
    Thank you.

    what have you done so far? what don't you know how to do?
    where are you stuck at? need way more detail to help any
    further.

  • Both side chatting with simple GUI ,,helps pls?

    guys I'm Java application programmer i don't have well knowledge in network programing ,,my question ,,,from where should i start to design a simple GUI client*s* server chat program ,i mean some thing like simple yahoo messenger the program should include also adding contact and make that contact appears ON if he login or OFF if he sign out like red color for ON-line contact and and white color for off-line contact ...........
    another thing that chat system should include shared folder all the contact can enter it and upload file or download file ...
    please guys i run to you to help me i have 2 weeks only to do that thing please don't let me down i need your help ....TIPS,code,any thing full code :) ,,any thing will be really appreciated .
    guys for more information the program includes only the chat of course its both sides chat between the clients and these is no conference room
    or audio or video nothing ,,just text only nothing else except the folder shearing service and the colors of the contacts for login or not .
    guys once more help me give me codes or any thing useful i count on you guys.
    thx a lot in advance
    RSPCPro
    Edited by: RSPCPRO on Oct 3, 2008 6:25 PM

    RSPCPRO wrote:
    Dude , u r right ,,,but still its simple GUI issueI'm not sure why you are getting this impression. It's not a simple "GUI issue." Yes, you can simply create the GUI for this, but will it be functional? No. Furthermore, if it was so simple, why are you posting asking for help?
    For an instant message chat program, in addition to GUI programming, you need to know how client / server systems work and you need to implement one. A server should be running on one system and the client(s) will connect to it. The server usually maintains the buddy list and passes the messages to/from different clients. This presents several problems that you will need to solve:
    1. How will you develop a protocol between the client / server for communication?
    2. How will you authenticate users?
    3. How will you maintain the buddy list on the server (data structure, database, file)?
    4. How will you pass messages from one client to another (simple string message, serialized data object, etc.)?
    5. etc.
    Now, I'm not saying this is "impossible" so please don't take it that way. I'm simply trying to help you realize that there are a lot of factors to consider when developing this type of application.
    RSPCPRO wrote:
    and for the "FTP?" ,,,its folder shearing as i said earlier every one of your friends can access it not FTP .....Talking about "folder sharing" is a whole other issue. What I meant by saying "FTP?" is, how do you plan on implementing "folder sharing" remotely? One option is FTP. How would you do it?
    RSPCPRO wrote:
    and one thing please don't assume any thing u don't knowIf you ask a very broad question and ask for code, I can only assume one thing.
    RSPCPRO wrote:
    be cooler with others and u will get what u want.I agree. You should take your own advice. I'm not the one looking for help, you are.
    RSPCPRO wrote:
    thx dude for ur advice and for the link have a good day.You're welcome, and good luck.

  • Simple viewer help

    Hi all, I need your help. I have created my website, and I'm linking it to mobile me galleries. (no problem). But-- instead of mobile me galleries I would like to link to Simple Viewer.
    No problem creating the SV galleries in iphoto , but getting them on my site is baffeling.
    I have read all the posts, and have had no success. I am a novice and the nominclature is rough
    As I said , I created the gallery folder and placed it in the sites folder on my idisk. when I click on the index folder within the gallery appears and the address is file:///Volumes/rgardnerimages/Web/Sites/slideshoe/index.html nothing I do is linking it to a web page. Any help in simple language would be helpful.
    My website is http://www.richardgardnerphotography.com/RichardGardner/richard_gardnerhome.html
    Thanks in advance
    Richard

    Its so long since I did this that I to look back and see where my files were uploaded and how they are organized.
    Its seems I have the following files uploaded to the main folder on my server:
    flash_detect.js
    image data.xml
    images
    PostCard.html
    thumbs
    viewer.swf
    PostCard.html is the index.html file renamed so that it doesn't conflict with the index.html file generated by iWeb.
    If you are using MobileMe to publish you can upload these files to the Finder/Go/iDisk/My iDisk/Web/Sites folder and the URL will be..
    http://web.me.com/username/PostCard.html
    Its probably better to upload them to your website folder. The path is Finder/Go/iDisk/My iDisk/Web/Sites/WebsiteName folder and the URL for the link to it will be ....
    http://web.me.com/username/WebsiteName/PostCard.html
    These uploads are done by drag and drop. Follow the path from the Finder/Go menu or do Shift - Command - I from any Finder window and then double click the Web then the Sites folders to get to your actual website folder.

  • Simple Java help

    OK, I'm new to Java programming and have a project due in class next week. I'm writing a simple gradebook program that takes a grade for a term paper and a pass/fail for two essays and computes the result. I know that the visual portion of this works so I won't bore you all with that. I think the problem is somewhere in the syntax of my actionPerformed function. Here it is
    String essayResult1 = essayBox1.getSelectedItem();
    String essayResult2 = essayBox2.getSelectedItem();
    int essayPoints1, essayPoints2, termPoints;
    if(essayResult1.equals("Pass")) essayPoints1=15;
    if(essayResult2.equals("Pass")) essayPoints2=15;
    Character letterGrade = termField.getText();
    if(letterGrade.equals("A")) termPoints=70;
    else if(letterGrade.equals("B")) termPoints=60;
    else if(letterGrade.equals("C")) termPoints=50;
    else if(letterGrade.equals("D")) termPoints=40;
    else if(letterGrade.equals("F")) termPoints=0;
    else {
    outputField.setText("Error");
    return;}
    String finalScore=new String("" + (essayPoints1+essayPoints2+termPoints));
    outputField.setText("Done");
    I would appreciate any help you experienced programers have. Even a hint as to which lines I'm mangling would be of great help.

    If you could put [code] and [/code] tags around your code it would be much more readable.
    So what is wrong? Do you get a compiler error? Does it give you incorrect results? Do you receive a run-time error?

Maybe you are looking for