Actionscript 3 Help

Hello !
I am trying to build a dynamic menu with php , mysql and
actionscript 3 !
As far as this point all works fine as i can display my menu
to flash using actionscript 3 and loading vars from php
the problem is that i cant pass the variable correct to some
functions i have, so my menu is useless.
Please someone to help me or guide me to a possible solution.

This is the Flash Player forum; why don't you post this in the ActionScript 3 forum...?

Similar Messages

  • Actionscript help with symbol control (Flash 8)

    I have a bunch of symbols on the stage and want to control
    them with actionscript to cut down on the workload. The attached
    code is what I've created that works for the most part with 3
    problems/customization desires:
    1) When I test this the POST still sends my variables in a
    querystring like a GET (only read by request.querystring). How to
    make the POST act like a POST.
    2) My mouse over creates a larger symbol. How could I get
    this to animate the growth to a larger symbol?
    3) My shadow effect is just a transparent copy of the
    original symbol. How can I change the color to be transparent
    black? Or is there a better way?

    let's see if i can help...
    1) you should use LoadVar.sendAndLoad - rather than just send
    in order to maintain the current swf file - even if you only
    specify a "POST" method param.
    2) you should use the Tween class to 'grow the scale of the
    button - and shrink back to size it onRollOut - without a need to
    create a duplicate instance.
    3) you should use the DropShadowFilter to achieve this with
    code
    so this should look like:

  • 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

  • Easy ActionScript - helper Class for everyone

    I have put together a number of methods that help do common tasks in ActionScript 3 in an easier way.
    Providing powerful flexibility and consistency in AS3 is amazing but we have all probably grumbled at the steps involved in setting a color, a volume, a URL, getting a random number between two numbers, applying a font via code, accessing server data and XML, etc.    Easy ActionScript lets you do these in a line or two using static methods of the Easy class.
    http://easyactionscript.wordpress.com/
    The code is helpful for beginners and even time saving for advanced coders.
    Please let others know if you think it will be helpful.  Also, leave a comment on the blog if you have any additional requests or suggestions.
    Thanks,
    Dan Zen

    Thanks for the question.  It adds about 3K.  I can't imagine there would be any speed difference.  It is just calling the same methods that you would call but one method removed ;-)

  • 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 )

  • 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.

  • Actionscript Help Needed

    So this is how it goes...I've already made my website, I have
    all the pages and everything made BUT...I have a few bugs. The
    first starts at my login page, it is a universal login, so it has 2
    usernames and passwords, I have the code for it but, It does not go
    when I press the submit button. The next is when I get to my actual
    website, all the webpages but one are all in different scenes. I
    type in the code: on (press) {gotoAndPlay ("1","Corp") ; } but it
    just goes the scene up next. I have no clue what is wrong here. I
    also have a flaw with my loading page, whether than just loads fast
    or not, the loading movie does not loop until the movie is loaded.
    This page is also part of the movie. Can anyone help? The web
    address is:
    http://www.freewebs.com/cliop/
    The code I am using on the button in my intro is:
    on (press) {
    if (username == "Cliop" or username == "X844495") {
    if (password == "*********" or password == "*********") {
    if (username== "Cliop" & password== "*********" or
    username== "X844495" & password== "*********") {
    gotoAndPlay("1", "Main");

    there's an actionscript forum for your issue. Better chance
    of getting help there.
    --> **Adobe Certified Expert**
    --> www.mudbubble.com
    --> www.keyframer.com
    Cliop wrote:
    > So this is how it goes...I've already made my website, I
    have all the pages and
    > everything made BUT...I have a few bugs. The first
    starts at my login page, it
    > is a universal login, so it has 2 usernames and
    passwords, I have the code for
    > it but, It does not go when I press the submit button.
    The next is when I get
    > to my actual website, all the webpages but one are all
    in different scenes. I
    > type in the code: on (press) {gotoAndPlay ("1","Corp") ;
    } but it just goes the
    > scene up next. I have no clue what is wrong here. I also
    have a flaw with my
    > loading page, whether than just loads fast or not, the
    loading movie does not
    > loop until the movie is loaded. This page is also part
    of the movie. Can anyone
    > help?
    >

  • Basic actionscript help, tracing properties of my class object

    Hi all,I'm just starting to learn about classes in actionscript, I am following along with Moocks book Actionscript for Flash MX and are trying to execute a trace on the properties of my ballclass but all I get is undefined. He is what I have in my actions panel.
    function Ball () {
        this.radius = 10;
        this.color = 0xFF0000;
        this.xPosition = 59;
        this.yPosition = 15;
    var boucyBall = new Ball();
    trace (bouncyBall.radius);
    trace (bouncyBall.color);
    trace (bouncyBall.xPosition);
    trace (bouncyBall.yPosition);
    Any help would be great

    Since you are learning about classes, you might want to use one to help you:
    class Util{
    public function Util(){
    // empty constructor because you don't need one for this kind of class
    public static function traceProps(obj:Object,label:String):Void{
    if(label != undefined){
    trace(Properties for "+label+":");
    for(var a in obj){
    trace("   "+a+": "+obj[a]);
    trace(newline);
    Then place that class file somewhere in your class path so it will always be available to you. And then you can always add these lines.
    import com.complexity.Utils;
    If the file is in your class path you don't really need the above line, but it will help you remember that you are using it. Also I'm just making up what your class path might be based upon your screen name. You would need to use whatever actual path you had. And then...
    Utils.traceProps(bouncyBall,"trouble maker here");
    Of course don't use it with an 10,000 element array, unless you really like to suffer.....
    or just
    Utils.traceProps(bouncyBall);

  • Actionscript help with interactive poster

    Hi All,
    I need some desperate help with a university assignment. I can't find any really good tutorials out there, so I was wondering if there were any kind people out there that I could get some on-on one help from?

    If you need one on one guidance for every aspect of the assignment then you probably need to look to your classmates or your instructor. 
    If you can show what you have done so far and what specific aspect you are having a problem with then someone might offer some help.

  • 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.

  • Actionscript help needed for website

    Hey everyone,
    I am just beginning to learn the basics of creating web sites in flash. I posted this in site design a while ago, but no one has responded yet and I need help asap.
    I have been following a tutorial and have it done pretty well, but they only cover one main button, and I am at the point where I need several more, but I am doing something wrong.
    The tutorial is at this page: http://www.flash-game-design.com/flash-tutorials/advancedWebsite-flash-tutorial- 3.html
    You can skip to the end and download the .fla if you want.
    What I want to do specifically is to add probably 4 other main buttons that can also have drop down menus. Please be as specific as possible because the extent of my code knowledge isn't very far.
    Thanks in advance
    The code for the main page is as follows:
    menu = ["About", "Bio", "Contact"];
    this.createEmptyMovieClip("content", 1000);
    this.attachMovie("sectionBackground","mask",1001);
    mask._y = content._y=208;
    mask._x = target=68;
    content.setMask(mask);
    content._x = -1000;
    imageScrollSpeed = 5;
    xStart = 125;
    yStart = 51;
    bWidth = 79;
    bHeight = 17;
    interval = 50;
    countDown = menu.length;
    menuOpen = false;
    theTime = 0;
    buttonScrollSpeed = 2;
    for (var i = 0; i<menu.length; i++) {
    var section = content.attachMovie("section_"+menu[i], "section_"+menu[i], i+100);
    section._x = section._width*i;
    var b = this.attachMovie("subButton", "subButton"+i, countDown);
    countDown--;
    b.stop();
    b._x = xStart;
    b._y = ySwtart;
    b.interval = interval*i;
    b.target = yStart+(bHeight*i);
    b.txt = menu[i];
    b.pos = target+(i*-section._width);
    b.onPress = function() {
      target = this.pos;
      closeMenu();
      this.gotoAndStop(1);
    b.onRollOver = function() {
      this.gotoAndStop(2);
    b.onRollOut = function() {
      this.gotoAndStop(1);
    b._visible = false;
    function closeMenu() {
    for (var i = 0; i<menu.length; i++) {
      var b = this["subButton"+i];
      b._visible = false;
      b._x = xStart;
      b._y = yStart;
    menuOpen = false;
    mainButton.onPress = function() {
    if (!menuOpen) {
      theTime = getTimer();
      menuOpen = true;
      for (var i = 0; i<menu.length; i++) {
       _root.main["subButton"+i]._visible = true;
    } else {
      closeMenu();
    mainButtoncopy.onPress = function() {
    if (!menuOpen) {
      theTime = getTimer();
      menuOpen = true;
      for (var i = 0; i<menu.length; i++) {
       _root.main["subButton"+i]._visible = true;
    } else {
      closeMenu();
    function scrollButtons() {
    if (menuOpen) {
      for (var i = 0; i<menu.length; i++) {
       var b = this["subButton"+i];
       if ((theTime+b.interval)<getTimer()) {
        b._y += (b.target-b._y)/buttonScrollSpeed;
    this.onEnterFrame = function() {
    content._x += (target-content._x)/imageScrollSpeed;
    scrollButtons();

    That's all AS2 code, so you'll be beter off posting in the AS2 forum.

  • Website Actionscript Help Needed

    So this is how it goes...I've already made my website, I have
    all the pages and everything made BUT...I have a few bugs. The
    first starts at my login page, it is a universal login, so it has 2
    usernames and passwords, I have the code for it but, It does not go
    when I press the submit button. The next is when I get to my actual
    website, all the webpages are all in different scenes. I type in
    the code: on (press) {gotoAndPlay ("1","Corp") ; } but it just goes
    the scene up next. I have no clue what is wrong here. I also have a
    flaw with my loading page, whether than just loads fast or not, the
    loading movie does not loop until the movie is loaded. This page is
    also part of the movie. Can anyone help? The web address is:
    http://www.freewebs.com/cliop/
    The code I am using on the button in my intro is:
    on (press) {
    if (username == "Cliop" or username == "X844495") {
    if (password == "*********" or password == "*********") {
    if (username== "Cliop" & password== "*********" or
    username== "X844495" & password== "*********") {
    gotoAndPlay("1", "Main");

    I've tried a new code for my submit button:
    on (press) {
    if (username === "Cliop" or username === "X844495"); {
    if (password === "moocowman" or password === "shadowman"); {
    if (username === "Cliop" & password === "moocowman" or
    username === "X844495" & password === "shadowman"); {
    gotoAndPlay("1", "Main");
    else on (press){
    if (username !== "Cliop" or username !== "X844495"); {
    if (password !== "moocowman" or password !== "shadowman"); {
    if (username !== "Cliop" & password !== "moocowman" or
    username !== "X844495" & password !== "shadowman"); {
    stop();
    I still have problems, I type in the right username &
    password, yet I don't enter the website. It keeps giving me this:
    **Error** Scene=Intro, layer=otherpages, frame=212:Line 11: 'else'
    encountered without matching 'if'
    else on (press){
    Can anyone help me? I'm also still having problems with the
    navigation.

  • OnRollOver actionscript help needed

    Hi,
    I want to insert an actionscript that when the user rolls
    over an item, a movie clip shows up on screen at specific x and y
    positions. I have only basic knowledge of flash actionscripting and
    would appreciate any support. If someone could give me a basic
    outline of the code, then I will probably be able to complete the
    code myself.
    Many Thanks
    David Kelly.

    try:

  • Actionscript Help Needed Here!!

    Swuut up
    My Event Listener wont work once the thumb_mc has loaded the
    jpg... with this line commented out
    //thumb_mc.loadMovie("images/dj1.jpg"); it works !!...but then all
    im looking at is an empty movieClip that acknowledges when its
    being clicked! great but it would be even better if i could get the
    same result with an image loaded into the movieClip..mmMM.
    The Code is attatched. If someone can help me out id really
    appreciate it.
    thanx

    While I'm not going to post the working code for you, I can certainly point you in the right direction.
    Take a look at the class java.util.GregorianCalendar. It contains methods (some located in Calendar) to do manipulations with dates. You should be able to use the API to figure out how to create two GregorianCalendar objects... one with the current date, one with the due date. Once you've got those, there are plenty of methods to retrieve the day of the week, the date in the month, etc. which will guide you to calculating your answer.
    Excluding the weekends is going to be the trickier part, but then again, that's why it's your homework assignment. Try to get some code punched out, and if you have problems, come back here and post an exact problem, and someone will help out.

  • Actionscript help needed with getting Next Page to work

    I just have a simple question (hopefully).
    Question is:
    I have a web page that displays a flash file that zooms and
    pans, but I cant get the Next Page link to display. (will also want
    1st, last and previous page)
    1. Can the next page work and load the next or previous
    numbered file?
    2. Does it have to have all pages in one file, then it calls
    the next frame?
    Snippet below, or I can e-mail example files.
    Please help, Thank you, Mike
    ============SNIPPET==========
    <!--[if IE]>
    <object id="movie" type="application/x-shockwave-flash"
    width="300" height="500">
    <param name="movie" value="1.swf">
    </object>
    <![endif]--><!--[if !IE]> <-->
    <embed name="movie" type="application/x-shockwave-flash"
    src="1.swf" width="300" height="500">
    </embed>
    <!--> <![endif]-->
    <form name="f" onsubmit="return false;">
    <button name="button" onclick="next()">Next
    Page</button>
    <button onclick="zoom()">Zoom In</button>
    <button onclick="zoom2()">Zoom Out</button>
    <button onclick="pan()">Pan</button>
    <button onclick="setzoomrect()">Rect</button>
    </form>
    function next() {
    var flash = window.movie || document.movie; // Get Flash
    object.
    flash.Zoom(50);

    Use the same method you are currently using. The Zoom and Pan
    methods just happen to be exposed to the ActiveX control and
    Plug-in. So to use the the GotoFrame() method for example, just
    change your code from:
    function next() {
    var flash = window.movie || document.movie; // Get Flash
    object.
    flash.nextpage();
    To this:
    function next() {
    var flash = window.movie || document.movie; // Get Flash
    object.
    flash.GotoFrame(20); // This will jump to frame 19 of your
    main timeline.
    It goes to frame 19 because the method you are using is
    zero-based. Meaning to get to the first frame of your movie you
    would pass the number zero.
    To use the TCallLabel() method it would look like this:
    function next() {
    var flash = window.movie || document.movie; // Get Flash
    object.
    // to target the main timeline, use
    flash.TCallLabel("/", "labelName");
    // to target a movieclip on the main timeline use:
    flash.TCallLabel("/MovieClip", "lableName");
    Also, just so you know. These methods are getting antiquated.
    To keep up with the current versions and methods of communicating
    between JS and Flash you should really look into the
    ExternalInterface class in Flash 8.
    Tim

  • Actionscript Help - Searching Data

    I am using Macromedia Flash MX 2004. I have an excel file with data. I need to create a search box and/or drop down menu that would search an excel file and render data based upon the results. So lets say I have an excel file that has multiple rows. On each row there is a manufacturer, model number, and item name. I want to be able to have a "search box" (if you will) that will search the manufacturer column for what I typed to search for and give me all of the data from the results. So if I searched for a manufacturer and there were three lines/rows for that manufacturer, after searching for that manufacturer, I would see all three as well as the model and the item name (since they are on the same row). I need something like this or a solution for the problem, but it must be in flash. I know excel has a search/filter functionality that would do the same thing, but I want a flash screen.
    Also, it may be just as easy to be told how to convert that data into an XML file and have flashplayer use that file that if I selected a manufacturer from a combobox , it would render the data in a text area component. Maybe this would be a different solution; but I would need step by step instructions.
    Thanks.

    I understand how to save excel. Where are these help files and string method?

Maybe you are looking for

  • How do I break up a concatenated disk set?

    After spending the better part of a week trying to shoehorn in two 500Gb SATA drives into my G4, I coming around to the conclusion that the Sonnet Tech PCI to SATA (TSATA) controller firmware, is not up to the challenge of concatenated drives. The OS

  • Getting an autosuggest Search working with the Hierarchy Viewer

    Hi, I recently raised an issue with Oracle Support 3-7934581791 : Hierarchy Search not working in HTMl5 version, this was promoted to being a bug in ADF HV Bug 17601664 - NON-FLASH VERSION OF HIERARCHY VIEWER DOES NOT DISPLAY A SEARCH FORM So, my que

  • Configure ODBC on Linux

    I have ODBC drivers for Cache database for linux. My ODI 11g install is on linux (OEL 5). Is there a way to configure the ODBC drivers to connect to the database? Thanks

  • Problem in discoverer  with analytic function created non-additive YTD

    I have problem with discoverer desktop which show me wrong ytdact, ytdbgt figure after i rollup/pivoting on custom folder i did in discoverer admin: SELECT a.year, a.month, c.deptno, b.glaccount, bgt.mthbgt, bgt.ytdbgt, bgt.fullbgt, bgt.lastyr_fullbg

  • Score: Two voices on same staff?

    I've been able to put two voices on the same staff. The problem I am having is that the top voice needs to show the stems up and the bottom voice needs to show the stems down. How would I go about doing that? At the moment the stems of both voices ei