A Flash Developer Resource Site

Search:

Type: Posts; User: gaz_b

Page 1 of 19 1 2 3 4

Search: Search took 0.11 seconds.

  1. Replies
    3
    Views
    535

    Re: Setting Variables Right?

    try this:

    on (press) {
    ++count;
    if (count>10) {
    _root.gotoAndPlay(78);
    } else {
    _root.gotoAndPlay (64);
    }
    }
  2. Replies
    3
    Views
    535

    remove these two lines: set (count, 1);...

    remove these two lines:
    set (count, 1);
    +count;

    and insert in their place :
    ++count;

    that ought to do it.
  3. Replies
    1
    Views
    385

    i took a quick look at your code and the first...

    i took a quick look at your code and the first thing that occurred to me is that you are not calling the checkTime function in the code you posted.
    something like below will do it:

    onClipEvent...
  4. Replies
    2
    Views
    512

    you could use "else if" combined with "else" to...

    you could use "else if" combined with "else" to do it (see below),
    then if neither LEFT/RIGHT key is down it will gotoAndStop frame 1.



    onClipEvent (load) {
    moveSpeed = 5;
    }
    onClipEvent...
  5. Replies
    3
    Views
    397

    you left out "this" :) the line: ["gennum"+i]...

    you left out "this" :)

    the line:
    ["gennum"+i] = myarray[i]
    should be:
    this["gennum"+i] = myarray[i]

    the "this" at the start of the line is not optional. it basically tells flash on which...
  6. Replies
    3
    Views
    397

    try array notation instead of eval should fix it...

    try array notation instead of eval should fix it eg:
    this["gennum"+i] = myarray[i]
  7. Replies
    1
    Views
    437

    in mx you can make your unique scripts functions...

    in mx you can make your unique scripts functions on the main timeline then assign the appropriate function to the onEnterFrame event of a clip when you attach it.
    have a look for onEnterFrame in...
  8. Replies
    2
    Views
    372

    a simple version would be to use split/join eg: ...

    a simple version would be to use split/join eg:

    Input = "Welcome everyone";
    Output = Input.split("e").join("a");
    trace (Output); // outputs "Walcoma avaryona"

    or for a more elaborate version...
  9. Replies
    4
    Views
    819

    well eval works differently in MX so maybe that...

    well eval works differently in MX so maybe that is the problem.

    your eval statement :
    eval(varName).txtField = "blah blah";

    can also be written as:
    relative eg:
    this[varName].txtField =...
  10. Replies
    2
    Views
    399

    if you can hard code the total in a text file...

    if you can hard code the total in a text file then flash could load that first to discover how many to load.
    if you can't hard code the total somewhere then you could use some server side scripting...
  11. Replies
    4
    Views
    819

    the code looks ok but you didn't include how you...

    the code looks ok but you didn't include how you call the function.
    eg:
    myDuplicateClip(5)

    aside from that it could be a path problem depending on which timeline the function is declared.
    ...
  12. Replies
    1
    Views
    502

    generally speaking the syntax you are looking for...

    generally speaking the syntax you are looking for is "_parent".
    for example:
    if clipA is on _root and has clipB inside it.
    clipB can refer to the _x property of clipA as either:
    _root.clipA._x...
  13. Replies
    2
    Views
    589

    below is a quick example using Penner's color...

    below is a quick example using Penner's color prototype.

    // in root frame #1
    //brighten an object just like Effect panel
    //bright between 0 and 100
    Color.prototype.setBrightness = function...
  14. Replies
    1
    Views
    388

    Re: NOT pulse but transparency

    if you paste the code below on a movieclip it will fade in and out.

    onClipEvent (load) {num=5}
    onClipEvent (enterFrame) {
    _alpha+=num
    if(_alpha>100){num=-5}else if(_alpha<0){num=5}
    }

    if...
  15. Thread: scope issue

    by gaz_b
    Replies
    2
    Views
    484

    as is i think because b is calling it but maybe...

    as is i think because b is calling it but maybe mx is different.
    what happens when you test movie, did B.onLoad = init work?
    F5 variation below.

    [CODE]
    // on parent clip a
    onClipEvent (load) {...
  16. Thread: Gravity

    by gaz_b
    Replies
    2
    Views
    434

    there is a nice tutorial on gravity/friction etc...

    there is a nice tutorial on gravity/friction etc here:
    http://www.philterdesign.com/tutorials/tutorial01.html and another one here http://www.bit-101.com/

    below is some gravity/bounce code you...
  17. not sure about this line: var targ =...

    not sure about this line:
    var targ = this.attachMovie("targetlink", "Target", _root.depth++);

    wouldn't flash prefer :
    _root.depth++
    var targ = this.attachMovie("targetlink", "Target" +...
  18. Replies
    4
    Views
    424

    whenever i get something like this i put in a lot...

    whenever i get something like this i put in a lot of trace commands all over which should eventually show where the code breaks down.

    ps also the traces inside your function will not be called...
  19. Replies
    12
    Views
    786

    1) a couple of typo's in my post which should...

    1) a couple of typo's in my post which should have started "you could use a prototype to..." (ie you don't have to :) ) and also "// in frame 1" should be "// in frame 1 on root timeline" just to be...
  20. Replies
    12
    Views
    786

    you use a prototype to make a function available...

    you use a prototype to make a function available to all mc's eg:

    // in frame 1
    MovieClip.prototype.wrap = function () {
    if (this._x>550) {this._x = 0}
    }

    // on any movieclip
    onClipEvent...
  21. Replies
    14
    Views
    719

    whispers you need to change two things in your...

    whispers you need to change two things in your api_line.fla:

    change this:
    onClipEvent (load) {
    _x = point1._x;
    _y = point1._y;
    _xscale = point2._x-point1._x;
    _yscale =...
  22. Replies
    1
    Views
    427

    unfortunately you cannot attach sounds from...

    unfortunately you cannot attach sounds from another movies library, you can only attach sounds from the library of the current movie.
    movie1 can attach sounds (or clips) from the library of movie1...
  23. _root.GreenPaketaLeft.gotoAndPlay("EndStart");

    _root.GreenPaketaLeft.gotoAndPlay("EndStart");
  24. to increment the variable speed you can use...

    to increment the variable speed you can use speed=speed+1 or just speed++.
    to loop thru the values speed1 to speed4 you can use array notation eg:


    speed=3
    speed1=5;
    speed2=6;
    speed3=-2;...
  25. Replies
    3
    Views
    419

    not a book but there are some good flash/xml...

    not a book but there are some good flash/xml related linke here which might help you:
    http://www.were-here.com/forums/announcement.php?forumid=30
Results 1 to 25 of 461
Page 1 of 19 1 2 3 4




Click Here to Expand Forum to Full Width

HTML5 Development Center