dcsimg
A Flash Developer Resource Site

Search:

Type: Posts; User: websam

Page 1 of 20 1 2 3 4

Search: Search took 0.14 seconds.

  1. Replies
    8
    Views
    11,180

    If you want to control your own MC on main...

    If you want to control your own MC on main timeline, all you need to do is to change _root.gotoAndStop(fNum) to your_MC.gotoAndStop(fNum)

    and change _root._totalframes/this._totalframes to...
  2. Replies
    8
    Views
    11,180

    Hey there, Use the previous sample I made, and...

    Hey there,

    Use the previous sample I made, and change the script on frame 2 to the following:




    nob._x = slot._x + slot._width/2;
    nob._y = slot._y;
    fNum = Math.ceil(this._totalframes/2);
  3. Replies
    2
    Views
    344

    You need to reset your setInterval: var...

    You need to reset your setInterval:



    var intVal;
    var variableTime = 100;

    function saySomething(){
    trace("hello world");
    }
  4. Replies
    4
    Views
    610

    Now you can get your shared object running, and...

    Now you can get your shared object running, and you don't need to rely on server script to generate you unique ID. You can handle this all in Flash.

    The idea behind it is that you use date and...
  5. Replies
    13
    Views
    647

    It is obvious that the relative path for all...

    It is obvious that the relative path for all thumbnails are in "images/thumbnails/" ranther than just "images/".

    Do following steps:

    Step 1. check what first_project returns you

    ...
  6. Replies
    4
    Views
    382

    try this: path = _root["img0"+i+"_mc"].img_mc;...

    try this:

    path = _root["img0"+i+"_mc"].img_mc;
    pathx = _root["img0"+i+"_mc"].img_mc._x;

    *** Because .img_mc is not part of dynamic names, cannot included into dynamic naming bracket.

    By...
  7. Replies
    13
    Views
    647

    Can you tell the following info: 1. FULL path...

    Can you tell the following info:

    1. FULL path of the FLA
    2. FULL path of your thumbnail images?
    3. value of a variable "rel"?
    4. trace result of your XML object
  8. Thread: hitTest trigger

    by websam
    Replies
    4
    Views
    337

    You need to make your checking IF statement into...

    You need to make your checking IF statement into a function instead of standing there raw. Also, if you declare pIsIn and mIsIn within a function, it becomes local to the function.


    ...
  9. Replies
    6
    Views
    606

    My mistake, sorry..here is the code: *** Also,...

    My mistake, sorry..here is the code:

    *** Also, as you don't need to format other things except thousand marker, so you don't need parameter for that.



    a =500002200
    trace(format(a + 2));
  10. Thread: hitTest Prob

    by websam
    Replies
    10
    Views
    1,071

    Using shape flag will not really solve the...

    Using shape flag will not really solve the problem of the hitTest you look for. Collision may occur before hitTest return you true because you are hit testing a registration point of one object to...
  11. Replies
    5
    Views
    402

    Using Tween class to move object in straight line...

    Using Tween class to move object in straight line is the optimum way. I cannot agree more.

    Just a little hint that if you need to move objects in curve or involving physics, you better use...
  12. Replies
    5
    Views
    402

    AS looping is not suitable for moving mc as it is...

    AS looping is not suitable for moving mc as it is way to fast for eyes to catch. You can use setInterval to introduce delay, or adding onEnterFrame clip event at runtime.
  13. Thread: hitTest Prob

    by websam
    Replies
    10
    Views
    1,071

    Flash hitTest uses the width and height of an...

    Flash hitTest uses the width and height of an object to form a bound box of hitting area when using hitTest. Therefore, even you have empty area inside that rectangle box, hitTest still return true...
  14. Replies
    6
    Views
    606

    For your case: // ----- Balance Sheet Object...

    For your case:


    // ----- Balance Sheet Object
    var blanceSheet:Object = new Object();
    blanceSheet.assets = new Array();
    blanceSheet.assets[0] = 10000; // Cash at bank
    blanceSheet.assets[1] =...
  15. Replies
    6
    Views
    606

    Here is the function you can format a normal...

    Here is the function you can format a normal number to accounting display with options for the number of decimal you want and if you want the thousand mark. You may easily modify my function to cater...
  16. Replies
    6
    Views
    606

    Thousand mark is a format of displying number in...

    Thousand mark is a format of displying number in Accounting. Therefore, you should store its original value eg 10000 instead of 10,000.

    You only format it when you need to display in such format,...
  17. Replies
    5
    Views
    617

    It could be easier to parse HTML tags from...

    It could be easier to parse HTML tags from external XML by pre-encoded the tag bracket.

    "<" use "&lt;" instead
    ">" use "&gt;" instead

    If you want to have line break, write &lt;br&gt instead of...
  18. Thread: class problem

    by websam
    Replies
    8
    Views
    450

    I now visaulize the function by moving the object...

    I now visaulize the function by moving the object to show you it is working.
  19. Thread: class problem

    by websam
    Replies
    8
    Views
    450

    My sample works... just showing you in Output...

    My sample works... just showing you in Output window... I removed all codes in moveMe() and fire() method and replaced by only a trace() line.

    If you see "I am moving..." in output window, means...
  20. Thread: class problem

    by websam
    Replies
    8
    Views
    450

    DataType MovieClip the "C" should be in capital...

    DataType MovieClip the "C" should be in capital letter. Also, try to avoid using reserved word "move".

    class Turkey extends MovieClip

    See demo FLA
  21. Replies
    12
    Views
    513

    It is easier for us by posting your FLA here so...

    It is easier for us by posting your FLA here so that others can work on it and debugging it for you.
  22. Thread: Button Class

    by websam
    Replies
    6
    Views
    520

    I managed to come up with this. You can create as...

    I managed to come up with this. You can create as many buttons as you want and register with regButtons class so that they can be treated as a group of buttons.

    But, it's kind of cranky and I am...
  23. Replies
    12
    Views
    513

    Use following code to a dummy button and tell me...

    Use following code to a dummy button and tell me the result of the trace:


    on (press)
    {
    trace(_level0.blu);
    trace(_root.rooms._name);
    trace(_root.rooms.bluetable._name);
    ...
  24. Replies
    3
    Views
    516

    your_textfield.onChanged=function(){ if...

    your_textfield.onChanged=function(){
    if (Number(this.text) <0 || Number(this.text)>10){
    // invalid number entered...
    }else{
    // valid number
    }
    }
  25. Thread: Button Class

    by websam
    Replies
    6
    Views
    520

    The problem seems like no reference. Change...

    The problem seems like no reference.

    Change the constructor of your class to following code and should work:



    var obj:MovieClip;
    function Buttons(target:MovieClip) {
    obj =...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4




Click Here to Expand Forum to Full Width

HTML5 Development Center