Help please with Picture Gallery

Hi Guys!
My name is Rick, i want to create a picture gallery using as
datasource a
xml file, until now i can load each image from xml reading
its path, i
create a movieclip instance and load inside the jpg file, but
now i want to
create an onPress event for each picture to send popup using
javascript,
i've tried with several ways but i can't make it works, just
one image can
handle the onPress event, how can i create at runtime onPress
events for
each of my images?
this is my code
function CargaXML(RUTA) {
// Create a new XML object.
var flooring:XML = new XML();
// Set the ignoreWhite property to true (default value is
false).
flooring.ignoreWhite = true;
// After loading is complete, trace the XML object.
flooring.onLoad = function(success) {
if (flooring.firstChild.hasChildNodes()) {
var X = 0, Y = 20;
var algo,nombre,nombre2;
for (var i = 0; i<flooring.firstChild.childNodes.length;
i++) {
nombre = "mc"+i; //name of new movieclip
var nextDepth =
_root.spMain.spContentHolder.getNextHighestDepth();
_root.spMain.spContentHolder.attachMovie("mcImg", nombre,
nextDepth,
{_x:X, _y:Y}); //mcImg is a movieclip in my library, so i
create new
instance for each xml node
CARGARIMG(flooring.firstChild.childNodes
.childNodes[0].firstChild.nodeValue,
flooring.firstChild.childNodes.childNodes[1].firstChild.nodeValue,
nombre, i, Y); // pas some
Y += 150;
//for
//if
_root.spMain.vScrollPolicy = "on";
//function
// Load the XML into the flooring object.
flooring.load(RUTA); //RUTA has the xml path
function CARGARIMG(Nombre, whichImage, mc, i, Y) {
if (Nombre != "Ninguna") {
loadMovie(whichImage, mc); //here i load the jpg image
// then i create a text field for an image title
var texto = "texto"+i;
createTextField(texto, getNextHighestDepth(), 0, Y+100, 300,
30);
eval(texto).multiline = true;
eval(texto).text = Nombre;
eval(texto).autoSize = "center";
mc.onPress(){trace(Nombre);} // mc has the new movieclip
instance, i also
tried with eval(mc).onPress(){trace(Nombre);} but nothing
works, just the
last image has attached the event =(
PS: im using Flash 8
Regards
Rick

okidoi Mr Helpy!
let me try with this
just one more question, the button should be created at
runtime or inside my
movieclip?
Regards
Rick
"Mr Helpy mcHelpson" <[email protected]>
escribió en el mensaje
news:f46tjk$lg1$[email protected]..
> flooring.onLoad = function(success) {
> if (flooring.firstChild.hasChildNodes()) {
>
> you can just do
>
> flooring.onLoad = function(success) {
> if (success) {
>
> you'll need to create a button on top of your image.
This for me is most
> easily done with a predefined custom class, and on the
instantiation of
> your
> image(movieclip) you can define the button actions
contained in the movie
> clip.
>
> make sense?
>
> HmcH
>

Similar Messages

  • Help please with pictures!

    I have an existing Nokia phone and have copied my pictures on to the memory card. When I put my SIM into my Blackberry and got to pictures there aren't any. How do I download my pictures so I can see them!! Would appreciate any help as don't want to lose them x 

    montysmummy wrote:
    Ahh sorry I think I meant to say the memory card.  I only had one card in my Nokia which is the SIM card. Thanks for your reply sorry for any confusion
    Ok, so IF you have pictures on a SIM card, they won't be read of usable on the BlackBerry from the SIM card, sorry.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Help please with FaceTime. The built in app seems to have disappeared from my iPad2. Bought it in Australia

    Help please with FaceTime. My built in app seems to have disappeared.

    If K Penguin's suggestion doesnt work, you will have to go to you iTunes and do a reset, that is if you do not have it in your back up library.

  • Little help please with forwarding traffic to proxy server!

    hi all, little help please with this error message
    i got this when i ran my code and requested only the home page of the google at my client side !!
    GET / HTTP/1.1
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
    Accept-Language: en-us
    UA-CPU: x86
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.2; .NET CLR 2.0.50727)
    Host: www.google.com
    Connection: Keep-Alive
    Cookie: PREF=ID=a21457942a93fc67:TB=2:TM=1212883502:LM=1213187620:GM=1:S=H1BYeDQt9622ONKF
    HTTP/1.0 200 OK
    Cache-Control: private, max-age=0
    Date: Fri, 20 Jun 2008 22:43:15 GMT
    Expires: -1
    Content-Type: text/html; charset=UTF-8
    Content-Encoding: gzip
    Server: gws
    Content-Length: 2649
    X-Cache: MISS from linux-e6p8
    X-Cache-Lookup: MISS from linux-e6p8:3128
    Via: 1.0
    Connection: keep-alive
    GET /8SE/11?MI=32d919696b43409cb90ec369fe7aab75&LV=3.1.0.146&AG=T14050&IS=0000&TE=1&TV=tmen-us%7Cts20080620224324%7Crf0%7Csq38%7Cwi133526%7Ceuhttp%3A%2F%2Fwww.google.com%2F HTTP/1.1
    User-Agent: MSN_SL/3.1 Microsoft-Windows/5.1
    Host: g.ceipmsn.com
    HTTP/1.0 403 Forbidden
    Server: squid/2.6.STABLE5
    Date: Sat, 21 Jun 2008 01:46:26 GMT
    Content-Type: text/html
    Content-Length: 1066
    Expires: Sat, 21 Jun 2008 01:46:26 GMT
    X-Squid-Error: ERR_ACCESS_DENIED 0
    X-Cache: MISS from linux-e6p8
    X-Cache-Lookup: NONE from linux-e6p8:3128
    Via: 1.0
    Connection: close
    java.net.SocketException: Broken pipe // this is the error message
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:115)
    at java.io.DataOutputStream.writeBytes(DataOutputStream.java:259)
    at SimpleHttpHandler.run(Test77.java:61)
    at java.lang.Thread.run(Thread.java:595)
    at Test77.main(Test77.java:13)

    please could just tell me what is wrong with my code ! this is the last idea in my G.p and am havin difficulties with that cuz this is the first time dealin with java :( the purpose of my code to forward the http traffic from client to Squid server ( proxy server ) then forward the response from squid server to the clients !
    thanx a lot,
    this is my code :
    import java.io.*;
    import java.net.*;
    public class Test7 {
    public static void main(String[] args) {
    try {
    ServerSocket serverSocket = new ServerSocket(1416);
    while(true){
    System.out.println("Waiting for request");
    Socket socket = serverSocket.accept();
    new Thread(new SimpleHttpHandler(socket)).run();
    socket.close();
    catch (Exception e) {
    e.printStackTrace();
    class SimpleHttpHandler implements Runnable{
    private final static String CLRF = "\r\n";
    private Socket client;
    private DataOutputStream writer;
    private DataOutputStream writer2;
    private BufferedReader reader;
    private BufferedReader reader2;
    public SimpleHttpHandler(Socket client){
    this.client = client;
    public void run(){
    try{
    this.reader = new BufferedReader(
    new InputStreamReader(
    this.client.getInputStream()
    InetAddress ipp=InetAddress.getByName("192.168.6.29"); \\ my squid server
    System.out.println(ipp);
    StringBuffer buffer = new StringBuffer();
    Socket ss=new Socket(ipp,3128);
    this.writer= new DataOutputStream(ss.getOutputStream());
    writer.writeBytes(this.read());
    this.reader2 = new BufferedReader(
    new InputStreamReader(
    ss.getInputStream()
    this.writer2= new DataOutputStream(this.client.getOutputStream());
    writer2.writeBytes(this.read2());
    this.writer2.close();
    this.writer.close();
    this.reader.close();
    this.reader2.close();
    this.client.close();
    catch(Exception e){
    e.printStackTrace();
    private String read() throws IOException{
    String in = "";
    StringBuffer buffer = new StringBuffer();
    while(!(in = this.reader.readLine()).trim().equals("")){
    buffer.append(in + "\n");
    buffer.append(in + "\n");
    System.out.println(buffer.toString());
    return buffer.toString();
    private String read2() throws IOException{
    String in = "";
    StringBuffer buffer = new StringBuffer();
    while(!(in = this.reader2.readLine()).trim().equals("")){
    buffer.append(in + "\n");
    System.out.println(buffer.toString());
    return buffer.toString();
    Edited by: Tareq85 on Jun 20, 2008 5:22 PM

  • Can anyone help please with my Time Machine, I have been getting the following message The backup disk image "/Volumes/Mac Backup/Stephen Smith's iMac.sparsebundle" is already in use.

    Can anyone help please with my Time Machine, I have been getting the following message The backup disk image “/Volumes/Mac Backup/Stephen Smith’s iMac.sparsebundle” is already in use.

    See > http://pondini.org/TM/C12.html

  • Help please with 2006 Macbook 13inch, for tv hook up.

    Help please with 2006 Macbook 13inch, to hook up to tv for streaming. The display works through VGA but the audio isn't working. Got a plug that goes into headphone jack on computer and connects into the audio jack on the back of tv but no sound. I'm not quite sure what the issue is, whether its the wrong plug, the tv, or the computer. Best Buy says this is the right plug and it seems that it would be, but who knows. If anyone has any experience in this, I would appreciate the help!

    Make sure those audio plugs are matched with the VGA plug. With your MacBook running something with audio switch between your sources on the TV Component, Composite and such. See if the sound is coming from another source. If so then you've got your audio plugs in the wrong jacks.
    Also could you post the make and model number of your TV.

  • Help Please with Driver

    I need to install the ADB Interface for the X2 onto my computer. Does any one know how or where I can get this driver?

    <Duplicate post.  Please see Help Please with Driver  for any replies.  This post will be closed.>

  • Need Help Please with Flash Professional - No Cursor Change on Buttons/Links in Mac OS

    Hi Folks, I am relatively new to Flash Professional but I recently built a very nice flash website with very little problems.  I noticed after I uploaded my site to my server, that my mouse cursor did not change from an arrow to a finger on any of my buttons.  It did change on the hyperlinks, but not on the buttons.  Everything still worked fine but there was no indication to the user that an object was in fact an interactive button.  I found this code:  button1.buttonMode = true; button1.useHandCursor = true; and inserted it for all my buttons and that seemed to fix everything, I tested the site on firefox, ie, and safari.  I am using a PC with windows 7.  When I went to check the website on a Mac powerbook, the cursor did not change on any of the buttons and it does not change on any of my hyperlinks either.  I have searched all over trying to find a solution and have had no luck.  Can anyone please help me with this problem or point me in the right direction?  Any advice would be very much appreciated.  Thanks so much!!!

    Thank you so much for replying!  I did in fact let flash professional create the HTML page for the site and have not altered it at all.  Would you have any other suggestions as to why it's not displaying my links/buttons on a Mac?  I checked out the browsers Firefox, ie, and safari on my pc, but looking thru safari on the Mac, the cursor does not change on any of my links or buttons.  Thanks again so much for the reply, nice to hear from a human instead of reading thousands of posts!  Very much appreciated!!!!!

  • Help please with my navigation buttons

    Can anyone please help me with my vertical navigation buttons. I'm trying to set up my nav bar so that all the buttons have a background image (button.jpg) behind them at all times and the only thing that changes when touched or the mouse rolls over them is that the colour of the text changes, except when the sub buttons appear, because the name of some of the sub buttons are so long i have created another button image that is longer (button2.jpg), i only want this to appear on sub buttons otherwise the buttons will end up taking most of the pages space. I'm having great difficulties getting the sub buttons to appear with the correct image (button2.jpg) and am getting increasingly frustrated with it, can anyone please help!!!
    www.milesfunerals.com/index2.html

    index2.html is a broken link for sure. The main index page looks like it's working fine.
    A little styling critique if it's okay... Personally I'd have gone with a CSS or Javascript multi-level menu across the bottom of the header. Saves visitors from having to scroll all the way down the page to see every menu item. And I'd rethink the color of the "Miles & Daughters" in the header image. It kinda gets lost in the roses.
    If you have a link to the "broken" page please put it up so we can analyze it.

  • Help please :) with do not disconnect.

    I disconnected my ipod and I still get that "Do not disconnect message" And it doesnt even flash.
    Can somone please help me with this

    Try Resetting your iPod. Hold down the MENU and SELECT (centre) buttons for five or ten seconds until you see the Apple logo appear then the menu button to go to the normal display. Have a look at this link as well:
    iPod won't turn on
    iPod stops responding or will not waken from sleep

  • Urgent help please with MIDI pedal

    I just got an old awesome midi pedal called the X-15 Ultrafoot.
    The pedal has two expression pedals, and 10 pushbuttons/pads. (and two buttons to cycle through additional banks, and a "mode" and "bypass" button)
    Somebody please help I am on the verge to having amazing control.
    What I want to do is have each pushbutton be assigned to a parameter, which is easy to program. Then I want to make the expression pedal(s) also be assigned to that last selected parameter. How do I do this?
    How can I make the expression pedals control over the parameter remain exclusive to just the last selected parameter?!
    Somebody save me please thanks

    mr kglad i really hope my ( too many replies and questions ) don't bother you.. but please excuse me if they sound foolish or something im a beginner as mentioned...
    There must be something wrong with whatever im doing ... ( im so desperate and since you are the only one who replied on me i really need your help please.. )
    1- i published the first fla as a swf (10.3 ) with a button with the code you've given me )
    2- i published the second fla as a swf (10.3) with another button with the same code you've given me )
    3- i made a main page where there are two buttons.. one for english and one for foreign language
      English button with this code :
    Engbutton.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_4);
    import fl.display.ProLoader;
    var fl_ProLoader_4:ProLoader;
    //This variable keeps track of whether you want to load or unload the SWF
    var fl_ToLoad_4:Boolean = true;
    function fl_ClickToLoadUnloadSWF_4(event:MouseEvent):void
        if(fl_ToLoad_4)
            fl_ProLoader_4 = new ProLoader();
            fl_ProLoader_4.load(new URLRequest("englishformFIN.swf"));
            addChild(fl_ProLoader_4);
        else
            fl_ProLoader_4.unload();
            removeChild(fl_ProLoader_4);
            fl_ProLoader_4 = null;
        // Toggle whether you want to load or unload the SWF
        fl_ToLoad_4 = !fl_ToLoad_4;
    and the other button with the same code ( the second fla )
    IT DOESNT WORK WHEN I TEST THE MOVIE.. the return buttons nor the main ones..why why why why why... ???
    i really need your help
    THANK YOU in advance

  • Help please, with port forwarding settings

    I have an MSI RG60 wireless router (Ethernet hard wired to my XP Home PC) and don't know what settings to use for port forwarding, to enable my WinMX and BitTorrent clients to work successfully.
    I have the port numbers, and assume that this information goes in the Service Port box, i.e. 6699, or 6881-6889.
    I know which ports are TCP and which are UDP, but I don't know what IP address to enter or which Common Service Port type to choose. Can anyone help please?
    I'm pretty sure that other settings in my PC are OK as I have successfully been running a Belkin router for a couple of years, and have only replaced it with the new MSI unit due to reliability problems.

    It does indeed have port triggering, but it wants incoming and trigger port protocol info, along with trigger and incoming port numbers.
    How can I type ipconfig into either of teh clients...WinMx or Bit Torrent?

  • Help Please With iPod Player On My 3GS

    Hello, Could anyone help me with a problem with my iPod part of my iPhone 3GS. The iPod will start to play my desired Playlist, but during the playback, the track album covers forget the last played track and franticly search for it. The album covers can rotate for ever and eventually lock the phone up and steel the album cover images at random. I have to then re-sync with iTunes to get them back. My last 3G phone did the same thing and I had it replaced, but still the same with the new 3G. Now I have a new 3GS, so the problem must be in iTunes Folder. I have a lot of tracks & platlists so I don't want to rush to reformat iTunes. Any ideas please? Jeff

    I'm having the same issue - did you ever find a solution?

  • Help please with caurina

    Hi, I have a bunch of logos in a file and want to animate with caurina, so I had create a timer to show ( fade in - fade out) the logos one by one;
    I had previously fade all the logos with alpha =0; but don´t any idea about how to call it inside the caurina function. my logos all are called logo1, logo2,logo3 etc and I try it to create a variable to hold a number and them put the first part of the name(logo) + the variable to call the movieclip but it didn´t work.Please if someone could help me with this problem.
    //this variable hold the 2nd part of the name
    var logoContador:Number = 1;
    var miTimer:Timer = new Timer(3000);
    miTimer.addEventListener(TimerEvent.TIMER, goTimer);
    function goTimer(TimerEvent:Event):void
    Tweener.addTween(logo+logoContador,{alpha:1,time:1,transition:"easeInQuad",});
    Tweener.addTween(logo+logoContador,{alpha:0,time:1, delay:1.7,transition:"easeInQuad",});
    logoContador++
    miTimer.start();

    yes, you where right it was the extra coma before the end, works very soft and cool, and even using a conditional inside can use it as a  loop.
    Thanks so much for your help, here is the whole script, could be useful to other people.
    import caurina.transitions.*;
    //this variable hold the 2nd part of the name
    var logoContador:Number = 1;
    var miTimer:Timer = new Timer(3000);
    miTimer.addEventListener(TimerEvent.TIMER, goTimer);
    function goTimer(TimerEvent:Event):void
    Tweener.addTween(this["logo"+String(logoContador)],{alpha:1,time:1,transition:"easeInQuad" });
    Tweener.addTween(this["logo"+String(logoContador)],{alpha:0,time:1, delay:1.7,transition:"easeInQuad"});
    if(logoContador>=6)
        logoContador = 1;
    else
    logoContador++
    trace("im runing");
    trace(logoContador);
    miTimer.start();
    //- end of script

  • Help please with Mail attachements

    Can anyone help please. When I send an email with an attachment such as a jpeg to a Windows user the recipient complains that the attachment is embedded in the email and can not be extracted to forward, or print for example. I end up having to use Entourage for Mac to send attachments which works for them but is a pain to me.
    What do I need to do to have truly Windows Friendly attachments?
    Thanks in anticipation.

    When a PC Outlook user gets a jpg you have attached, even clicking USE WINDOWS FRIENDLY ATTACHMENTS will not alter it. We've done several experiments here and it seems that if you select USE RICH TEXT for formatting in mail preferences MAIL determines that you want to imbed the graphic rather than attach it. If you select use plain text, the jpg will attach properly, but you lose any HTML signatures you have set up, which is a problem for me.
    If a yahoo mail is sent from the Mail client, it automatically changes to plain text.
    I like Mac Mail, but I want control over how the attachments are sent, so I can have my jpg not imbedded and my HTML signature.
    Nancy

Maybe you are looking for

  • Raw editing not working

    Leopard 1.5.2 and all other current updates installed as of February 12, 2008. Macbook white April 2007 no other problems. I have imported some raw images from a Nikon D80. They show in the iPhoto events browser but when I try to edit them all the me

  • Kernel panic with drive insertion

    I have been using Raid1 (mirroring) for quite some time, built / managed by Disk Utility. Today I pulled the two drives I had installed in my Mac Pro that were raided together and replaced them with larger capacity drives. I booted and created the vo

  • Regarding the first day of the previous month

    hi experts,               suppose the date is '010406' what i want that is der any function module so that i can get the first date of the previous month i.e '010306' plz let me know......or sud i add logic for that if yes plz help me........

  • Need Help Converting a VBA Macro to AppleScript 2.1.2 for Outlook 2011

    Hello AppleScript Experts: Can somebody help me convert the below VBA Macro to an equivalent AppleScript 2.1.2 for Mac Outlook 2011 (Version 14.1.3) I have a VBA macro program that pops message box when somebody sends an email to an external email ad

  • How do I display the template chooser window?  It does not appear under the file menu any longer.

    How do I display the template chooser menu?  It no longer appears under the File menu.  I can see it only in the help mode.