Thursday, July 29th 2010, 1:22pm UTC+2

You are not logged in.

  • Login
  • Register

[Sound in Flash] Soundpreloader + regler

Tschdaeff

Super Moderator

Posts: 4,062

Location: Ba-Wü

1

Monday, October 21st 2002, 1:17pm

Soundpreloader + regler

hi hier nen script für nen sound preloader

PHP Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
function soundpre (file) {
    line _root.createEmptyMovieClip("linie",6)
    line.lineStyle (3,0x000000,100)
    line.moveTo (40,100)
    line.lineTo (150,100)
    snd = new Sound ()
    snd.loadSound (file)
    snd.stop ()
    regler _root.createEmptyMovieClip("regler",5)
    with (regler) {
        lineStyle (10xCCCCCC100)
        beginFill (0x505050100)
        moveTo (20,100)
        lineTo (30,100)
        lineTo (30,120)
        lineTo (20,120)
        lineTo (20,100)

    }
    _root.regler.onLoad = function () {
        this._x 70
        this.pos 50
        this._y
    }
    _root.regler.onMouseDown = function () {
        if (this.hitTest(_root._xmouse,_root._ymouse,true)) {
            this.draggen true
        }
        else { this.draggen false }
    }
    _root.regler.onMouseUp = function () {
        this.draggen false
    }
    _root.regler.onEnterFrame = function () {
        trace (this._x)
        if (this.draggen) {
            startDrag (this,false,20,this.y,120,this.y)
            snd.setVolume (this._x-20)
        }
        if (!this.draggen) {
            stopDrag ()
        }
    }        
    this.onEnterFrame = function () {
    this.sndload snd.getBytesLoaded ()
    this.sndall snd.getBytesTotal ()
    this.sndper sndload*100/sndall
    balken _root.createEmptyMovieClip("balken",7)
    with (balken) {
        lineStyle (5,0x003399,100)
        moveTo (40,200)
        lineTo (this.sndper+50,200)
    }
    if (this.sndper == 100) {
        if (!this.spielt) {
        snd.start (0,100)
        this.spielt true
        }
    }
    }
}
_root.onLoad = function () {
    soundpre ("test.mp3")
}



cu mfg
Tschdaeff
Tschdaeff has attached the following file:
  • soundpre.zip (2.49 kB - 390 times downloaded - Last download: Feb 9th 2010, 10:42am)
  • Go to the top of the page

2

Friday, February 20th 2004, 12:26pm

Wie kann ich in der .fla datei das aussehen des regler ändern?
  • Go to the top of the page

Tschdaeff

Super Moderator

Posts: 4,062

Location: Ba-Wü

3

Saturday, February 28th 2004, 7:20pm

der wird per as gezeichnet das solltest du dann vielleicht rausnehmen und per hand machen und dann die aktion zuweisen ;)

cu mfg
Tschdaeff
  • Go to the top of the page