A Flash Developer Resource Site

Search:

Type: Posts; User: medfoe

Page 1 of 3 1 2 3

Search: Search took 0.02 seconds.

  1. Replies
    5
    Views
    891

    If your button is "my_btn": ...

    If your button is "my_btn":

    my_btn.addEventListener(MouseEvent.CLICK, myClick);

    function myClick(e:MouseEvent):void {
    if(subtitles == false) {
    subtitles = true;
    }
    if(subtitles == true) {...
  2. Alright, thanks!

    Alright, thanks!
  3. quadratic equation for y=height and x=time for an object being tossed into the air

    So how do I find the quadratic equation of an object tossed into the air from a point at y=0, if I know the beginning upward velocity and the downward acceleration caused by gravity? (time measured...
  4. Yeah, you're right, I haven't changed Pentu's...

    Yeah, you're right, I haven't changed Pentu's nimi yet.

    Anyways, thanks!
  5. Replies
    5
    Views
    891

    If your text box's instance name is "my_txt": ...

    If your text box's instance name is "my_txt":

    var subtitles:Boolean = false; // Make an on/off switch called "subtitles"

    if(subtitles == true) { // If switched on
    my_txt.alpha = 1; // Make...
  6. [RESOLVED] vars defined in superclass not working in subclass

    I have two classes. One is a subclass of the other. The superclass looks like this:

    package suomi.suomalainen {
    import flash.display.Sprite;
    public class Koira extends Sprite {
    var nimi:String...
  7. Using a loop to automatically put vars on an array

    I have a class called FC. I want to automatically put all instances of it on an array. I think the best way to do this would be to use a loop. I would usually use a For Loop to automatically add code...
  8. Replies
    5
    Views
    1,005

    CS4 Limits on how far you can scroll.

    I'm making a game, and I want to place objects on the stage, but Flash won't let me scroll past a certain point in the fla. Is there a way of scrolling further?
  9. Replies
    0
    Views
    435

    CS4 Limits on how far you can scroll.

    I'm making a game, and I want to place objects on the stage, but Flash won't let me scroll past a certain point in the fla. Is there a way of scrolling further?
  10. Replies
    1
    Views
    422

    CS4 Limits on how far you can scroll.

    Well, I just got made a normal member, so I'm going to celebrate by asking a total newb question:

    I'm making a game, and I want to place objects on the stage, but Flash won't let me scroll past a...
  11. Replies
    5
    Views
    2,086

    Does your code in the actual movie look like...

    Does your code in the actual movie look like this?:

    function onEnterFrame() {
    if(enemy1._y > 500){
    enemy1.gotoAndStop (2);
    }

    If I understand what you're trying to do, this should work.
  12. Replies
    7
    Views
    5,043

    Also, if you want to put the code on the main...

    Also, if you want to put the code on the main timeline in as2, you could use this:

    myButton.onRelease = function() {
    getURL("http://www.flashkit.com","_new");
    }
  13. Replies
    7
    Views
    5,043

    This AS3 code would do what the previous code did...

    This AS3 code would do what the previous code did when you used "_blank". I don't know how to force a new window when the browser has tabs, though.

    function gotoPDF(e:MouseEvent):void {
    var...
  14. Wierd...what was the code you used?

    Wierd...what was the code you used?
  15. Replies
    5
    Views
    921

    Hey, sorry if you had trouble with that one. I...

    Hey, sorry if you had trouble with that one. I think I should have put "CLICK" where I put "MOUSE_CLICK".
  16. Replies
    3
    Views
    9,006

    var myTimer = new Timer(1000); // Creates a timer...

    var myTimer = new Timer(1000); // Creates a timer that goes in cycles of 1000 milliseconds until you tell it to stop.

    myTimer.start(); // Starts the timer.
    ...
  17. Where object 1 is the mc within an mc, and...

    Where object 1 is the mc within an mc, and object2 is the one on the maintimeline:

    object1.y = MovieClip(root).object2.y;

    You can access an object relative to your current MovieClip's parent by...
  18. Replies
    3
    Views
    9,006

    var myTimer = new Timer(1000, 1); // Make a timer...

    var myTimer = new Timer(1000, 1); // Make a timer called myTimer that makes one cycle of 1000 milliseconds.

    myObject.x = Math.random() * 550; // place myObject in a random x coordinate between 0...
  19. Thread: zoom and pan

    by medfoe
    Replies
    2
    Views
    1,655

    Flash8 I don't know how to zoom, but here's an idea for...

    I don't know how to zoom, but here's an idea for panning:

    function onEnterFrame() { // Everything between these two curley braces is part of a function called the "onEnterFrame" function. A...
  20. Replies
    7
    Views
    5,043

    If you're using ActionScript 2.0, try this,...

    If you're using ActionScript 2.0, try this, replacing "http://www.flashkit.com" with the web address of your pdf. You can replace "_new" with "_blank" to allow the browser to open the pdf in a new...
  21. Replies
    7
    Views
    5,043

    What version of flash do you have, and what...

    What version of flash do you have, and what version of ActionScript?
  22. Replies
    5
    Views
    921

    So, if the button is myButton_btn and the movie...

    So, if the button is myButton_btn and the movie clip is myMovieClip_mc, the following code should work:

    myButton_btn.addEventListener(MouseEvent.MOUSE_CLICK, myMouseClick); // If the mouse is...
  23. Replies
    0
    Views
    520

    Explanation on coordinates?

    I'm confused about where (0,0) is, exactly. I know it's in the top-left corner, but is y = 0 at the furthest pixel to the top of the stage, the lowest pixel that is outside the stage, or between...
  24. Making a keyboard event only fire once when the key is held down

    Okay, this one has got me stumped. I want an object to move 10 pixels every time a key is pressed, and I don't want it to keep moving when the key is held down.

    And I want to know why it moves...
  25. Replies
    5
    Views
    2,767

    I'm trying to do is to get every object of one...

    I'm trying to do is to get every object of one class to react the same way to every object of another class. Or maybe I shouldn't be using classes for this, I don't know. I'm making a side-scroller...
Results 1 to 25 of 58
Page 1 of 3 1 2 3




Click Here to Expand Forum to Full Width

HTML5 Development Center