What is th syntax problem for Flash8 ¿

7 January

Posted by jane

  • Hi,

    If any one could help me, I would be happy man..

    I have a menu file and it works wiht same math scripts. This menu work when I puplished it with flash player 5 or 6 but when I try to puplished this file wiht flash player 8 it dosn't work.

    Because main script, which I give it below, gives syntax error. Please say me how am I rewrite this code to use this script with flash8 ?

    I have attached the file for your reviews. You can find the main script below paht .. / Move3d > layer1 > frame1


    SCRIPT:

    count = 0;
    while (count < VerticeNum) {
    count ++;
    this["z" add count] = Math.cos((count*45) * (math.PI/180)) * 50;
    this["y" add count] = Math.sin((count*45) * (math.PI/180)) * 50;
    this["x" add count] = (count * 40) - (VerticeNum/2 * 40);
    duplicateMovieClip("Vertex", "Vertex" add count, count );
    }
    duplicateMovieClip("Line", "Vertex10", 100);
    setProperty("Vertex", _visible, 0);
    setProperty("Line", _visible, 0);
    CenterRotationX = 0;
    CenterRotationY = 0;
    TrailerX = 50;
    TrailerY = 360;
    // 3d calculation;
    function calc3d() {
    c = 0;
    while (c < VerticeNum + 1) {
    c++;
    Xang = Xangle * (math.PI/180);
    Yang = Yangle * (math.PI/180);
    // -----------------------------------------
    // --- y rotate ---
    // -----------------------------------------
    this["zpos" + c] = this["z" + c] * math.cos(Yang) - this["x" + c] * math.sin(Yang);
    this["xpos" + c] = this["z" + c] * math.sin(Yang) + this["x" + c] * math.cos(Yang);
    // -----------------------------------------
    // --- x rotate ---
    // -----------------------------------------
    this["ypos" + c] = this["y" + c] * math.cos(Xang) - this["zpos" + c] * math.sin(Xang);
    this["zpos" + c] = this["y" + c] * math.sin(Xang) + this["zpos" + c] * math.cos(Xang);
    // -----------------------------------------
    // -- 3d to 2d --
    // -----------------------------------------
    this["Depth" + c] = (1 / ((this["zpos" + c]/perspective) + 1));
    // -----------------------------------------
    // --- draw ---
    // -----------------------------------------
    this["Vertex" + c]._x = this["xpos" + c] * this["Depth" + c] + CenterRotationX;
    this["Vertex" + c]._y = this["ypos" + c] * this["Depth" + c] + CenterRotationY;
    this["Vertex" + c]._xscale = this["Vertex" + c]._yscale = (this["Depth" + c] / 2) * 500 ;
    // -----------------------------------------
    // --- Z-Sorting ---
    // -----------------------------------------
    this["Vertex" + c].swapDepths(this["Depth" + c] * 500);
    }
    }
    // set angle;
    function setAngle() {
    TrailerY = TrailerY + (NewPosY - TrailerY)/5;
    Xangle = TrailerY;
    }


  • The add operator is not supported in Flash 8, use the addition operator: +

    :afro:







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about What is th syntax problem for Flash8 ¿ , Please add it free.

    edit

    SanOne Infrastructure at Storage Networking World Roberts: ICANN's Health Remains Strong