Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
AS help pliz

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Flash
View previous topic :: View next topic  
Author Message
budha



Joined: 02 Mar 2004
Posts: 1377
Location: Osijek

PostPosted: 05.12.2004 17:58    Post subject: AS help pliz Add user to your forum ignore list Reply with quote

opet ja sa glupavim pitanjima...

unutar MC-a panel, kreiram MC pic1:
Code:

   _root["panel"].createEmptyMovieClip("pic1", 1);


kako sada dodati onRelease funkciju pic1-u?
Code:
_root["panel"].pic1.onRelease = function { /*ovdi funkcija*/ };

ne radi Sad

Last edited by budha on 05.12.2004 22:06; edited 1 time in total

_________________
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
Back to top
View user's profile Send private message Visit poster's website
Platypus



Joined: 07 Feb 2004
Posts: 235

PostPosted: 05.12.2004 21:04    Post subject: Add user to your forum ignore list Reply with quote

_root.panel.createEmptyMovieClip("pic1", 1);
_root.panel.pic1.onRelease = function { /*ovdi funkcija*/ };
Back to top
View user's profile Send private message MSN Messenger
budha



Joined: 02 Mar 2004
Posts: 1377
Location: Osijek

PostPosted: 05.12.2004 21:13    Post subject: Add user to your forum ignore list Reply with quote

probao, ne radi:
flash wrote:
**Error** Scene=Scene 1, layer=Movie, frame=1:Line 42: Function name expected
_root.panel.pic1.onRelease = function { trace("radi!"); };


a ako dam ime:
Code:
_root.panel.pic1.onRelease = function radi() { trace("radi!"); };

flash wrote:
**Error** Scene=Scene 1, layer=Movie, frame=1:Line 42: Function declaration not permitted here
_root.panel.pic1.onRelease = function radi() { trace("radi!"); };

_________________
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
Back to top
View user's profile Send private message Visit poster's website
njava
mi3.crew


Joined: 25 Aug 2003
Posts: 624
Location: Zagreb

PostPosted: 05.12.2004 21:31    Post subject: Add user to your forum ignore list Reply with quote

Code:

_root["panel"].pic1.onRelease = function () {
    /*ovdi funkcija*/
}


bolje bi bilo napisati (ako ti se kod nalazi kod unutar panel MC-a):

Code:

this.createEmptyMovieClip("pic1", 1);
this.pic1.onRelease = function () {
    /*ovdi funkcija*/
}
Back to top
View user's profile Send private message Visit poster's website
budha



Joined: 02 Mar 2004
Posts: 1377
Location: Osijek

PostPosted: 05.12.2004 21:37    Post subject: Add user to your forum ignore list Reply with quote

@njava: code se ne nalazi unutar panel-a Sad
ni ne moze, jer se panel generira as-om...

_________________
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
Back to top
View user's profile Send private message Visit poster's website
Platypus



Joined: 07 Feb 2004
Posts: 235

PostPosted: 05.12.2004 22:13    Post subject: Add user to your forum ignore list Reply with quote

_root.panel.createEmptyMovieClip("pic1", 1);
_root.panel.pic1.onRelease = function() { /*ovdi funkcija*/ }
Back to top
View user's profile Send private message MSN Messenger
budha



Joined: 02 Mar 2004
Posts: 1377
Location: Osijek

PostPosted: 05.12.2004 22:18    Post subject: Add user to your forum ignore list Reply with quote

pokusao sam i sa zagradama iza function, ali nista... :givap

_________________
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
Back to top
View user's profile Send private message Visit poster's website
njava
mi3.crew


Joined: 25 Aug 2003
Posts: 624
Location: Zagreb

PostPosted: 05.12.2004 22:42    Post subject: Add user to your forum ignore list Reply with quote

budha wrote:
@njava: code se ne nalazi unutar panel-a Sad
ni ne moze, jer se panel generira as-om...


moze, bez obzira da li se generira AS-om ili ne. na glavnom timelineu pises (this se odnosi na _root koji je 'base' movie clip i uvijek postoji):

Code:

this.createEmptyMovieClip("test", 1);
this.test.attachMovie("identifierIzLibraryja", "imeInstanceKojuKreiras", 1);
this.test.imeInstanceKojuKreiras.onRelease = function() {
    trace("evo me");
}
Back to top
View user's profile Send private message Visit poster's website
budha



Joined: 02 Mar 2004
Posts: 1377
Location: Osijek

PostPosted: 05.12.2004 22:50    Post subject: Add user to your forum ignore list Reply with quote

kako mogu dobiti identifierIzLibraryja ako mi jpg koji ucitavam nije u libraryu?

edit: i koristim loadMovie, a ne attachMovie...

_________________
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
Back to top
View user's profile Send private message Visit poster's website
Platypus



Joined: 07 Feb 2004
Posts: 235

PostPosted: 05.12.2004 22:58    Post subject: Add user to your forum ignore list Reply with quote

budha wrote:
pokusao sam i sa zagradama iza function, ali nista... :givap



sad si me natjerao da otvorim flash Twisted Evil i sve radi.. probaj ponovo..
Back to top
View user's profile Send private message MSN Messenger
budha



Joined: 02 Mar 2004
Posts: 1377
Location: Osijek

PostPosted: 05.12.2004 23:02    Post subject: Add user to your forum ignore list Reply with quote

Platypus wrote:
sad si me natjerao da otvorim flash Twisted Evil i sve radi.. probaj ponovo..

radi ako je u _root-u i meni, ali cim imam _root.nesto1.nesto2.onRelease nece Sad

_________________
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
Back to top
View user's profile Send private message Visit poster's website
Platypus



Joined: 07 Feb 2004
Posts: 235

PostPosted: 05.12.2004 23:26    Post subject: Add user to your forum ignore list Reply with quote

ajde postaj cijeli kod koji koristis.. ovako necemo zavrsit do Bozica Very Happy
Back to top
View user's profile Send private message MSN Messenger
budha



Joined: 02 Mar 2004
Posts: 1377
Location: Osijek

PostPosted: 06.12.2004 15:45    Post subject: Add user to your forum ignore list Reply with quote

nije bitno... Confused

rjesio sam "zaobilaznim" putem:
napravio sam transparentni MC iznad, i njemu bez problema pridruzio f-iju...

ocito da postoji "jos nesto" kada se u mc loada *.jpg...

thanx @ all!

_________________
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Flash All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group