Dynamic Image Gallery Issue

Hello All!
I am creating a dynamic image gallery, but when my external
images load in the empty movie clip, all the images are loading in
the same size/dimension. Does anyone know how I can command the MC
to load the images in different sizes, another words - to load them
according to its own size?
here's the AS
onClipEvent (load)
function imageMove()
var _loc1 = this;
for (i = 1; i <= num_of_image; i++)
mc = _loc1["image" + i];
if (i < hit)
tempx = small * (i - 1) + 30;
temps = small - 5;
mc.useHandCursor = true;
else if (i > hit)
tempx = big + small * (i - 2) + 30;
temps = small - 5;
mc.useHandCursor = true;
else
tempx = small * (i - 1) + 150; //distance of how far out the
displayed image jumps.
temps = big - 5; //distance between the displayed image and
thumbnails.
mc.swapDepths(1000);
display = txt
mc.useHandCursor = false;
} // end else if
mc._x = mc._x + (tempx - mc._x) / 3; //number of pixals on
x-axis the displayed image moves over to right side before growing
big.
mc._width = mc._width + (temps - mc._width) / 3; //number of
pixals on x-axis the displayed image moves over to left side before
growing big.
mc._height = mc._width * 4 / 3;
if (Math.abs(mc._width - temps) <= 1)
title._x = hit < 5 ? (_loc1["image" + hit]._x + big / 2) :
(_loc1["image" + hit]._x - big / 2 - 100);
title._y = 100;
} // end if
} // end of for
} // End of the function
function loopHye()
if (hit != num_of_image)
++_global.hit;
else
_global.hit = 1;
} // end else if
} // End of the function
getURL("FSCommand:allowscale", false);
big = 300;
//Large image width (400 works best for my portfolio site)
small = 60;//Small image width (40 works well for my
portfolio site)
num_of_image = 8;//Total number of images
timeGap = none;//Speed (speed of gaptime when each image is
displayed automatically. "2000" is default of this original file.
larger the number the slower the image changes. (type in "none"
will stop automatic images from changing.
_global.hit = 0;//First displyed image number (type "0" to
stop images from growing out)
txt = [" ", "image1", "image2", "image3", "image4", "image5",
"image6", "image7", "image8"];//insert text of each images between
for (i = 1; i <= num_of_image; i++)
attachMovie("image", "image" + i, i);
loadMovie("image/" + i + ".jpg", this["image" +
i].tar);//image folder path
mc = this["image" + i];
mc._x = small * (i - 1) + 30;
mc._y = 200; //where on the axis should the displays be.
mc._width = small - 5;
mc._height = mc._width * 4 / 3;
this["image" + i].onRelease = function ()
clearInterval(interval);
_global.hit = this._name.substr(5);
interval = setInterval(loopHye, timeGap);
} // end of for
interval = setInterval(loopHye, timeGap);
onClipEvent (enterFrame)
imageMove();
check out the file
http://www.wendiland.com/Gallery122b.fla
this is what the current gallery looks like
http://www.wendiland.com/print2.html
I'd appreciated if someone replies with any sort of
suggestions! thanks in advance!!!
- W£NDI

if you google with "dynamic image gallery", you'll find a lot
of
tutorials & examples including pre-programmed solutions
if you prefer to do it yourself, you need to deal with
dynamic sites. DW
help chapters Preparing to Build Dynamic Sites, Making Pages
Dynamic &
Developing Applications Rapidly can also help to understand
in fact you don't need a database, the images can be read
from the
folder they're stored. that way to update a gallery you only
need to
remove/replace/add images. one folder for each gallery
and the application development forum is best suited for your
question
BTW, some nice photos in your page
hth,
jdoe
uvi wrote:
> I'm trying to create a dynamic image gallery that is
updated from a database, i
> managed to create a simple mysql database
> using phpmy admin, so I could update my image gallery
more often, I saw
> something that I like but I have no idea how to create
it here is the example:
>
http://flight001.com/store/trip.htm?itemid=307&sid=201&page=2
> I didnt manage to create this with dynamic table from
within dreamweaver 8,
> maybe I just don't know how,
> this is the link to a gallery on my website:
>
http://www.yuvallavy.com/work/scenic/scenic.htm.
I need all the help I can get
> I'm using dreamweaver 8 on a Mac and using PHP/MySql
server model.
>

Similar Messages

  • Dynamic image gallery

    Hi all, I am new to the forum and I have a specific question
    about a dynamic image gallery i am making.
    Everything goes well, until I want to click from a thuimbnail
    to see an enlarged image that is another file.
    here is the specific code for that:
    1) one problem is that -when I wlick one of the 5 jpegs
    attached- I always see the last one enlarged...
    2) another problem is to go back to the thumbs after clicking
    the enlarged image...
    PLease help me

    One issue it might be, is that in your for loop you have var
    i:Number=1; Set to 1 not 0. Then you referrence that number when
    declaring your small and large images by i.
    Remember actionscript always starts at zero not 1 when
    creating objects dynamically.

  • Dynamic Image Gallery AS2

    I have dipped in almost every search engine and this site to
    locate some easier way to create dynamic image gallery in Flash 8
    AS2 using ASP (as i am conversant with ASP only, although i found
    many sites suggesting PHP and XML). I'd be very greatful to u all
    if u could provide me some help in this part of my project.
    I have tried this source also but neither the source throw
    any error nor it displays the images, what could be wrong with the
    source? Please Please Please Please Please Help me!!!!!!!!
    this.createClassObject(mx.containers.ScrollPane,
    "scroller_sp", 10);
    scroller_sp. setSize (100, 300);
    swfThumbs=["imgs/img1.jpg","imgs/img2.jpg","imgs/img3.jpg"]
    this.createEmptyMovieClip("clipLoader",1);
    for(i=0;i< swfThumbs.length;i++){
    clipLoader.createEmptyMovieClip("clip"+i+"_mc",i)
    clipLoader.attachMovie("clip"+i+"_mc","clip"+i+"_mc",i+10);
    clipLoader.loadMovieNum(swfThumbs
    ,i+100);
    scroller_sp.contentPath = clipLoader;
    thanks in anticipation and regards
    raajaindra

    Hi,
    I have a picture show.
    It creates its own folder when you first upload images with
    the integrated Image uploader. Then it loads the images in with
    ASP.
    Have a look at
    http://netwings.info
    - click the B1 Image-show.
    When you are interested, the contact is at the site.
    Regards,
    Luciewong

  • Dynamic image gallery on detail page

    I have a master page listing 8 products. I have inserted a dynamic image gallery on the detail page which looks ok, but has one major flaw: when you click on a thumbnail the main image opens on the wrong page. e.g. if you click on page ../dragons.php?id=3 the main image opens on  ../dragons.php/id=1 and shows the following url: .../dragons.php?image=btf.jpg (or whatever the image file name).
    I have only just started using php and I would appreciate some guidance on how to resolve this problem.
    The relevant sections of the code are as follows?
    $vardragon_dragons_species = "1";
    if (isset($_GET['id'])) {
      $vardragon_dragons_species = $_GET['id'];
    mysql_select_db($database_cjwebsite, $cjwebsite);
    $query_dragons_species = sprintf("SELECT dragons.Order, dragons.family, dragons.Latin, dragons.English, dragons.Img1, dragons.Img2, dragons.Img3, dragons.img4, dragons.Img5, dragons.text, `dragons gallery`.filename, `dragons gallery`.caption, dragons.id, `dragons gallery`.image_id, dragons.id FROM dragons, `dragons gallery` WHERE dragons.id = `dragons gallery`.image_id AND dragons.id=%s", GetSQLValueString($vardragon_dragons_species, "int"));
    $dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
    $row_dragons_species = mysql_fetch_assoc($dragons_species);
    $totalRows_dragons_species = mysql_num_rows($dragons_species);
    if (isset($_GET['image'])) {
      $mainImage = $_GET['image'];
    else {
      $mainImage = $row_dragons_species['filename']; }
    <body>
      <div class="main_image"><img src="../images/dragons/<?php echo $mainImage; ?>" alt="<?php echo $row_dragons_species['caption']; ?>" />
      <div class="capt"><?php echo $row_dragons_species['caption']; ?></div>
    <ul class="gallery">
            <?php do {
          if ($row_dragons_species['filename'] == $mainImage) {
                     $row_dragons_species['caption'];
                   }?>
      <li><a href="<?php echo $_SERVER['PHP_SELF'];?>?image=<?php echo $row_dragons_species['filename']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['filename']; ?>" alt="<?php echo $row_dragons_species['caption']; ?>"  /></a></li>
      <?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?>
      </ul>
    Many thanks
    CJ 

    I'm still at an early stage in building this site and because it is allvery experimental I am and just using local testing.
    So to try to explain my objective. I have a master page with 8 products  there is a link to a detail page based on product id. So from the master page (dragons.php) you can select a product which will show the product information on a detail page (eg. dragons_species.php?id=1 or dragons_species.php?id=2 etc). This works ok.
    Each detail page has various pieces of information and 5 images. I wanted to show the images in an image gallery format and so used the code you provide in your book PHP Solutions (Creating a Dynamic Online Gallery pp.323-330). This works ok on the first page where id=1, but on subsequent pages (id=2, id=3 etc) I am loosing the id link infavour of an image based link.
    This is the complete script for my detail page (dragons_species.php)
    <?php require_once('../Connections/cjwebsite.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $vardragon_dragons_species = "1";
    if (isset($_GET['id'])) {
      $vardragon_dragons_species = $_GET['id'];
    mysql_select_db($database_cjwebsite, $cjwebsite);
    $query_dragons_species = sprintf("SELECT dragons.Order, dragons.family, dragons.Latin, dragons.English, dragons.Img1, dragons.Img2, dragons.Img3, dragons.img4, dragons.Img5, dragons.text, `dragons gallery`.filename, `dragons gallery`.caption, dragons.id, `dragons gallery`.image_id, dragons.id FROM dragons, `dragons gallery` WHERE dragons.id = `dragons gallery`.image_id AND dragons.id=%s", GetSQLValueString($vardragon_dragons_species, "int"));
    $dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
    $row_dragons_species = mysql_fetch_assoc($dragons_species);
    $totalRows_dragons_species = mysql_num_rows($dragons_species);
    if (isset($_GET['image'])) {
      $mainImage = $_GET['image'];
    else {
      $mainImage = $row_dragons_species['filename']; }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Odonata Species</title>
    <link href="../Css/dragons.css" rel="stylesheet" type="text/css" />
    <link href="../Css/menu.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="header">
      <?php include('../Includes/logo2.inc.php'); ?>
    </div>
    <div id="content"> <div id="title">
      <h1>Damselflies &amp; Dragonflies</h1>
    </div>
    <div class="family")><?php echo $row_dragons_species['Order']; ?></div>
    <div class="subfamily">
      <?php echo $row_dragons_species['family']; ?>
      <div class="main_image"><img src="../images/dragons/<?php echo $mainImage; ?>"   alt="<?php echo $row_dragons_species['caption']; ?>" />
       <div class="capt"><?php echo $row_dragons_species['caption']; ?></div></div></  
       <div class="description">
        <div class="text" id="name"><?php echo $row_dragons_species['Latin']; ?></div>
        <div  id="vernname"><?php echo $row_dragons_species['English']; ?></div>
      <?php echo $row_dragons_species['text']; ?></div>
    <ul class="gallery">
            <?php do {
                      if ($row_dragons_species['filename'] == $mainImage) {
                     $row_dragons_species['caption'];
                   }?>
    <li><a href="<?php echo $_SERVER['PHP_SELF'];?>?image=<?php echo $row_dragons_species['filename']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['filename']; ?>" alt="<?php echo $row_dragons_species['caption']; ?>"  /></a></li>
      <?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?>
      </ul>
      <div id="footer">
        <?php include('../includes/footer.inc.php'); ?>
    </div></div>
    </div>
    </body>
    </html>
    <?php
    mysql_free_result($dragons_species);
    ?>
    The code for my master page dragons.php is as follows
    <?php require_once('../Connections/cjwebsite.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_cjwebsite, $cjwebsite);
    $query_dragons_species = "SELECT id, Latin, English, Thumbs FROM dragons";
    $dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
    $row_dragons_species = mysql_fetch_assoc($dragons_species);
    $totalRows_dragons_species = mysql_num_rows($dragons_species);mysql_select_db($database_cjwebsite, $cjwebsite);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Odonata</title>
    <link href="../Css/menu.css" rel="stylesheet" type="text/css" />
    <link href="../Css/dragons.css" rel="stylesheet" type="text/css" />
    <body>
    <div id="header">
    <?php include('../Includes/logo2.inc.php'); ?></div>
    <div id="content"> <div id="title">
    <h1>Damselflies</a> & Dragonflies</h1>
    <div id="sidebar">
    <?php include('../Includes/menu2.inc.php'); ?>
    <div id="text">
    <h2>ODONATA</h2>
        </h2>
      <p>Ten species have been recorded on the islands, of which seven are common and widely distributed. The Golden-ringed Dragonfly and the Emerald Damselfly are both very scarce, whilst the record of the Azure-winged Dragonfly on Lewis is unconfirmed.   
           <?php do { ?>
        <div class="speciesbox"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['Thumbs']; ?>" /></a>
            <div class="latin"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><?php echo $row_dragons_species['Latin']; ?></a>
              <div class="english"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><?php echo $row_dragons_species['English']; ?></a> </div>
        </div></div>
      <?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?> </div>
    <div id="footer">
        <?php include('../includes/footer.inc.php'); ?>
    </div>
    </body>
    </html>
    <?php
    mysql_free_result($dragons_species);
    ?>
    Does this shed any light?
    Many thanks
    CJ.

  • Image gallery issue

    If a mod could delete my other post as I am quite far on from that and now having different issues.  Thanks.
    I am really stuck.  I will try my best to explain things clearly.  I am making an image gallery and I got the code from this gallery here.
    http://www.flashmo.com/preview/flashmo_122_3d_curve_gallery
    I made some changes to make it how I wanted it, nothing drastic though.  So now I have a nice gallery.
    Explaining what I am trying to do will better help explain things.  I am creating a modelling agency website.  The gallery I created above will display an individual image of every model in the agency (which it does).  Now when one of the model images is clicked, I then need it to load another image gallery which contains the complete set of images for that model, plus some of their information etc. 
    The way I am approaching it at the moment is to create an individual image gallery for every model in its own fla file.  If say the first model is clicked (image 1) it will load the corresponding swf (1.swf).  I am not sure how good it is loading an swf into what I already have, but couldnt think of another way.  So now I have a seperate image gallery just to test things out, and I need to load it into my original image gallery.
    So, I will show the code for the first gallery (which displays the individual images of each model).  The important methods are p_click (which hides the first gallery and loads the external swf), and on_pic_loaded (which displays the external swf). 
    I hope you understand what I am attempting, as I dont know if I have explained it right as my brain is going dead! (although I am liking the challenge).
    import org.papervision3d.scenes.*;
    import org.papervision3d.cameras.*;
    import org.papervision3d.objects.*;
    import org.papervision3d.materials.*;
    import caurina.transitions.*;
    import flash.net.URLRequest;
    import flash.display.Loader;
    import flash.events.Event;
    import flash.events.ProgressEvent;
    var container_x:Number = stage.stageWidth * 0.5;
    var container_y:Number = stage.stageHeight * 0.5 + 160;
    var container:Sprite = new Sprite();
    container.x = container_x;
    container.y = container_y;
    addChild(container);
    var scene:Scene3D = new MovieScene3D(container);
    var cam:Camera3D = new Camera3D();
    cam.zoom = 6;
    tn_url_target.visible = false;
    tn_title.text = "";
    tn_desc.text = "";
    tn_url.text = "";
    loading_info.text = "";
    url_button.visible = false;
    var no_of_ring:Number = 1;
    var angle:Number = 0;
    var p_dict:Dictionary = new Dictionary();
    var pa:Array = new Array();
    var filename_list = new Array();
    var url_list = new Array();
    var url_target_list:Array = new Array();
    var title_list = new Array();
    var description_list = new Array();
    var folder:String = "photos/thumbs/";
    var i:Number;
    var total:Number;
    var flashmo_xml:XML = new XML();
    var pic_loader:Loader = new Loader();
    var mLoader:Loader = new Loader();
    var xml_loader:URLLoader = new URLLoader();
    xml_loader.load(new URLRequest("thumbnail_list_5.xml"));
    xml_loader.addEventListener(Event.COMPLETE, create_thumbnail);
    function create_thumbnail(e:Event):void
        flashmo_xml = XML(e.target.data);
        total = flashmo_xml.thumbnail.length();
        var angle_per:Number = Math.PI * 2 * no_of_ring / total;
        for( i = 0; i < total; i++ )
            filename_list.push( flashmo_xml.thumbnail[i][email protected]() );
            url_list.push( flashmo_xml.thumbnail[i][email protected]() );
            url_target_list.push( flashmo_xml.thumbnail[i][email protected]() );
            title_list.push( flashmo_xml.thumbnail[i][email protected]() );
            description_list.push( flashmo_xml.thumbnail[i][email protected]() );
            var bfm:BitmapFileMaterial = new BitmapFileMaterial(
                folder + flashmo_xml.thumbnail[i][email protected]());
            bfm.oneSide = false;
            bfm.smooth = true;
            var p:Plane = new Plane(bfm, 100, 100, 2, 2);
            scene.addChild(p);
            var p_container:Sprite = p.container;
            p_container.name = "flashmo_" + i;
            p_dict[p_container] = p;
            p_container.buttonMode = true;
            p_container.addEventListener( MouseEvent.ROLL_OVER, p_rollover );
            p_container.addEventListener( MouseEvent.ROLL_OUT, p_rollout );
            p_container.addEventListener( MouseEvent.CLICK, p_click );
            p.rotationY = - (i * angle_per) * (180/Math.PI) + 90;
            p.x = Math.cos(i * angle_per) * 300;
            p.z = Math.sin(i * angle_per) * 300;
            p.y = Math.floor( i / 22 ) * 5;
    function startLoad()
        var mLoader:Loader = new Loader();
        var mRequest:URLRequest = new URLRequest("/subgallery/1.swf");
        mLoader.load(mRequest);
    function p_rollover(me:MouseEvent)
        var sp:Sprite = me.target as Sprite;
        Tweener.addTween( sp, {alpha: 0.5, time: 0.5, transition:"easeOutExpo"} );
    function p_rollout(me:MouseEvent)
        var sp:Sprite = me.target as Sprite;
        Tweener.addTween( sp, {alpha: 1, time: 0.4, transition:"easeInExpo"} );
    function p_click(me:MouseEvent)
        var sp:Sprite = me.target as Sprite;
        var s_no:Number = parseInt(sp.name.slice(8,10));
        var mRequest:URLRequest = new URLRequest("subgallery/1.swf");
        mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, on_pic_loaded);
        mLoader.load(mRequest);
        Tweener.addTween( container, { y: 1200, time: 0.6, transition:"easeInExpo" } );
    function goto_URL(me:MouseEvent)
        navigateToURL(new URLRequest(tn_url.text), tn_url_target.text);
    function on_open(e:Event):void
        loading_info.text = "Loading... 0%";
    function on_progress(e:ProgressEvent):void
        var percent:Number = Math.round(e.bytesLoaded / e.bytesTotal * 100);
        loading_info.text = "Loading... " + percent + "%";
    function on_pic_loaded(e:Event):void
        addChild(e.currentTarget.content);
        //addChildAt(mLoader, 1);
        mLoader.x = Math.round(stage.stageWidth - mLoader.width) * 0.5;
        mLoader.y = Math.round(stage.stageHeight - mLoader.height) * 0.5;
        //mLoader.addEventListener(MouseEvent.CLICK, remove_pic);
        Tweener.addTween( mLoader, { alpha: 1, time: 0.8, transition:"easeInExpo" } );
        removeEventListener(Event.ENTER_FRAME, render);
    function remove_pic(e:Event):void
        Tweener.addTween( pic_loader, { alpha: 0, time: 1, onComplete:function() { removeChild(this); } } );
        Tweener.addTween( container, { y: container_y, time: 1, delay: 1, transition:"easeOutExpo"} );
        addEventListener(Event.ENTER_FRAME, render);
        tn_title.text = "";
        tn_desc.text = "";
        tn_url.text = "";
        url_button.visible = false;
    addEventListener(Event.ENTER_FRAME, render);
    function render(e:Event):void
        var distance_x:Number = (stage.mouseX - 400) * 0.0001;
        angle += distance_x;
        cam.x = - Math.cos(angle) * 150;
        cam.z = Math.sin(angle) * 150;
        scene.renderCamera(cam);
    Current issues as the moment is firstly, I dont know if this is the best way to achieve what I want.  Maybe there is a better option someone could tell me about, but you have to remember that each image displayed here will have multiple images to go with it.
    In terms of what I am attempting above, I currently get
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///C|/Users/Nick/Desktop/gallery/gallery.xml
        at _1_fla::MainTimeline/frame1()
    I assume its a url error so I changed all urls in both fla's to contain the whole url path.  Didnt seem to work though unless I missed something.
    Any advise on absolutely anything will be so appreciated.
    Many thanks
    Nick

    Sorry about that.  If you can check my history, I normally always thank people who have helped, and I was intending to go back on the last few to sort them out.  Just got my first job so it has been rather hectic and been stressing out to much.  Also, I do things slightly different to other people.  If I receive a correct answer (which I normally do thank), I tend not to actually reply but to thank instead, mainly because if I reply I am pushing unanswered questions further down the list and eventually out of view.  I will go back and sort out the thanks I owe.
    In terms of asking the mods, other forums I visit are normally moderated by the community, so I assumed that someone like yourself might be the moderator.
    I tottally understand what you are saying, and as I say, I am normally on top of this.  Will go back now and sort out the thanks.
    Sorry for the delay.
    Nick

  • Image Gallery Issue in As3

    Hi,
         I am trying to implement a simple image gallery with alpha transition using as3.  But an issue is occuring with this. After each image alpha transition, the stage becomes blank. The code i have used for image Gallery is following.CAn anybody help me. I am trying this for a week. but still i have a hope for make this working. So please help me.
    import flash.display.Loader;
    import flash.display.*;
    import gs.TweenLite;
    const TIMER_DELAY = 2000;
    var totImages:Number;
    var index:Number = 0;
    var imgArr:Array = new Array();
    var currentContainer:MovieClip = holder0;
    currentContainer.alpha = 0;
    var transTimer:Timer = new Timer(TIMER_DELAY);
    //transTimer.addEventListener(TimerEvent.TIMER, startTransition);
    var imgLoader:Loader = new Loader();
    var myXML:XML = new XML();
    var XML_URL:String = "images.xml";
    var myXMLURL:URLRequest = new URLRequest(XML_URL);
    var myLoader:URLLoader = new URLLoader(myXMLURL);
    myLoader.addEventListener("complete", xmlLoaded);
    function xmlLoaded(event:Event):void{
        myXML = XML(myLoader.data);
        processXML(myXML);
    function processXML(xml){   
        totImages = xml.children().length();
        for(var i=0;i<totImages;i++){
            var tempVar = xml..item[i]..image;
            imgArr.push(tempVar);
        //transTimer.start();
        currentContainer = holder0;
        loadImage();
    function loadImage(){
        var url = imgArr[index];
        //ImgLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressStatus);
        imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeInImg);   
        var fileRequest:URLRequest = new URLRequest(url);
        imgLoader.load(fileRequest);
        currentContainer.addChild(imgLoader);
    function fadeInImg(e:Event){
        TweenLite.to(currentContainer,3,{alpha:1,delay:2,onComplete:switchClip});
    function switchClip(){
        if(index < totImages){
            index++;
        } else {
            index = 0;
        if(currentContainer == holder0){
            currentContainer = holder1;
        } else {
            currentContainer = holder0;
        currentContainer.alpha = 0;
        MovieClip(this.root).swapChildren(holder0, holder1);   
        loadImage();
    Thanks and Regards,
                         Sreelash

    Hi Adrei, I have implemented the thumbnail button also. Its working but the problem is that thumbnail buttons and controls are placing behind the image container. How can i place the thumbnail buttons and control buttons over the image. You can view the result in the following url:
    http://www.creative-showcase.co.uk/BirdStudiosOld/Videos/test/scrllGallAnd.html
    The working swf is with the following url:
    http://www.creative-showcase.co.uk/BirdStudiosOld/Videos/test/scrllGall.html
    The code that i used for creating thumbnail is following
    import flash.display.DisplayObject;
    import flash.display.*;
    import flash.display.Loader;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.events.TimerEvent;
    import flash.text.*;
    import flash.net.*;
    import flash.utils.Timer;
    import gs.TweenLite;
    import gs.easing.*;
    var xmlURL:String = "http://www.creative-showcase.co.uk/BirdStudiosOld/Videos/test1/images.xml";
    var loadedImages:Array = [];
    var imageURLs:Array = [];
    var thumbArr:Array = [];
    var imageLoader:Loader;
    var prevImage:DisplayObject;
    var currentImage:DisplayObject;
    var thumbContainer:MovieClip;
    var currThumb:MovieClip;
    var prevThumb:MovieClip = null;
    var showTimer:Timer;
    var timerDuration:int = 5000;
    var tweenDuration:int = 2;
    var currentIndex:int = 0;
    var activIndx:Number = 0;
    var slidesHolder:Sprite;
    var prvFlag:Boolean = false;
    var nxtFlag:Boolean = false;
    var twnFlag:Boolean = false;
    var rt_lt_Flag:Boolean = true;
    var myXMLURL:URLRequest = new URLRequest(xmlURL);
    var xmlLoader:URLLoader = new URLLoader(myXMLURL);
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    xmlLoader.load(myXMLURL);
    var a:int = 90;
    ctrlBox.btnPlay.buttonMode = true;
    ctrlBox.nextImg.buttonMode = true;
    ctrlBox.prevBtn.buttonMode = true;
    ctrlBox.btnPause.buttonMode = true;
    ctrlBox.btnPlay.visible = false;
    ctrlBox.btnPause.addEventListener(MouseEvent.CLICK,stopScroll);
    ctrlBox.btnPlay.addEventListener(MouseEvent.CLICK,startScroll);
    ctrlBox.nextImg.addEventListener(MouseEvent.CLICK,shwNext);
    ctrlBox.prevBtn.addEventListener(MouseEvent.CLICK,shwPrev);
    function xmlLoaded(e:Event):void {
         var a:int = 45;
         e.target.removeEventListener(Event.COMPLETE, xmlLoaded);
         processXML(XML(e.target.data));
    function processXML(xml:XML):void {
         var len:int = xml.children().length();
         var tempVar:String;
         for (var i:int = 0; i < len; i++) {
              tempVar = "http://www.creative-showcase.co.uk/BirdStudiosOld/Videos/test1/" + xml..item[i]..image;
              //trace(tempVar)
              imageURLs.push(tempVar);
         preload();
         createThumbs();
    function createThumbs():void{
        thumbContainer = new MovieClip();
        addChild(thumbContainer);
        for(var i:int=0;i<9;i++){
            var thmbHolder:MovieClip = new MovieClip();
            thumbContainer.addChild(thmbHolder);
            //MovieClip(this.root).swapChildren(currentImage, ctrlBox);
            thmbHolder.buttonMode = true;       
            var thmb:thumbClass = new thumbClass();           
            thmbHolder.addChild(thmb);
            thumbArr.push(thmbHolder);
            thmbHolder.name = i.toString();       
            thmb.imgNum.text = (i+1).toString();       
            thmbHolder.addEventListener(MouseEvent.CLICK,showImage)
            //trace(thmb.imgNum.text)
            thmbHolder.x = i*(thmbHolder.width+5)+5;
        thumbContainer.y = stage.stageHeight - thumbContainer.height;
    function showImage(e:MouseEvent):void{   
        var imgIndx:Number = e.target.parent.parent.name;
        prevThumb = currThumb;
        currThumb = e.target.parent.parent;
        currThumb.buttonMode = false;
        if(activIndx != imgIndx){
            prevThumb.buttonMode = true;
            currentIndex = imgIndx-1;
            shwNext(null);   
            activIndx = imgIndx;
        } else {
            stopScroll(null);
    function preload():void{
         var len:int = imageURLs.length;
         for (var i:int = 0; i < len; i++) {
              imageLoader = new Loader();
              imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onPreloadComplete);
              loadedImages.push(imageLoader);
              imageLoader.load(new URLRequest(imageURLs[i]));
    function onPreloadComplete(e:Event):void {
         e.target.removeEventListener(Event.COMPLETE, onPreloadComplete);
         if (!showTimer && loadedImages[0].content &&   loadedImages[1].content ) startShow();
    function startShow():void{
         currentImage = loadedImages[0];
         currentImage.alpha = 0;
         slidesHolder = new Sprite();
         var slideMask:Sprite = new Sprite();
         var gr:Graphics = slideMask.graphics;
         gr.beginFill(0xff0000);
         gr.drawRect(0, 0, currentImage.width, currentImage.height);
         gr.endFill();
         addChild(slidesHolder);
         addChild(slideMask);
         slidesHolder.x = slideMask.x = 0;
         slidesHolder.y = slideMask.y = 0;
         slidesHolder.mask = slideMask;
         slidesHolder.addChild(currentImage);
         TweenLite.to(currentImage, 10, { alpha: 1 } );
         showTimer = new Timer(timerDuration);
         showTimer.addEventListener(TimerEvent.TIMER, slideTransition);
         showTimer.start();
    function slideTransition(e:TimerEvent):void{
         var nextImage:int;
         if(rt_lt_Flag == true){
             if(nxtFlag == true){
                 showTimer.stop();
                 nxtFlag = false;
             nextImage = currentIndex < loadedImages.length - 1 ? currentIndex + 1 : 0;
             if (loadedImages[nextImage].content) {
                  currentIndex = nextImage;
                  loadedImages[currentIndex].x = slidesHolder.width;
                  slidesHolder.addChildAt(loadedImages[currentIndex], slidesHolder.getChildIndex(currentImage));
                  prevImage = currentImage;
                  currentImage = loadedImages[currentIndex];
                  showCurrent();
         } else {
             if(prvFlag == true){
                 showTimer.stop();
                 prvFlag = false;
             nextImage = currentIndex > 0 ? currentIndex - 1 : loadedImages.length - 1;
             if (loadedImages[nextImage].content) {
                 currentIndex = nextImage;
                 loadedImages[currentIndex].x = -(stage.stageWidth);
                 slidesHolder.addChildAt(loadedImages[currentIndex], slidesHolder.getChildIndex(currentImage));
                 prevImage = currentImage;
                 currentImage = loadedImages[currentIndex];
                 showCurrent();
         activIndx = currentIndex;
         //trace(currentIndex)
    function showCurrent():void{
         // make sure they have proper alphas
         //prevImage.alpha = 1;
         //currentImage.alpha = 0;
         //TweenLite.to(prevImage, tweenDuration, { x: -slidesHolder.width } );
         twnFlag = true;
         if(rt_lt_Flag == true){
             TweenLite.to(currentImage, tweenDuration, { x: 0, onUpdate:onTweenProgress, onComplete: removePrevious } );
         } else {
             TweenLite.to(currentImage, tweenDuration, { x: 0, onUpdate:onTweenProgress, onComplete: removePrevious } );
    function onTweenProgress():void{       
        if(rt_lt_Flag == true){
             prevImage.x = currentImage.x - prevImage.width;   
        } else {
            prevImage.x = currentImage.x + prevImage.width;
    function removePrevious():void {
         if (slidesHolder.contains(prevImage)) slidesHolder.removeChild(prevImage);
         twnFlag = false;
    function stopScroll(e:MouseEvent):void{
        ctrlBox.btnPlay.visible = true;
        ctrlBox.btnPause.visible = false;
        showTimer.stop();
    function startScroll(e:MouseEvent):void{
        rt_lt_Flag = true;
        ctrlBox.btnPlay.visible = false;
        ctrlBox.btnPause.visible = true;
        resetListener(timerDuration=5000,tweenDuration=2)
    function shwNext(e:MouseEvent):void{
        if(twnFlag == false){
            rt_lt_Flag = true;
            stopScroll(null);
            nxtFlag = true;
            resetListener(timerDuration=0,tweenDuration=1)
    function shwPrev(e:MouseEvent):void{
        if(twnFlag == false){
            rt_lt_Flag = false;
            stopScroll(null);
            prvFlag = true;
            resetListener(timerDuration=0,tweenDuration=1)
    function resetListener(timerDuration,tweenDuration){
            showTimer.removeEventListener(TimerEvent.TIMER, slideTransition);
            showTimer = new Timer(timerDuration);
            showTimer.addEventListener(TimerEvent.TIMER, slideTransition);   
            showTimer.start();
    Can you help me on how can i swap the depth of images and control buttons.
    Thanks and regards,
    Sreelash

  • Dynamic Image Gallery First, Next,Previous,Last

    had a friend help me build this but now he's gone and I don't
    understand arrays or coldfusion really. I have an image gallery
    that works beautifully except that I want to be able to add two
    behaviors to the page. 1.Pagination. 2. Display Record Count. (I
    know how to use the Dreamweaver built in Server Behaviors with
    Dynamic Tables but this is a little different from that b/c he's
    using arrays to build the table instead. I've almost go the
    pagination working. Except I can't figure how to show the last
    record. I've got "First, Next, & Previous" to work. But the
    "Last" doesn't. This is the part of the code that I'm concerned
    with as everything else is working.
    <cfset CountUp=Count + 10>
    <cfset CountDown=Count - 10>
    <p align="center"><cfif Count gte 1><a
    href="gallery.cfm">First</a></cfif>  <cfif
    Count gte 10><a
    href="gallery.cfm?Count=<cfoutput>#CountDown#</cfoutput>">Previous</a></cfif>  <cfif
    ArrayLen(PhotoArray) gt CountUp><a
    href="gallery.cfm?Count=<cfoutput>#CountUp#</cfoutput>">Next</a></cfif><cfif
    ArrayLen(PhotoArray) lt CountUp><a
    href="gallery.cfm?Count=<cfoutput>#CountUp#</cfoutput>">Last</a></cfif>
    I have no idea how to write the "Display record counts" so if
    someone can help me write that part I would be so greatful.
    Here is all of the code for this page attatched...
    Attach Code

    Your code is more complicated than it needs to be. I honestly
    didn't dig through it, but here are a few suggestions.
    Use ArrayLen(array[]) to count the number of rows in an aray.
    Use array[ArrayLen(array)] to find the last record

  • Image Gallery issues with Lightbox2 - please help!

    Hello there,
    I am using Lightbox2 image gallery.  The loading.gif and close.gif aren't showing up and I think there's an issue with the path in the lightbox.js file.  The loading and close gifs are located in the Images gallery so I changed the path in the lightbox.js file accordingly - I've gone through this many many times but they are still not showing up.
    Can anyone please help me?
    My website is: www.labellepetraie.com
    Here's where I downloaded the script from: http://www.huddletogether.com/projects/lightbox2/#how
    I have tried all the path combinations mentioned in their forum but to no avail.  What am I doing wrong?
    Thank you for any help you can offer to me.
    Regards!

    Interesting.  I've just looked at your scripts, and it would appear that you have blended two versions of lightbox2 on your page,.  Is that possible?  The lightbox.js file has no function called initLightbox() in it, whereas older versions do.  So, try changing this:
    window.onload = function(){ // use this instead of <body onload …>
         MM_preloadImages('../3websites/home4.jpg','../3web sites/amenities1.jpg','../3websites/inquiry1.jpg','../3websites/rates1.jpg','../ 3websites/photos1.jpg');
            initLightbox();
    to this:
    window.onload = function(){ // use this instead of <body onload …>
         MM_preloadImages('../3websites/home4.jpg','../3web sites/amenities1.jpg','../3websites/inquiry1.jpg','../3websites/rates1.jpg','../ 3websites/photos1.jpg');
            //initLightbox();
    to see if that works.  I think so.  Turns out the initLightbox() function call that we activated by fixing the code before is no longer needed by the lightbox2 script as of v2.04!  I see that it still tells you to put that function call in the body tag, but i think that is wrong (which is very weird to say, can I really be right???).  If you look at the example page online you'll see that he uses this body tag:
    <body>
    and there are no onload's anywhere. 
    Let me know.
    E. Michael Brandt
    www.divahtml.com
    www.divahtml.com/products/scripts_dreamweaver_extensions.php
    Standards-compliant scripts and Dreamweaver Extensions
    www.valleywebdesigns.com/vwd_Vdw.asp
    JustSo PictureWindow
    JustSo PhotoAlbum, et alia

  • Pulling dynamic images/JS issue

    Hi All,
    I have a problem I was hoping I could get some help with. I
    am using Zoomify (www.zoomify.com) to zoom in on products. The
    products are loaded up dynamically based on a sting that is passed
    after the URL. Example:
    http://www.grjd.com/zoom/dynamic.html?zoomifyImagePath=back/&zoomifyZoom=25&zoomifyMinZoom =25
    Problem is I am unable to get rid of IE’s ‘click
    to activate this control’ annoyance. Typically I use the
    general JS’s out there to remedy the issue, however the
    javascript that is currently available doesn’t jive with the
    javascript in the HTML (see below) that declares the variables that
    in turn pull in the dynamic images.
    Does anyone have a remedy for this? Any help would VERY MUCH
    be appreciated.
    Thanks,
    Greg.
    HTML Code:
    <script language="javascript">
    var urlString = document.location.href;
    var paramIndex = urlString.indexOf("?")+1;
    var paramString =
    urlString.substring(paramIndex,urlString.length);
    document.write("<OBJECT
    CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
    document.write("CODEBASE='
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'");
    document.write("WIDTH='503'");
    document.write("HEIGHT='385'");
    document.write("ID='theMovie'>");
    document.write("<PARAM NAME='src'
    VALUE='zoomifyDynamicViewer.swf'>");
    document.write("<PARAM NAME='FlashVars' VALUE='" +
    paramString + "' >");
    document.write("<EMBED SRC='zoomifyDynamicViewer.swf'");
    document.write("FlashVars='" + paramString + "'");
    document.write("PLUGINSPAGE='
    http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'");
    document.write("WIDTH='503'");
    document.write("HEIGHT='385'");
    document.write("NAME='theMovie'>");
    document.write("</EMBED>");
    document.write("</OBJECT>");
    </script>

    Have you tried SWFObject?
    http://www.explorinlauren.com/repository/flash/fixing-the-flash-embed-issue-for-internet-e xplorer.html

  • Adding "loading" movieclip to dynamic image gallery?

    Hello again,
    I've completed my XML-driven image gallery, however upon live testing I'd realized I made a rookie mistake and not put some kind of placeholder "loading" movie clip loop while the thumbnails—and subsequent full-size images—are being loaded. The images will randomly appear when loaded and I would like to be able to insert a placeholder movie clip while they load, and swap them up with the thumbnails/images after it has been loaded. The placeholder movie clip is in my library (loadingLoop), but I'm having problems getting it to work correctly.
    Below is the original function that processes the XML and adds the thumbnail images; this is where I'm trying to insert the placeholder movie clip per XML child node (every attempt I've made just keeps throwing more errors, so I've omitted my attempts to avoid confusion), and I've attached the XML file for testing. And insight or help would be appreciated.
    //Locate the external XML file and trigger xmlLoaded when complete
    xmlLoader.load(new URLRequest("data/artGallery.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    //Load the XML and process the image locations
    function xmlLoaded(event:Event):void {
        xml = XML(event.target.data);
        //parse the nodes in the XML file
        xmlList = xml.children();
        //count the number of nodes in the XML file via XMLList
        trace(xmlList.length());
        //loop to load all of the thumbnails, based on the number of nodes in XMLList
        //"i" = every child node in the XML file
        for (var i:int = 0; i < xmlList.length(); i++) {
            //Add loadingLoop movie clip per node and wait for thumnail to load before swapping out with imageLoader thumbnail images <-- help!!
            //for every node, create a new instance to be put on stage
            imageLoader = new Loader();
            //load each thumbnail from its location per XML node's "thumb" attribute
            imageLoader.load(new URLRequest(xmlList[i].attribute("thumb")));
            //position of thumbnail instances per XML node (horizontally across stage)
            imageLoader.x = i * 110 + 10;//thumbs are 100 x 100 so, +10 to the width, plus +10 from left edge
            //imageLoader.y = 10;
            //for each node in XML list, name the instance with the path to the location of the full size image
            imageLoader.name = xmlList[i].attribute("source");
            //for each node in the XML list, add a drop shadow
            imageLoader.filters = [thumbDShadow];
            //add thumbnails to stage
            addChild(imageLoader);
            dropTween = new Tween(imageLoader, "y", Bounce.easeOut, -100, 10, 1, true);
            //set up thumbnails to wait for a click to execute showPicture
            imageLoader.addEventListener(MouseEvent.CLICK, showPicture);
            //set up thumbnails to scale when rolled over
            imageLoader.addEventListener(MouseEvent.ROLL_OVER, sizeUP);

    Somehow I had a feeling this wouldn't be a copy-and-paste job for the full-size images. Sorry to be a bother. This is the showPicture function that is fired off when the thumbnail image is clicked (from our previous example). Two errors are thrown:
    When the thumnail is clicked:
    "Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/removeChild()
        at MethodInfo-51()"
    But the full-size image loads nonetheless. The second loading loop (loadingLoop2) is not removed. Below is the showPicture function:
    //Load the full-size images and place onto the stage
    function showPicture(event:MouseEvent):void {
        //add new movie clip container
        var mc2:MovieClip = new MovieClip();
        addChild(mc2);
        //clear the fullLoader—this is to help clear any full-size images that may already be on the stage (they have two options, click a new thumbnail, or close the current full-size image
        fullLoader.unload();
        //re-create the fullLoader, if there was one cleared
        fullLoader = new Loader();
        //load each full size image from its location per XML node's "source" deliniated by mc.ldr's "source" attribute
        fullLoader.load(new URLRequest(event.target.name));
        //add the loder to the container
        mc2.addChild(fullLoader);
        //create new instance of second loading loop
        mc2.fsloop = new loadingLoop2();
        //add the second loading loop to the container
        mc2.addChild(mc2.fsloop);
        //for each container, add a drop shadow
        mc2.filters = [fullDShadow];
        //set the container's position center on stage, making it the size of the loading loop until the full-size images are loaded
        mc2.x = (stage.stageWidth - mc2.fsloop.width) * 0.5;
        mc2.y = (stage.stageHeight - mc2.fsloop.height) * 0.5;
        //place container on stage
        addChild(mc2);
        //fade in each container
        fadeTween = new Tween(mc2, "alpha", None.easeNone, 0, 1, 0.5, true);
        //check to see if the image has been loaded completely—this is to make sure the image's attributes can be used to re-center on stage and remove fsloop
        fullLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, removeLoop2);
        //set field to multiline so that the <br> HTML tags can be used
        imageTextField.multiline = true;
        //add text frame for description
        imageTextField.x = 10;
        imageTextField.y = 125;
        //for each full-size image, load the description text from the XML child nodes
        for (var j:int = 0; j < xmlList.length(); j++) {
            //check to make sure that the correct full-size image matches the text node when clicked
            if (xmlList[j].attribute("source") == event.target.name) {
                //add each child node as a separate line in the same text field; added HTML tags for CSS application
                imageTextField.htmlText = "<p><span class = 'projectName'>" + xmlList[j].child("projectName") + "</span><br>"
                + "<span class = 'toolsUsed'>" + xmlList[j].child("toolsUsed") + "</span><br><br>"
                + xmlList[j].child("projText") + "<br>"
                + "<span class = 'liveURL'>" + xmlList[j].child("liveURL") + "</span></p>";
        function removeLoop2(event:Event):void {
            //re-position the container to center on stage to accomodating the full sized image
            mc2.x = (stage.stageWidth - fullLoader.width) * 0.5;
            mc2.y = (stage.stageHeight - fullLoader.height) * 0.5;
            //Add the text field
            addText();
            //hide instructional text, already on stage
            galleryInfo_mc.alpha = 0;
            //remove the full-sized loading loop
            event.target.loader.parent.removeChild(MovieClip(event.target.loader.parent).loadingLoop2 );
        //set up full-size images to "self close" by clicking on it
        mc2.addEventListener(MouseEvent.CLICK, clearStage);
    The second error gets thrown when the container is clicked and the function clearStage is executed, which does not remove the container:
    "TypeError: Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/removeChild()
        at artGallery_v1_5_fla::MainTimeline/clearStage()"
    This is the clearStage function:
    //Allow full-size image to "self close" by clikcing on it and removing the text description
    function clearStage(event:MouseEvent):void {
        //clear the fullLoader
        fullLoader.unload();
        //remove the container
        event.target.parent.removeChild(MovieClip(event.target.parent).mc2);
       //remove the text field
        removeChild(imageTextField);
        //show the instructional text that is on-stage
        galleryInfo_mc.alpha = 1;
    Help!

  • Image gallery issues...

    This image gallery uses the HTTPService control to populate an array which is then used to populate thumbnails and a full image however it does not display properly on the first load. Thumbnails do show up upon a refresh but are not very consistant. I could really use some suggestions on how to make this gallery more stable and support all browsers.
    Here is the link to the site
    http://www.michael-willett.com/test/newwork.html
    and the source
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
            layout="vertical"
            verticalAlign="top"
            backgroundColor="black" viewSourceURL="srcview/index.html"
            preinitialize="preInit()"
            backgroundAlpha="0"
            color="white" >
        <mx:Script>
            <![CDATA[
                import mx.collections.XMLListCollection;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.controls.Alert;
                [Bindable]private var xmlListCol:XMLListCollection = new XMLListCollection;
                [Bindable]private var imageArray:Array = new Array;
                private function preInit():void {
                xmlService.send();       
                private function xmlHandler(event:ResultEvent):void {
                    var xmlList:XMLList = event.result.image;
                    xmlListCol.source = xmlList;
                    for each (var image:XML in xmlListCol){
                        var myOBJ:Object = new Object;
                        myOBJ.label = image.picDescription.text();
                        myOBJ.thumbnailImage = image.url.text();
                        myOBJ.fullImage = image.big_url.text();
                        imageArray.push(myOBJ);           
                private function complete():void {
                private function xmlLoadFault(event:FaultEvent):void {
                    Alert.show("Could not load XML file");
            ]]>
        </mx:Script>
        <mx:HTTPService id="xmlService"
            url="data/newwork.xml"
            resultFormat="e4x"
            result="xmlHandler(event)"
            fault="xmlLoadFault(event)"
            showBusyCursor="true" />
        <mx:Panel title="{horizontalList.selectedItem.label}"
                height="100%"
                horizontalAlign="center"
                backgroundColor="#CCCCCC"
                backgroundAlpha="0"
                borderColor="#CCCCCC" >
            <mx:Image id="img"
                    source="{horizontalList.selectedItem.fullImage}"
                    maintainAspectRatio="true"
                    horizontalAlign="center"
                    verticalAlign="middle"
                    width="{horizontalList.width}"
                    height="100%"
                    />
            <mx:ControlBar horizontalAlign="center">
                <mx:HorizontalList id="horizontalList"
                        labelField="label"
                        iconField="thumbnailImage"
                        dataProvider="{imageArray}"
                        itemRenderer="CustomItemRenderer"
                        columnCount="5"
                        columnWidth="125"
                        rowCount="1"
                        rowHeight="125"
                        selectedIndex="0"
                        horizontalScrollPolicy="on"
                        backgroundAlpha="0" />
            </mx:ControlBar>
        </mx:Panel>
    </mx:Application>

    I updated the source  following your suggestion and it does seam to be working better. Is there any other things I could change to make it load more smoothly?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
            layout="vertical"
            verticalAlign="top"
            backgroundColor="black" viewSourceURL="srcview/index.html"
            preinitialize="preInit()"
            backgroundAlpha="0"
            color="white" >
        <mx:Script>
            <![CDATA[
                import mx.collections.XMLListCollection;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.controls.Alert;
                [Bindable]private var xmlListCol:XMLListCollection = new XMLListCollection();
                private function preInit():void {
                xmlService.send();       
                private function xmlHandler(event:ResultEvent):void {
                    var xmlList:XMLList = event.result.image;
                    xmlListCol.source = xmlList;               
                private function xmlLoadFault(event:FaultEvent):void {
                    Alert.show("Could not load XML file");
            ]]>
        </mx:Script>
        <mx:HTTPService id="xmlService"
            url="data/newwork.xml"
            resultFormat="e4x"
            result="xmlHandler(event)"
            fault="xmlLoadFault(event)"
            showBusyCursor="true" />
        <mx:Panel title="{horizontalList.selectedItem.picDescription.text()}"
                height="100%"
                horizontalAlign="center"
                backgroundColor="#CCCCCC"
                backgroundAlpha="0"
                borderColor="#CCCCCC" >
            <mx:Image id="img"
                    source="{horizontalList.selectedItem.big_url.text()}"
                    maintainAspectRatio="true"
                    horizontalAlign="center"
                    verticalAlign="middle"
                    width="{horizontalList.width}"
                    height="100%"
                    />
            <mx:ControlBar horizontalAlign="center">
                <mx:HorizontalList id="horizontalList"
                        labelField="label"
                        iconField="thumbnailImage"
                        dataProvider="{xmlListCol}"
                        itemRenderer="CustomItemRenderer"
                        columnCount="5"
                        columnWidth="125"
                        rowCount="1"
                        rowHeight="125"
                        selectedIndex="0"
                        horizontalScrollPolicy="on"
                        backgroundAlpha="0" />
            </mx:ControlBar>
        </mx:Panel>
    </mx:Application>

  • Dynamic images display issues in FF and Opera

    Dreamweaver 8
    http://daylily.net/polytepals/results.asp?CultivarName=Carolina%20Octopus
    Can someone please help me correct the following problem. The
    dynamic image
    on this page displays properly in Explorer but it will not
    display in Opera
    or Firefox. It works correctly in Netscape when Netscape is
    set to display
    as Explorer.
    This is affecting all my dynamic images.
    Thank you,
    Bobby

    <img src="\polytepals\PolyPhoto\carolina_octopus.jpg">
    there are no backslashes in urls.
    <img src="/polytepals/PolyPhoto/carolina_octopus.jpg">
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Urgent Help with Image Gallery

    Hi,
    I really need help with an image gallery i have created. Cannot think of a resolution
    So....I have a dynamic image gallery that pulls the pics into a movie clip and adds them to the container (slider)
    The issue i am having is that when i click on this i am essentially clicking on all the items collectively and i would like to be able to click on each image seperately...
    Please see code below
    var xml:XML;
    var images:Array = new Array();
    var totalImages:Number;
    var nbDisplayed:Number = 1;
    var imagesLoaded:int = 0;
    var slideTo:Number = 0;
    var imageWidth = 150;
    var titles:Array = new Array();
    var container_mc:MovieClip = new MovieClip();
    slider_mc.addChild(container_mc);
    container_mc.mask = slider_mc.mask_mc;
    function loadXML(file:String):void{
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load(new URLRequest(file));
    xmlLoader.addEventListener(Event.COMPLETE, parseXML);
    function parseXML(e:Event):void{
    xml = new XML(e.target.data);
    totalImages = xml.children().length();
    loadImages();
    function loadImages():void{
    for(var i:int = 0; i<totalImages; i++){
      var loader:Loader = new Loader();
      loader.load(new URLRequest("images/"+String(xml.children()[i].@brand)));
      images.push(loader);
    //      loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onProgress);
         loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
    function onComplete(e:Event):void{
    imagesLoaded++;
    if(imagesLoaded == totalImages){
      createImages();
    function createImages():void{
    for(var i:int = 0; i < images.length; i++){
      var bm:Bitmap = new Bitmap();
      bm = Bitmap(images[i].content);
      bm.smoothing = true;
      bm.x = i*170;
      container_mc.addChild(bm);
          var caption:textfile=new textfile();
          caption.x=i*170; // fix text positions (x,y) here
       caption.y=96;
          caption.tf.text=(xml.children()[i].@brandname)   
          container_mc.addChild(caption);

    yes, sorry i do wish to click on individual images but dont know how to code that
    as i mentioned i have 6 images that load into an array and then into a container and i think that maybe the problem is that i have the listener on the container so when i click on any image it gives the same results.
    what i would like is have code thats says
    if i click on image 1 then do this
    if i click on image 2 then do something different
    etc
    hope that makes sense
    thanks for you help!

  • Need advice/idea about Image gallery

    Hello to ALL!!!
    I'm trying to make an dynamic image gallery WITH!!! some
    active buttons above (for example: BUTTON1 with function "delete"
    and BUTTON2 with function "update") a picture and some "dataoutput"
    below (for example:Price). So, separate cell must look like:
    BUTTON1 BUTTON2
    <Image>
    PRICE
    For implementation this task I have:
    1) mySQL database "gallery" with table "test" and columns
    "Id", "path to image", "Price"
    2) 2 gifs: BUTTON1, BUTTON2
    Before my first trying I thought that it's simple, and I've
    tried:
    <!---action page---->
    <cfquery name="qTest" datasource="gallery">
    SELECT * FROM test
    </cfquery>
    <div id=imagecont>
    <cfoutput>
    <cfloop query="qTest">
    <img src="../Button1.gif />
    <img src="../Button2.gif /><br>
    <img src="#qTest.path to image#" />
    <p>#qTest.Price#</p>
    </cfloop>
    </cfoutput>
    </div>
    And it worked normal. BUT!!! Looping had a vertical
    direction! And any CSS rules that I've applied to DIV "imagecont"
    (weight, height) hadn't any effect.
    So, what I've get:
    I see all necessary information (on browser), but I don't
    know, how to format it with my dreaweawer cs3 and CSS.
    And I afraid that I've chosen a "wrong method" (I mean my
    code above)
    Please, give me some recommendations or advices.
    How can i archive my needs?
    How to use CSS in div tag, which includes <cfloop>
    code. I've also tried to use CSS with structure like:
    <div id=a>
    <cfoutput>
    <cfloop >
    <div id=b>
    DATA
    </div>
    </cfloop>
    </cfoutput>
    </div>
    But (div a)'s CSS rule HEIGHT take's no effect on <div
    id=b> :(
    And what about useful technique for displaying " action
    buttons" above each image in dynamic image gallery???
    Great THANKS for your answers/comments!!!!

    the css attribute you are looking for is FLOAT.
    see if something like
    http://www.photos-of-laos.org/top-rated.cfm
    is
    what you are after in general images layout terms. feel free
    to check
    the generated html :).
    re general css knowledge i highly recommend the book
    "Bulletproof CSS"
    by Mark Grabinski.
    re the 2 buttons above the image: consider turning them into
    css image
    overlays instead (when the buttons appear OVER [not above]
    the image
    only when a user mouses over) - it looks much better that
    way.
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Dynamic picture gallery

    I'm trying to create a dynamic image gallery that is updated
    from a database, i managed to create a simple mysql database
    using phpmy admin, so I could update my image gallery more
    often, I saw something that I like but I have no idea how to create
    it here is the example:
    http://flight001.com/store/trip.htm?itemid=307&sid=201&page=2
    I didnt manage to create this with dynamic table from within
    dreamweaver 8, maybe I just don't know how,
    this is the link to a gallery on my website:
    http://www.yuvallavy.com/work/scenic/scenic.htm.
    I need all the help I can get
    I'm using dreamweaver 8 on a Mac and using PHP/MySql server
    model.

    All you need to is put a repeat region on the page and then
    apply something
    like a horizontal looper to it to get the number of images
    across that you
    want. I know that there is a commercial extension for DW but
    there also may
    be free php ones. Do a google search on horizontal looper +
    php
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "uvi" <[email protected]> wrote in message
    news:eiqtu3$c1b$[email protected]..
    > I'm trying to create a dynamic image gallery that is
    updated from a
    > database, i
    > managed to create a simple mysql database
    > using phpmy admin, so I could update my image gallery
    more often, I saw
    > something that I like but I have no idea how to create
    it here is the
    > example:
    >
    http://flight001.com/store/trip.htm?itemid=307&sid=201&page=2
    > I didnt manage to create this with dynamic table from
    within dreamweaver
    > 8,
    > maybe I just don't know how,
    > this is the link to a gallery on my website:
    >
    http://www.yuvallavy.com/work/scenic/scenic.htm.
    I need all the help I can
    > get
    > I'm using dreamweaver 8 on a Mac and using PHP/MySql
    server model.
    >
    >

Maybe you are looking for

  • Premiere Pro Quitting Repeatedly

    I have a MacBook Pro, 16GB Ram, 2.7 GHZ, running OS 10.9.5 with the most recent update to Premiere Pro CC 2014. I'm working with FS700 AVCHD .mts files off of my Lacie 6TB Thunderbolt external hard drive along with an Apple Thunderbolt display. I lit

  • Create wip jobs for same item with different routings.

    My scenario is , i am having 2 production lines for the same End item. If both lines are available to use, then WIP jobs have to be created for both lines. If either one is available then WIP job has to be created only for that line. Please suggest t

  • Group Left report does not sort DESCending

    Hello seniors... i have the following query that produces result as desired below at SQL level; i am aiming at rows to be displyed in the DESCending order.. SQL> SELECT Z.ACATG_TYPE, Y.EXPN_CATG, z.ACATG_DESC, y.expn_code, y.expn_name,   2  DECODE(Z.

  • SQL Server 2012 unable to update cumulative update for sql server 2012

    Here is the version Microsoft SQL server 2012 11.02.2100.60X64 Trying to install the update to install sccm2012 Error There are no SQL server instance or shared feature that can be update on this computer.

  • Seperate Log file for web app

    I am running a web app under WS 6.1 and uses the java logging. I i turn the logging to "finest" on the virtual server, i get my app finest and the vertual server finest in the same file! What i need is to seperate these 2 in two files. or is it possi