🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #50378

Przekazywanie zmiennych między funkcjami

#50378
From: Czesiu
Date: Thu, 11 Nov 2010 13:21
22 lines
1710 bytes
Witam!
Czy zmienną utworzoną w jednej funkcji można przekazać do drugiej?
Jeżeli tak to jak to wykonać?

Mam taki kod aplikacji air:

function playSound(){
var soundPath = new air.URLRequest(file.nativePath);
var s = new air.Sound();
s.load(soundPath);
var channel = s.play();

}
function pauseSound(){
var pausePosition = channel.position;
channel.stop();
}

Potrzebuje zmiennej channel utworzonej w playSound() do pauseSound().
Próbowałem wszystkiego, googlowałem, ale nic!
Dzięki z góry!
Pozdrawiam Czesiu!
Technical Details
Message-ID: <72d05c6f-ea25-4a80-a57e-c12e310c36b8@32g2000yqz.googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!plix.pl!newsfeed1.plix.pl!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!news-out.readnews.com!transit3.readnews.com!postnews.google.com!32g2000yqz.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!plix.pl!newsfeed1.plix.pl!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!news-out.readnews.com!transit3.readnews.com!postnews.google.com!32g2000yqz.googlegroups.com!not-for-mail
From: Czesiu <tonyhouk@o2.pl>
Newsgroups: pl.comp.lang.javascript
Subject: Przekazywanie zmiennych między funkcjami
Date: Thu, 11 Nov 2010 05:21:09 -0800 (PST)
Organization: http://groups.google.com
Lines: 22
Message-ID: <72d05c6f-ea25-4a80-a57e-c12e310c36b8@32g2000yqz.googlegroups.com>
NNTP-Posting-Host: 83.21.99.29
Mime-Version: 1.0
X-Trace: posting.google.com 1289481669 4462 127.0.0.1 (11 Nov 2010 13:21:09 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 11 Nov 2010 13:21:09 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 32g2000yqz.googlegroups.com; posting-host=83.21.99.29; posting-account=IyKkLgoAAAC26yZr7z3wLXEsdrmFk2qZ
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0),gzip(gfe)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit