dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Basic 3DFA question

  1. #1
    Junior Member
    Join Date
    May 2002
    Posts
    26
    This is a basic 3DFA question. I am new to Flash and to 3DFA though not to programming or design. I created a basic bitmap element and am trying to move it with the right arrow key. So created a
    1. bitmap element and
    2. a right arrow element.

    So with the right arrow key down, I tried to get the bitmap position using get property x position. then tried to add 5 to x position and assign it to the bitmap.

    Well it doesnt do anything when i press the right arrow though. So what am I doing wrong. It gives me error messages. Anybody help me decipher these error messages(below). 325?. object[0]? object[1]?. Does object[0] refer to my bitmap element and object[1] refer to my rightarrow element?

    Variable not defined '325' in ActionSet
    Expression could not be evaluated in ActionSet
    'Null' cannot be converted to a number
    Uninitialized checkbutton property: (object[0]).show_flag
    Uninitialized checkbutton property: (object[0]).start_show_flag
    Uninitialized checkbutton property: (object[0]).selectable_flag
    Uninitialized checkbutton property: (object[1]).show_flag
    Uninitialized checkbutton property: (object[1]).start_show_flag
    Uninitialized checkbutton property: (object[1]).selectable_flag
    Uninitialized checkbutton property: (object[2]).show_flag
    Uninitialized checkbutton property: (object[2]).start_show_flag
    Uninitialized checkbutton property: (object[2]).selectable_flag

    Thanks in advance for any help.

    Thanks,
    Ravi

  2. #2
    Senior Member kusco's Avatar
    Join Date
    Nov 2001
    Posts
    681
    Hello BreakPoint,

    This looks a little unusual. Are you using Action Scripting or Javascript?

    Would you be able to post a link to the .movie file so we can have a look at it for you?

    Cheers,
    Ed

  3. #3
    Senior Member zoranvedek's Avatar
    Join Date
    Aug 2001
    Location
    Wagoner OK
    Posts
    892
    Looks pretty unusual to me too. Do you have the 'element has properies' and 'allow velocity and acceleration' buttons checked?

    -Jason

  4. #4
    Junior Member
    Join Date
    May 2002
    Posts
    26
    Hey thanks for the replies Kusco and Jason,

    The problem is solved. Dont ask me how. I made it all clean again and this time the errors didnt crop up. Though errors related to ActionSet do occur now and then while I am experimenting with the tool. (Even when I didnt use either javascript or ActionScript.) I guess as I use 3DFA more will get an idea why they occur and when. I didnt want to use the veolcity n acceleration features. I want to write them myself in javascript if needed. That should give me some practise.

    Now the bitmap does move with the left and right arrows. I am now trying to see how I can assign the x cordinates of the bitmap to a global variable and not have to get them for each key press (left, right) individually. So far unsuccessful. Defining a variable in the main movie is giving me weird results. And using the keyword root in javascript gives me an undefined variable "root" error.. Guess I will figure them out with a little more practise.

    About ActionScript, I see i can add javascript. But I didnt see how I could program using ActionScript in 3DFA directly. Is there an ActionScript editor in there somewhere?.

    Another thing I wish was a little more help within the tool itself. tool tips with detailed explanation. Some sections have it some dont. Guess there are being attended to in the next versions. And not able to move my arrows down and up in the help to scroll down or page up or down.. have to use my mouse to scroll in the help.

    I think if I do get to do something maybe I will put up a simple howtos for newbies myself.

    Thanks again kusco n jason.
    -Ravi

  5. #5
    Senior Member kusco's Avatar
    Join Date
    Nov 2001
    Posts
    681
    Hi BreakPoint,

    Glad to hear you sorted out the first problem.

    Using either Action Scripting or javascript setting up a variable to contain the x position of a bitmap is fairly straight forward. You need to have the 'Has Properties' button depressed for the bitmap and when this is done the name you give to the bitmap is used to reference it.

    When this is done you can change the position of the bitmap by setting its properties. In Action Script it's called Set Property while in javascript you reference it through the element("") function.

    There isn't an editor as such for Action Scripting. This would certainly be a nice feature to add. I've written some Action Script code that's quite long and when it comes to editing/inserting it gets quite tedious.

    The help is always being improved (I've noticed) and yes, I too have to use the mouse to scroll up/down the help window.

    HTH,

    Cheers,
    Kusco

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