XML Gallery

  • madquinn
  • Born
  • Born
  • madquinn
  • Posts: 2

Post 3+ Months Ago

Greetings!

I am making a Flash XML gallery that you can see here: goaretouch. com / gallery (all images are the same as it is only a proof-you have to remove the spaces, the forum will not let me bring-sites).

Using Actionscript 3 in Flash CS3.

The thumbnails load fine, and images ( "full_image") are also loaded fine. So far, so good.

The issue is that, when you hover the mouse over "full_image" I want to load third image, called "Before" (and return to the previous image when the mouse out of there).

The functions to load both "full_image" as "before" are the same:

ACTIONSCRIPT Code: [ Select ]
callBefore function (myNumber) (
 
myURL = myImages [myNumber]. attributes.before_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 ( "before /" + myURL, fullImage_mc);
 
)
 
To call "CallBefore" from "CallFullImage" had thought of:
 
 
for (target.onMouseOver) (
preloader.onLoadComplete = function (target) (
new Tween (target, "_alpha" Strong.easeOut, 0, 100, .5, true);
target.my_txt.removeTextField ();
target.onMouseOver = function () (
callBefore (this. _name);
);
 
)
  1. callBefore function (myNumber) (
  2.  
  3. myURL = myImages [myNumber]. attributes.before_url;
  4. myTitle = myImages [myNumber]. attributes. title;
  5. _root.createEmptyMovieClip (fullImage_mc "_root.getNextHighestDepth ());
  6. fullImage_mc._x = _root.full_x;
  7. fullImage_mc._y = _root.full_y;
  8.  
  9. var fullClipLoader = new MovieClipLoader ();
  10. var fullPreloader = new Object ();
  11. fullClipLoader.addListener (fullPreloader);
  12.  
  13. fullPreloader.onLoadStart = function (target) (
  14. target.createTextField ( "my_txt" fullImage_mc.getNextHighestDepth (), 0,0,200,20);
  15. target.my_txt. selectable = false;
  16. );
  17.  
  18. fullPreloader.onLoadProgress = function (target, loadedBytes, totalBytes) (
  19. target.my_txt.text = Math.floor ((loadedBytes / totalBytes) * 100);
  20. );
  21.  
  22. fullPreloader.onLoadComplete = function (target) (
  23. new Tween (target, "_alpha" Strong.easeOut, 0, 100, .5, true);
  24. target.my_txt.text = myTitle;
  25. );
  26.  
  27. fullClipLoader. loadClip ( "before /" + myURL, fullImage_mc);
  28.  
  29. )
  30.  
  31. To call "CallBefore" from "CallFullImage" had thought of:
  32.  
  33.  
  34. for (target.onMouseOver) (
  35. preloader.onLoadComplete = function (target) (
  36. new Tween (target, "_alpha" Strong.easeOut, 0, 100, .5, true);
  37. target.my_txt.removeTextField ();
  38. target.onMouseOver = function () (
  39. callBefore (this. _name);
  40. );
  41.  
  42. )


It does not work, what am I doing wrong?

Thank you very much for your help :)
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • madquinn
  • Born
  • Born
  • madquinn
  • Posts: 2

Post 3+ Months Ago

I see no one knows the answer xDDD
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Posts: 854

Post 3+ Months Ago

This all seems like stuff you can do 5x easier with jquery and simple css. Why use flash for such a simple transition/effect? Flash is so much heavier then javascript. jQuery could do this with hardly any scripting at all.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 47 guests
  • 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 post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.