Messages - RedPillow [ switch to compact view ]

Pages: prev1 2 3 [4] 5 6 7 8 9 ... 28next
16
Aha!
It was hidden under Advanced > Something > Something :P

http://img407.imageshack.us/img407/1435/aflashlink.jpg


Got it to work just right - Thanks so much for help!

- RedPillow

17
You might be right ... someone said this:

sound works just as movieclips, create a sound in the .fla, use the linkage dialog in teh library and set Class to: "MySound1"
then use it with:

var snd:MySound1= new MySound1();
snd.play();

should work..


But since Im new with flash I have no idea how to "create a sound in the .fla, use the linkage dialog in teh library and set Class to: "MySound1"".
(Incase it's important ... Im making a basic starting-sequence for a flash-game/animation like "Game by: blahahah" and there's a button which links to my twitter but I want it to make *click* -sound when clicked)

18
I found something like this:

Code: ActionScript [Select]
  1. var snd:MySound1= new MySound1();
  2.  
  3. soundbutton_MC.addEventListener (MouseEvent.CLICK, soundbutton_Handler);
  4.  
  5. function soundbutton_Handler (e:MouseEvent):void {
  6. snd.play();
  7. }

I have the sound-effect in my Adobe Flash's library ... where should I put it and how to make the script know to play that one?

19
Developer's Corner / Re: Rock physics math-thing [PHP]
« on: January 19, 2011, 06:03 AM »
But the exercise told me that formula  :huh:
My teacher has messed these up before though ... any idea how to actually do this thing then?

Edit: Oh ... I'll try the t^2 one.

Am I right when I think, that the printout should be something like this:


Rock's height is 10 when 1-seconds has passed.
Rock's height is 20 when 2-seconds has passed.
Rock's height is 30 when 3-seconds has passed.
Rock's height is 40 when 4-seconds has passed.
Rock's height is 30 when 5-seconds has passed.
Rock's height is 20 when 6-seconds has passed.
Rock's height is 10 when 7-seconds has passed.
Rock's height is 0 when 8-seconds has passed.


20
Developer's Corner / Rock physics math-thing [PHP]
« on: January 19, 2011, 05:52 AM »
Yes, this is part of a homework which I've tried to do 2 days now...
I tried to translate it as good as I can


"if rock is thrown directly up from the ground with starting speed of 20 meters/second, rock's height s (meters) after t (seconds) can be count with this formula:
s = -5t2 + 20t

Make a program, which counts and prints rock's height on each second."

I've tried this with different changes but none of them have worked so far:

Code: PHP [Select]
  1. $time = 1;
  2. $height = 1;
  3.  
  4. while ($height > 0) {
  5. $height = ((-5*$time*2)+(20*$time));
  6. $time++;
  7. echo "Rock's height is " . $height . " when " . $aika . " -seconds has passed.<br />";
  8. }

And this prints out infinite lines of this:

Rock's height is 10 when -seconds has passed.
Rock's height is 20 when -seconds has passed.
Rock's height is 30 when -seconds has passed.
Rock's height is 40 when -seconds has passed.
Rock's height is 50 when -seconds has passed.
Rock's height is 60 when -seconds has passed.
Rock's height is 70 when -seconds has passed.
Rock's height is 80 when -seconds has passed.
Rock's height is 90 when -seconds has passed.
Rock's height is 100 when -seconds has passed.

It goes on and on.


So ... what am I doing wrong / not getting?

-RedPillow

Pages: prev1 2 3 [4] 5 6 7 8 9 ... 28next
Go to full version