Skocz do zawartości
View in the app

A better way to browse. Learn more.

Max3D.pl

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Napisano

Witam serdecznie wszystkich.

Przygotowuję dynamiczną galerię w flash'u. Mam pewien problem, potrzebuję mieć skrypt w AS, który przeszuka folder z fotkami i załaduje je do flasha, niby bez problemowo działa to gdy fotki ładowane są za pomocą XML'a, takiego sposobu używam, ale za każdym razem gdy dodam fotkę (lub fotki muszę ręcznie edytować XML'a). Wiem, że da się to zaprogramować w AS, programistą raczej nie jestem więc zwracam się do Was bardziej doświadczonych :] Jest możliwość także przeszukiwania folderu przez plik *.php, ale też nie wiem jak to zaprogramować. Chodzi mi o to,gdy dodam fotkę do folderu ona automatycznie będzie w galerii, jeśli ją wywale to nie będzie :]

 

 

plik XML wygląda następująco:

 

images/foto1.jpg

images/foto2.jpg

images/foto3.jpg

images/foto4.jpg

images/foto5.jpg

images/foto6.jpg

images/foto7.jpg

 

 

natomiast AS do obsługi tego w ten sposób:

 

descriptions = true;

alert._visible = false;

var ease = 5;

_root.scala_x = 90;

_root.scala_y = 110;

_root.barra_stato = "true";

_root.box.useHandCursor = false;

thumbs = new XML();

thumbs.ignoreWhite = true;

thumbs.load("dati.xml");

thumbs.onLoad = function() {

root = this.firstChild;

total = root.childNodes.length;

displayNum = Number(root.childNodes[0].attributes.displayNum="6");

separation = Number(root.childNodes[0].attributes.separation="5");

w = 60;

h = 55;

mask._width = displayNum*(w+separation);

mask._height = h+30;

forward._x = mask._width+20;

forward._y = back._y=h/2;

mcs = [];

for (i=0; i

mcs.push(i);

newThumb = thumbnailer.container.duplicateMovieClip("container"+i, i);

with (newThumb) {

_x = (w+separation)*i;

preloader._x = w/2;

preloader._y = h/2;

shape._width = w;

shape._height = h;

}

var image = root.childNodes.childNodes[0].firstChild.nodeValue;

var image1 = root.childNodes[0].childNodes[0].firstChild.nodeValue;

newThumb.image = root.childNodes.childNodes[0].firstChild.nodeValue;

newThumb.desc = root.childNodes.childNodes[1].firstChild.nodeValue;

newThumb.link = root.childNodes.childNodes[2].firstChild.nodeValue;

loadMovie(image1, _root.box.foto_effetto);

_root.box._xscale = _root.scala_x;

_root.box._yscale = _root.scala_y;

newThumb.onRelease();

newThumb.cont.loadMovie(image);

newThumb.cont2.loadMovie(image);

newThumb.cont._xscale = 8.2;

newThumb.cont._yscale = 12.2;

newThumb.cont2._xscale = newThumb.cont._xscale;

newThumb.cont2._yscale = newThumb.cont._yscale;

newThumb.onRelease = function() {

loadMovie(this.image, _root.box.foto_effetto);

_root.box.play();

_root.box._xscale = _root.scala_x;

_root.box._yscale = _root.scala_y;

};

if (descriptions) {

newThumb.onRollOver = function() {

alert.desc = this.desc;

alert._visible = true;

this._xscale = 100;

this._yscale = 100;

this.swapDepths(9);

};

newThumb.onRollOut = function() {

alert._visible = false;

this._xscale = 100;

this._yscale = 100;

};

}

}

var offset = total-1;

var dest = 0;

var increment = w+separation;

var ending = (total-displayNum)*(w+separation);

var lastmc = total-1;

var firstmc = 0;

back.onRelease = function() {

if (dest

dest += increment;

} else {

first = mcs[0];

for (k=0; k

mcs[k] = mcs[k+1];

}

mcs[total-1] = first;

thumbnailer["container"+lastmc]._x = -(w+separation);

firstmc = lastmc;

for (k=0; k

if (mcs[k] == (total-1)) {

lastmc = k;

}

}

}

};

forward.onRelease = function() {

if (dest>-ending) {

dest -= increment;

} else {

last = mcs[total-1];

for (k=1; k

mcs[total-k] = mcs[total-k-1];

}

mcs[0] = last;

thumbnailer["container"+firstmc]._x = (displayNum)*(w+separation);

lastmc = firstmc;

for (k=0; k

if (mcs[k] == 0) {

firstmc = k;

}

}

}

};

onEnterFrame = function () {

for (j=0; j

thumbnailer["container"+j]._x += (dest+(mcs[j])*(w+separation)-thumbnailer["container"+j]._x)/ease;

}

alert._x = _xmouse;

alert._y = _ymouse;

};

};

 

 

 

Będe bardzo wdzięczny jeśli ktoś powie mi co i jak. Mam nadzieję że wszystko jasno napisałem. Pozdrawiam kabraone

  • Odpowiedzi 2
  • Wyświetleń 3,1k
  • Created
  • Ostatniej odpowiedzi

Top Posters In This Topic

Napisano
  • Autor

Dzięki Knysha za pomoc, rozwiązałem to trosze inaczej, połączyłem to z mySQL i wywołuje sobie XML przez PHP i jest wszystko jak trzeba :] pozdrowienia

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Powiadomienie o plikach cookie

Wykorzystujemy cookies. Przeczytaj więcej Polityka prywatności

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.