[Flash8] AS code + MC, function werkt niet.

Pagina: 1
Acties:

  • MrVegeta
  • Registratie: September 2002
  • Laatst online: 18-02 12:31

MrVegeta

! Dolf is rechtvaardig !

Topicstarter
Ik heb nogal een raar probleem met een code.

Dit is de code. De movieclip heeft de instance naam "msn". Maar de code doet helemaal niets.

code:
1
2
3
4
5
6
7
8
9
10
11
12
msn.onRelease = function(){
    
if (_root.currMovie == undefined) { 
_root.currMovie = "pages/contactme/email"; 
container.loadMovie("pages/contactme/email.swf"); 
} else if (_root.currMovie != "pages/contactme/email") { 
if (container._currentframe >= container.midframe) { 
_root.currMovie = "pages/contactme/email"; 
this._parent.container.play(); 
} 
} 
}


Deze code werkt wel als je hem in een button plaatst, maar dus niet als je het op een frame plaatst met een verwijzing naar een MC instance. Dat is het probleem.

Dit is de code op de MC voor de animatie in de MC.

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// check to see if the mouse is over the menu every time a new frame is entered
onClipEvent (enterFrame) {
    // if the mouse IS over the menu ...
    if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
        // if the menu is NOT fully open
        if (this._currentframe<this._totalframes) {
            // go to the next frame of the menu opening sequence
            nextFrame();
        }
        // if the mouse is NOT over the menu
    } else {
        // if the menu is NOT fully closed
        if (this._currentframe>1) {
            // play the previous frame of the menu opening sequence
            prevFrame();
        }
    }
}


Hier is het .fla bestand. Het gaat om de MC rechtsboven (contactme) daar staat de MC "MSN" in, daar gaat het om.
http://84.41.133.88/portfolio/portfolio-inhoud.fla

http://84.41.133.88/portfolio/ hier is de rest van de portfolio te vinden.

Het probleem is dus dat ik niet goed een OnRelease functie kan aanroepen met de bovenste code (om een externe SWF file in "container" te laden).

Geeft steekhoudelijke argumenten terwijl hij niet weet waar het over gaat. BlizzBoys, HD casts van StarCraft II gemaakt door Tweakers! Het begint, Zombiepocalyps


  • Murphy
  • Registratie: November 2000
  • Laatst online: 04-02 14:35

Murphy

(2B||!2B)?

En traces in de bovenste code? Voert ie die wel uit als je er op klikt?

Wat me opvalt is dat je je movie in container laadt, terwijl je later this._parent.container aanspreekt...