La modification de ce Galerie + Thumbs. Who's Good??
- Playdo
- Born


- Inscription: Jan 18, 2010
- Messages: 2
- Status: Offline
Im not an actionscripter mais un artiste ayant une connaissance limitée actionscript. Depuis plus de deux semaines maintenant Ive a essayé d'obtenir un morceau de code ensemble, mais continuer à courir dans les murs de brique sans fin. J'aurais pensé que ce serait facile mais il n'y a pas que quelqu'un là-bas été capable de me montrer la solution finale à ce jour.
Im à la recherche d'un résultat similaire à ce http://www.republicofcode tutoriel. (mettre com ici) / tutorials / / flash xmlimagegallery / mais avec quelques changements spécifiques. Je n'ai pas transféré mes tentatives de code, car il n'aura sans doute compliquer les choses.
Les fichiers sources se trouvent au bas de ce lien: http://www.republicofcode. (mettez ici com) / tutorials/flash/xmlimagegallery/7.php
Ce que j'essaie d'atteindre est la galerie ci-dessus, mais qui précisément ne suivant lorsque la vignette est enfoncé:
- Afficher le préchargement (tout en conservant l'image courante à l'écran).
- Lorsque le préchargement est terminé alors fondu de l'image courante à l'alpha = 0
- Légère Pause
- Après la pause fade l'image suivante pour alpha = 100.
- En outre Ive a essayé d'obtenir l'alpha vignettes à 50%. Puis, le onRollOver et onRelease pour définir l'alpha à 100%. Semblable à ceci: http://www.republicofcode. (mettre com ici) / tutorials / / flash ImageGallery /
Si quelqu'un peut effectivement faire cela alors s'il vous plaît poste. Mais ne postez pas, sauf si vous avez testé et confirmé ce parce que je ne peux pas être exécuté avant et en arrière plus.
ps Ive hade com de mettre entre parenthèses pour me permettre de mettre une url
Im à la recherche d'un résultat similaire à ce http://www.republicofcode tutoriel. (mettre com ici) / tutorials / / flash xmlimagegallery / mais avec quelques changements spécifiques. Je n'ai pas transféré mes tentatives de code, car il n'aura sans doute compliquer les choses.
Les fichiers sources se trouvent au bas de ce lien: http://www.republicofcode. (mettez ici com) / tutorials/flash/xmlimagegallery/7.php
Ce que j'essaie d'atteindre est la galerie ci-dessus, mais qui précisément ne suivant lorsque la vignette est enfoncé:
- Afficher le préchargement (tout en conservant l'image courante à l'écran).
- Lorsque le préchargement est terminé alors fondu de l'image courante à l'alpha = 0
- Légère Pause
- Après la pause fade l'image suivante pour alpha = 100.
- En outre Ive a essayé d'obtenir l'alpha vignettes à 50%. Puis, le onRollOver et onRelease pour définir l'alpha à 100%. Semblable à ceci: http://www.republicofcode. (mettre com ici) / tutorials / / flash ImageGallery /
Si quelqu'un peut effectivement faire cela alors s'il vous plaît poste. Mais ne postez pas, sauf si vous avez testé et confirmé ce parce que je ne peux pas être exécuté avant et en arrière plus.
ps Ive hade com de mettre entre parenthèses pour me permettre de mettre une url
- Anonymous
- Bot


- Inscription: 25 Feb 2008
- Messages: ?
- Loc: Ozzuland
- Status: Online
Janvier 18th, 2010, 4:59 pm
- Playdo
- Born


- Inscription: Jan 18, 2010
- Messages: 2
- Status: Offline
Ci-dessous le code de didacticiels:
Code: [ Select ]
import mx.transitions.Tween;
import mx.transitions.easing.*;
var myGalleryXML = new XML();
myGalleryXML.ignoreWhite = true;
myGalleryXML.load("gallery.xml");
myGalleryXML.onLoad = function() {
_root.gallery_x = myGalleryXML.firstChild.attributes.gallery_x;
_root.gallery_y = myGalleryXML.firstChild.attributes.gallery_y;
_root.gallery_width = myGalleryXML.firstChild.attributes.gallery_width;
_root.gallery_height = myGalleryXML.firstChild.attributes.gallery_height;
_root.myImages = myGalleryXML.firstChild.childNodes;
_root.myImagesTotal = myImages.length;
_root.thumb_height = myGalleryXML.firstChild.attributes.thumb_height;
_root.thumb_width = myGalleryXML.firstChild.attributes.thumb_width;
_root.full_x = myGalleryXML.firstChild.attributes.full_x;
_root.full_y = myGalleryXML.firstChild.attributes.full_y;
callThumbs();
createMask();
scrolling();
};
function callThumbs() {
_root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());
container_mc._x = _root.gallery_x;
container_mc._y = _root.gallery_y;
var clipLoader = new MovieClipLoader();
var preloader = new Object();
clipLoader.addListener(preloader);
for (i=0; i<myImagesTotal; i++) {
thumbURL = myImages[i].attributes.thumb_url;
myThumb_mc = container_mc.createEmptyMovieClip(i, container_mc.getNextHighestDepth());
myThumb_mc._y = _root.thumb_height*i;
clipLoader.loadClip("thumbs/"+thumbURL,myThumb_mc);
preloader.onLoadStart = function(target) {
target.createTextField("my_txt",target.getNextHighestDepth(),0,0,100,20);
target.my_txt.selectable = false;
};
preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
};
preloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.removeTextField();
target.onRelease = function() {
callFullImage(this._name);
};
target.onRollOver = function() {
this._alpha = 50;
};
target.onRollOut = function() {
this._alpha = 100;
};
};
}
}
function callFullImage(myNumber) {
myURL = myImages[myNumber].attributes.full_url;
myTitle = myImages[myNumber].attributes.title;
_root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth());
fullImage_mc._x = _root.full_x;
fullImage_mc._y = _root.full_y;
var fullClipLoader = new MovieClipLoader();
var fullPreloader = new Object();
fullClipLoader.addListener(fullPreloader);
fullPreloader.onLoadStart = function(target) {
target.createTextField("my_txt",fullImage_mc.getNextHighestDepth(),0,0,200,20);
target.my_txt.selectable = false;
};
fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
};
fullPreloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.text = myTitle;
};
fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc);
}
function createMask() {
_root.createEmptyMovieClip("mask_mc",_root.getNextHighestDepth());
mask_mc._x = _root.gallery_x;
mask_mc._y = _root.gallery_y;
mask_mc.beginFill(0x000000,100);
mask_mc.lineTo(_root.gallery_width,0);
mask_mc.lineTo(_root.gallery_width,_root.gallery_height);
mask_mc.lineTo(0,_root.gallery_height);
mask_mc.lineTo(0,0);
container_mc.setMask(mask_mc);
}
function scrolling() {
_root.onEnterFrame = function() {
container_mc._y += Math.cos(((mask_mc._ymouse)/mask_mc._height)*Math.PI)*15;
if (container_mc._y>mask_mc._y) {
container_mc._y = mask_mc._y;
}
if (container_mc._y<(mask_mc._y-(container_mc._height-mask_mc._height))) {
container_mc._y = mask_mc._y-(container_mc._height-mask_mc._height);
}
};
}
import mx.transitions.easing.*;
var myGalleryXML = new XML();
myGalleryXML.ignoreWhite = true;
myGalleryXML.load("gallery.xml");
myGalleryXML.onLoad = function() {
_root.gallery_x = myGalleryXML.firstChild.attributes.gallery_x;
_root.gallery_y = myGalleryXML.firstChild.attributes.gallery_y;
_root.gallery_width = myGalleryXML.firstChild.attributes.gallery_width;
_root.gallery_height = myGalleryXML.firstChild.attributes.gallery_height;
_root.myImages = myGalleryXML.firstChild.childNodes;
_root.myImagesTotal = myImages.length;
_root.thumb_height = myGalleryXML.firstChild.attributes.thumb_height;
_root.thumb_width = myGalleryXML.firstChild.attributes.thumb_width;
_root.full_x = myGalleryXML.firstChild.attributes.full_x;
_root.full_y = myGalleryXML.firstChild.attributes.full_y;
callThumbs();
createMask();
scrolling();
};
function callThumbs() {
_root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());
container_mc._x = _root.gallery_x;
container_mc._y = _root.gallery_y;
var clipLoader = new MovieClipLoader();
var preloader = new Object();
clipLoader.addListener(preloader);
for (i=0; i<myImagesTotal; i++) {
thumbURL = myImages[i].attributes.thumb_url;
myThumb_mc = container_mc.createEmptyMovieClip(i, container_mc.getNextHighestDepth());
myThumb_mc._y = _root.thumb_height*i;
clipLoader.loadClip("thumbs/"+thumbURL,myThumb_mc);
preloader.onLoadStart = function(target) {
target.createTextField("my_txt",target.getNextHighestDepth(),0,0,100,20);
target.my_txt.selectable = false;
};
preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
};
preloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.removeTextField();
target.onRelease = function() {
callFullImage(this._name);
};
target.onRollOver = function() {
this._alpha = 50;
};
target.onRollOut = function() {
this._alpha = 100;
};
};
}
}
function callFullImage(myNumber) {
myURL = myImages[myNumber].attributes.full_url;
myTitle = myImages[myNumber].attributes.title;
_root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth());
fullImage_mc._x = _root.full_x;
fullImage_mc._y = _root.full_y;
var fullClipLoader = new MovieClipLoader();
var fullPreloader = new Object();
fullClipLoader.addListener(fullPreloader);
fullPreloader.onLoadStart = function(target) {
target.createTextField("my_txt",fullImage_mc.getNextHighestDepth(),0,0,200,20);
target.my_txt.selectable = false;
};
fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
};
fullPreloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.text = myTitle;
};
fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc);
}
function createMask() {
_root.createEmptyMovieClip("mask_mc",_root.getNextHighestDepth());
mask_mc._x = _root.gallery_x;
mask_mc._y = _root.gallery_y;
mask_mc.beginFill(0x000000,100);
mask_mc.lineTo(_root.gallery_width,0);
mask_mc.lineTo(_root.gallery_width,_root.gallery_height);
mask_mc.lineTo(0,_root.gallery_height);
mask_mc.lineTo(0,0);
container_mc.setMask(mask_mc);
}
function scrolling() {
_root.onEnterFrame = function() {
container_mc._y += Math.cos(((mask_mc._ymouse)/mask_mc._height)*Math.PI)*15;
if (container_mc._y>mask_mc._y) {
container_mc._y = mask_mc._y;
}
if (container_mc._y<(mask_mc._y-(container_mc._height-mask_mc._height))) {
container_mc._y = mask_mc._y-(container_mc._height-mask_mc._height);
}
};
}
- import mx.transitions.Tween;
- import mx.transitions.easing.*;
- var myGalleryXML = new XML();
- myGalleryXML.ignoreWhite = true;
- myGalleryXML.load("gallery.xml");
- myGalleryXML.onLoad = function() {
- _root.gallery_x = myGalleryXML.firstChild.attributes.gallery_x;
- _root.gallery_y = myGalleryXML.firstChild.attributes.gallery_y;
- _root.gallery_width = myGalleryXML.firstChild.attributes.gallery_width;
- _root.gallery_height = myGalleryXML.firstChild.attributes.gallery_height;
- _root.myImages = myGalleryXML.firstChild.childNodes;
- _root.myImagesTotal = myImages.length;
- _root.thumb_height = myGalleryXML.firstChild.attributes.thumb_height;
- _root.thumb_width = myGalleryXML.firstChild.attributes.thumb_width;
- _root.full_x = myGalleryXML.firstChild.attributes.full_x;
- _root.full_y = myGalleryXML.firstChild.attributes.full_y;
- callThumbs();
- createMask();
- scrolling();
- };
- function callThumbs() {
- _root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());
- container_mc._x = _root.gallery_x;
- container_mc._y = _root.gallery_y;
- var clipLoader = new MovieClipLoader();
- var preloader = new Object();
- clipLoader.addListener(preloader);
- for (i=0; i<myImagesTotal; i++) {
- thumbURL = myImages[i].attributes.thumb_url;
- myThumb_mc = container_mc.createEmptyMovieClip(i, container_mc.getNextHighestDepth());
- myThumb_mc._y = _root.thumb_height*i;
- clipLoader.loadClip("thumbs/"+thumbURL,myThumb_mc);
- preloader.onLoadStart = function(target) {
- target.createTextField("my_txt",target.getNextHighestDepth(),0,0,100,20);
- target.my_txt.selectable = false;
- };
- preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
- target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
- };
- preloader.onLoadComplete = function(target) {
- new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
- target.my_txt.removeTextField();
- target.onRelease = function() {
- callFullImage(this._name);
- };
- target.onRollOver = function() {
- this._alpha = 50;
- };
- target.onRollOut = function() {
- this._alpha = 100;
- };
- };
- }
- }
- function callFullImage(myNumber) {
- myURL = myImages[myNumber].attributes.full_url;
- myTitle = myImages[myNumber].attributes.title;
- _root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth());
- fullImage_mc._x = _root.full_x;
- fullImage_mc._y = _root.full_y;
- var fullClipLoader = new MovieClipLoader();
- var fullPreloader = new Object();
- fullClipLoader.addListener(fullPreloader);
- fullPreloader.onLoadStart = function(target) {
- target.createTextField("my_txt",fullImage_mc.getNextHighestDepth(),0,0,200,20);
- target.my_txt.selectable = false;
- };
- fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
- target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
- };
- fullPreloader.onLoadComplete = function(target) {
- new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
- target.my_txt.text = myTitle;
- };
- fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc);
- }
- function createMask() {
- _root.createEmptyMovieClip("mask_mc",_root.getNextHighestDepth());
- mask_mc._x = _root.gallery_x;
- mask_mc._y = _root.gallery_y;
- mask_mc.beginFill(0x000000,100);
- mask_mc.lineTo(_root.gallery_width,0);
- mask_mc.lineTo(_root.gallery_width,_root.gallery_height);
- mask_mc.lineTo(0,_root.gallery_height);
- mask_mc.lineTo(0,0);
- container_mc.setMask(mask_mc);
- }
- function scrolling() {
- _root.onEnterFrame = function() {
- container_mc._y += Math.cos(((mask_mc._ymouse)/mask_mc._height)*Math.PI)*15;
- if (container_mc._y>mask_mc._y) {
- container_mc._y = mask_mc._y;
- }
- if (container_mc._y<(mask_mc._y-(container_mc._height-mask_mc._height))) {
- container_mc._y = mask_mc._y-(container_mc._height-mask_mc._height);
- }
- };
- }
Page 1 sur 1
Pour répondre à ce sujet, vous devez vous connecter ou vous enregistrer. Il est gratuit.
Afficher de l'information
- Total des messages de ce sujet: 2 messages
- Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 39 invités
- Vous ne pouvez pas poster de nouveaux sujets
- Vous ne pouvez pas répondre aux sujets
- Vous ne pouvez pas éditer vos messages
- Vous ne pouvez pas supprimer vos messages
- Vous ne pouvez pas joindre des fichiers
