dcsimg
A Flash Developer Resource Site

Search:

Type: Posts; User: Scimmer

Page 1 of 2 1 2

Search: Search took 0.07 seconds.

  1. Replies
    6
    Views
    434

    allright, thats just basic programming- your way...

    allright, thats just basic programming- your way of checking the keys wasnt correct- it must look like:

    char.lastCode = Key.RIGHT;
    char.onKeyUp = function ()
    {
    var code = Key.getCode ();
    if...
  2. Thread: Mouse position

    by Scimmer
    Replies
    2
    Views
    352

    You could put your Objects into a main Movieclip...

    You could put your Objects into a main Movieclip und apply a "on(rollOut)"- Event to it.

    Maybe you can also use setInterval() with a small timer to keep track of mouse movement.
  3. Replies
    6
    Views
    434

    I just copied your code into a onKeyUp-Event....

    I just copied your code into a onKeyUp-Event. Youll have to delete your black box and write this code into your first frame:



    char.onKeyUp = function ()
    {
    var code = Key.getCode ();
    ...
  4. Replies
    3
    Views
    416

    I never write function ..() but .. = function(),...

    I never write function ..() but .. = function(), so i wrote the code my way- but im not sure why the other way doesnt work, anyway, this seems to work:



    onClipEvent (mouseDown) {

    //Effects...
  5. Replies
    2
    Views
    258

    What youre looking for is called onSetFocus, not...

    What youre looking for is called onSetFocus, not onMouseDown.
  6. Replies
    3
    Views
    416

    What are destX and destY? If they refer to your...

    What are destX and destY? If they refer to your movieclip, then youll have to write



    myObj.DisplayTrace = function(mc)
    {
    mc.destX = _root.orb._x;
    mc.destY = _root.orb._y;
    }
  7. Replies
    6
    Views
    434

    Apparently your using the onKeyDown-Event, thats...

    Apparently your using the onKeyDown-Event, thats why the player can hold down the keys to continue moving.
    Just use onKeyUp instead.
  8. (again: use external preloaders)

    (again: use external preloaders)
  9. Replies
    4
    Views
    338

    No, ^^ as far as i know flash isnt able to do...

    No, ^^ as far as i know flash isnt able to do this at all! Its Html dictionary is limited to some useless tags- thats why people have to create their own flash forms, for example.
  10. Hm, in some cases, if your background is static,...

    Hm, in some cases, if your background is static, you could play a series of images instead where your background is integrated in your images.
    That way, alpha is "precalculated", but your swf file...
  11. Thread: A basic Timer

    by Scimmer
    Replies
    6
    Views
    673

    So create your button that way, for example: ...

    So create your button that way, for example:


    on (release)
    {
    clockStopped = !clockStopped;
    }
  12. Replies
    3
    Views
    334

    In general, you should always should use globals...

    In general, you should always should use globals instead of _root.
    Dont use _root because you never know if someday your swf will be imported into another.
    Just write in the first frame something...
  13. Thread: A basic Timer

    by Scimmer
    Replies
    6
    Views
    673

    Why, just open a new flash document, create the...

    Why, just open a new flash document, create the three textfields and dont forget the instance names and put the code into the first frame with a stop(); at the end- that should work, doesnt it?
    ...
  14. Maybe i dont understand your question.. but...

    Maybe i dont understand your question.. but parent Movieclips always move their content with them- so if you create an empty Movieclip and load your swf into it and then move that Movieclip, its...
  15. Thread: A basic Timer

    by Scimmer
    Replies
    6
    Views
    673

    Create three Textfields on the stage and call...

    Create three Textfields on the stage and call them txtSecs, txtMins, txtHours. Then you can do something like that (once):



    clockStopped = false;
    totalsecs = 0;
    clockID = setInterval...
  16. Why dont you use Movieclips for each sections...

    Why dont you use Movieclips for each sections instead of invisible buttons? Then you could simply do something like this for every mc:




    on (rollOver)
    {
    onEnterFrame = function ()
    {...
  17. When dragging an mc, just do the following:...

    When dragging an mc, just do the following:
    mc.swapDepths (mc.getDepth () + 1000);

    And when dropped:
    mc.swapDepths (mc.getDepth () - 1000);

    (I assume you have less than 1000 mcs.)
  18. That way? var frame = this._currentframe +...

    That way?

    var frame = this._currentframe + numEnemiesKilled;

    if (frame > this._totalframes )
    frame = this._totalframes;

    this.gotoAndStop (frame);
  19. Replies
    3
    Views
    439

    @SpockBert: 1) If you loaded them alle into an...

    @SpockBert:

    1) If you loaded them alle into an empty Movieclip that doesnt contain other data, you can use for in that way:

    for (var i in mc)
    {
    mc [i] = undefined;
    }

    2) If they...
  20. change this: _root.onEnterFrame = function() {...

    change this:

    _root.onEnterFrame = function() {
    if(contadorluciernagas > 2) {
    _root.mcdawn.gotoAndPlay(2);
    }
    }

    to:
  21. Replies
    7
    Views
    553

    Cant you just change the loading function to load...

    Cant you just change the loading function to load the variables into an empty movieclip?
  22. Replies
    3
    Views
    318

    it should be: onClipEvent (data) {...

    it should be:
    onClipEvent (data) {
    _parent.myText.htmlText = this.content;
    }

    because _root is not your main-mc which actually contains the myText-mc.
  23. Replies
    7
    Views
    553

    I assume you loaded them into an empty movieclip...

    I assume you loaded them into an empty movieclip mc. Then you can do something like this:

    var aVals = new Array ();
    for (var i in mc)
    aVals.push (mc [i]);

    This isnt the fastest way but the...
  24. Replies
    2
    Views
    453

    Look at that example, lets say myArray.length =...

    Look at that example, lets say myArray.length = 2:

    Math.random() -> 0.98
    Math.random() * myArray.length -> 1,96
    Math.round (Math.random() * myArray.length) -> 2
    ...
  25. Well, I didnt look at your .fla, but i always...

    Well, I didnt look at your .fla, but i always recommend using separated preloaders, I mean external swfs- they show up early, because theyre small. (But then dont forget to use globals instead of...
Results 1 to 25 of 34
Page 1 of 2 1 2




Click Here to Expand Forum to Full Width

HTML5 Development Center