A Flash Developer Resource Site

Page 3 of 3 FirstFirst 123
Results 41 to 57 of 57

Thread: loadmovie checking ...

  1. #41
    Member
    Join Date
    Jul 2003
    Location
    Brampton, ONT
    Posts
    50

    Hi Donnie

    After great deliberation and planning .. heres what the menu should acomplish.

    The main page link that calls 4 other sub-links:
    Phase 1 - has 5 sublinks in it
    Phase 2 - has 9 sublinks in it
    Phase 3 - has 5 sublinks in it
    Phase 4 - has 2 sublinks in it


    Now, the links will call a phaseMc or a sublinkMc as required. I can add the code where the movies 'exit' when they are unloading so thats covered.

    This is pretty much what I need ..

    whatchu think?

  2. #42
    Junior Member
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    24
    ok,

    remember that you may need to update these sections, so are the numbers always going to stay the same? or is this a permament number scheme?

    basically if you want to base this on code or real clips. either one will work, it will just be harder to update or change the real clips one, but if that's all you need then you can do it that way.

    when calling phaseMc or a sublinkMc:
    are you going to be calling them from internally or externally? if they are external, are they going to be loaded into seperate existing movieclips on the stage, or the same one?

    are any of the menu options going to do something other than load an external movie? such as get a url or start an internal movie?


    now, phase1 calls the 5 sublink to activate, the 5 shoot out, and do you want the angles to be the same, and are you going to have it dynamic like the site you mentioned? Or do you want it to be a static setup that is set up to look nice, instead or react to pulling and pushing?

    do any of the sublinks have submenus of their own? if so how many each?

    donnie
    pixelrot.com

  3. #43
    Member
    Join Date
    Jul 2003
    Location
    Brampton, ONT
    Posts
    50
    Originally posted by pixelrot

    remember that you may need to update these sections, so are the numbers always going to stay the same? or is this a permament number scheme?

    Yes, the numbers of the links will be the parmanent


    Originally posted by pixelrot

    when calling phaseMc or a sublinkMc:
    are you going to be calling them from internally or externally? if they are external, are they going to be loaded into seperate existing movieclips on the stage, or the same one?

    I'll call them externaly and have them load onto the sameMc, this, I found, to be easier to code. Remember the load and unload problem I had before? .. the code you gave me allowed me to use externalMcs without any problems.


    Originally posted by pixelrot

    are any of the menu options going to do something other than load an external movie? such as get a url or start an internal movie?
    No, their function is only to load an external movie

    Originally posted by pixelrot

    now, phase1 calls the 5 sublink to activate, the 5 shoot out, and do you want the angles to be the same, and are you going to have it dynamic like the site you mentioned? Or do you want it to be a static setup that is set up to look nice, instead or react to pulling and pushing?
    I thought of a static setup but that will take away the whole feel of the menu, so I would like to have the menu dynamic, and also have it react to the pulling and pushing of the links. There is also a mouseover pop up, that describes the link that would be nice to add.


    Originally posted by pixelrot

    do any of the sublinks have submenus of their own? if so how many each?
    The submenus do have sublinks of their own, but I decided to have it as a static text link that reside in those sublinkMcs. So we do not have to worry about that ..




    Thanks for your guidance Donnie, I'm really understanding much and am learning alot ...

  4. #44
    Member
    Join Date
    Jul 2003
    Location
    Brampton, ONT
    Posts
    50

    Donnie?

    Hey dude .. hope I didn't scare you away ..

    drop a line when you can ...

    Jess

  5. #45
    Junior Member
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    24
    Hey there, sorry I didn't respond quicker, left work the other day and didn't get back online. Haha, went to a dance and got a little drunk...hehe.

    well judging on what you said I think that by creating the menu physically then adding the code to make it interactive would be the best way of doing this.

    since all the links are going to be generally the same, those can be generated by code and what not, just make sure to name the buttons simply, such as "button1", "button2" and so on, we'll create an object to hold the information about the buttons later. same goes for the text in the menu.

    I hope that helps you get a goood start, let me know how you are doin...

    Donnie

  6. #46
    Member
    Join Date
    Jul 2003
    Location
    Brampton, ONT
    Posts
    50

    hey dude

    party up! .. hope twas a blast .. when this project ends .. thats what I'm going to do!! ..

    hey, I have this script to draw me some lines .. so now, how can I update it to have the line 'return' to a certain length?

    code:

    #include "dashTo.as"
    h1.clr = new Color (h1);
    h2.clr = new Color (h2);
    h1.onPress = drag;
    h1.onRelease = noDrag;
    h2.onPress = drag;
    h2.onRelease = noDrag;
    drawDash();
    //
    function drag() {
    this.startDrag(false,10,10,190,140);
    this.onMouseMove = drawDash;
    this.clr.setTransform({rb:255});
    }
    //
    function noDrag() {
    this.stopDrag();
    this.onMouseMove = null;
    this.clr.setTransform({rb:0});
    drawDash();
    }
    //
    function drawDash() {
    _root.clear();
    _root.lineStyle(2,0x6688AA);
    _root.dashTo(h1._x,h1._y,h2._x,h2._y,4,8);
    updateAfterEvent();
    }



    getting there .. I have 3days to finish this menu .. 3 to debug, 1 to deliver and then ... the site goes online.

    I'm on a crunch .. not enough coffee to around

    Jess

  7. #47
    Junior Member
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    24
    ok now we're getting crazy here

    code:

    #include "dashTo.as "
    h1.clr = new Color(h1);
    h2.clr = new Color(h2);
    h1.onPress = drag;
    h1.onRelease = noDrag;
    h2.onPress = drag;
    h2.onRelease = noDrag;

    //

    function drag() {
    this.startDrag(false, 10, 10, 190, 140);
    this.onMouseMove = drawDash;
    this.clr.setTransform({rb:255});
    }
    //
    function noDrag() {
    this.stopDrag();
    this.onMouseMove = null;
    this.clr.setTransform({rb:0});
    drawDash();
    }
    //
    function drawDash() {
    _root.clear();
    _root.lineStyle(2, 0x6688AA);
    _root.dashTo(h1._x, h1._y, h2._x, h2._y, 4, 8);
    updateAfterEvent();
    }
    drawDash();



    ok the function drawDash is re-defining a drawing method, since I haven't a clue as to what "_root.dashTo" refers to, I can't tell you where it is going to take the end x and the end y coordinates, but where you see the end x and end y that is where you can implement a variable equasion... find out the length you want, figure out the x and y, then re-set the equation to match.

    I didn't know you were on a deadline, it may be doable but I'd be careful, have a backup menu design that is simpler to do as well... just a thought....

    Donnie

  8. #48
    Member
    Join Date
    Jul 2003
    Location
    Brampton, ONT
    Posts
    50

    oh man ..

    I AM getting confused

    scratch my code .. do you have one that can simply draw me x number of lines and expand with the equal amounts of space between them?

    I do have a backup menu ready, but I'd like to beat this at its game .. I like to have a good fight before I throw in the towel .. this is how I learn ..


    Jess

  9. #49
    Junior Member
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    24
    ok here is come code to try:

    code:

    drawLines = function (arg) {
    amount = arg;
    this.createEmptyMovieClip("lines", 50);
    for (i=1; i<=amount; i++) {
    theSpaceBetween = 3;
    x = 0;
    y = 0+(i*theSpaceBetween);
    endx = 20;
    endy = y;
    line = "line"+i;
    lines.createEmptyMovieClip(line, i);
    lines[line].lineStyle(1, "0x000000", 100);
    lines[line].moveTo(x, y);
    lines[line].lineTo(endx, endy);
    lines[line].startx = x;
    lines[line].starty = y;
    lines[line].onPress = function() {
    startDrag(this);
    };
    lines[line].onRelease = function() {
    stopDrag();
    };
    lines[line].onReleaseOutside = function() {
    stopDrag();
    };
    }
    // global position of the starting x and y of all the lines
    lines._x = 100;
    lines._y = 100;
    };
    drawLines(10);



    this will give you what you want I think...
    Donnie
    www.pixelrot.com

  10. #50
    Member
    Join Date
    Jul 2003
    Location
    Brampton, ONT
    Posts
    50

    hmmmm

    Remember how you gave me a code that can create the lines and divide them within a 360 degrees area?

    a = 360/num

    that will give you the angle that the lines are supposed to be apart, then the movement is a math function that will update the line, or re-draw the line:

    Math.easeOut = function(t,b,c,d){
    t/=d;
    t--;
    return c*(t*t*t*t*t+1)+b
    }

    where t = time incremented;
    b = beginning value
    c = change in value;
    d = duration;
    belive me I've staired and devoured that code as much as I could .. just can't put the two together .. how can I use the code you just game me and have the lines develope within a 360 degrees area?

    Thanks dude

  11. #51
    Member
    Join Date
    Jul 2003
    Location
    Brampton, ONT
    Posts
    50

    check this out

    Heres what I want to create ..

    but I want it to be code .. tweening is suicide!! ..

    PLEASE end my misery
    Attached Files Attached Files

  12. #52
    Junior Member
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    24
    ok, here's the angle correction:

    code:

    Math.easeOut = function(t, b, c, d) {
    t /= d;
    t--;
    return c*(t*t*t*t*t+1)+b;
    };
    drawLines = function (arg) {
    amount = arg;
    a = 135/amount;
    this.createEmptyMovieClip("lines", 50);
    for (i=0; i<amount; i++) {
    angle = 360-(a*i);
    theSpaceBetween = 3;
    x = 0;
    y = 0;
    endx = -50;
    endy = y;
    line = "line"+i;
    lines.createEmptyMovieClip(line, i);
    lines[line].lineStyle(1, "0x000000", 100);
    lines[line].moveTo(x, y);
    lines[line].lineTo(endx, endy);
    lines[line]._rotation = angle;
    lines[line].startx = x;
    lines[line].starty = y;
    lines[line].onPress = function() {
    startDrag(this);
    };
    lines[line].onRelease = function() {
    stopDrag();
    };
    lines[line].onReleaseOutside = function() {
    stopDrag();
    };
    }
    // global position of the starting x and y of all the lines
    lines._x = 500;
    lines._y = 100;
    };
    drawLines(4);



    as for your movie: I don't like tweening much either, this code will give you the angles you desire, but you can set this up to loop draw the menu as well

    good luck,
    Donnie
    Multimedia Developer
    Los Angeles, CA
    www.pixelrot.com

  13. #53
    Member
    Join Date
    Jul 2003
    Location
    Brampton, ONT
    Posts
    50

    thanks dude

    I'll give it a whirl .. I'll let you know how it goes ..

    Jess

  14. #54
    Member
    Join Date
    Jul 2003
    Location
    Brampton, ONT
    Posts
    50

    sound loop

    HI Donnie .. just a quick Q //

    How can I create a sound loop in AS? I know it should be a simple fix but .. any ideas?

    Jess

    Ps. The project is almost done .. !!

  15. #55
    Junior Member
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    24
    alright,

    the sound isn't so bad to do at all....

    code:

    // sound check is here for an infinite loop...
    // if you don't want an infinite loop you can delete soundCheck and the reference to it
    soundCheck = function () {
    this.onEnterFrame = function() {
    loop.onSoundComplete = function() {
    loop.start();
    };
    };
    };
    loop = new Sound();
    loop.loadSound("your.mp3", false);
    this.onEnterFrame = function() {
    loaded = loop.getBytesLoaded();
    total = loop.getBytesTotal();
    if (loaded == total) {
    trace("success");
    delete this.onEnterFrame;
    soundCheck();
    // if you do delete soundCheck make sure to put loop.start(0,howmanyloopshere); instead of what is below
    loop.start();
    }
    };

    Donnie
    Multimedia Developer
    Los Angeles, CA
    www.pixelrot.com

  16. #56
    Member
    Join Date
    Jul 2003
    Location
    Brampton, ONT
    Posts
    50

    excellent ..

    Thanks Donnie .. sorry for the delayed reply .. the loop works fantastic .. the site goes live tomorrow morning ..

  17. #57
    Member
    Join Date
    Jul 2003
    Location
    Brampton, ONT
    Posts
    50

    UNICODE text

    Hi Donnie ..

    I have this file that contains a text scroller that reads text from an external txt file that is french. I have it saved as UNICODE ..

    It works great on its own, but when I load it onto another movie .. the text doesn't read ..

    I sent the flas over to you to take a look ..

    what do you think is the problem?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center