A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: There must be someone who can help me?

  1. #1
    Member
    Join Date
    Sep 2003
    Location
    Crewe, Cheshire
    Posts
    93

    There must be someone who can help me?

    I have a map, and also a set of three flags, red, green and finally blue. I would like for the user to drag the flags to an area on the map, from there each flag to be saved in that location and on that map.

    I have about 9 maps in total and they load from external swf files.

    There must be a way in which this can be achieved, but sharedObjects is not a possiblity, as many users will be using the flash file.

    Please I am really running out of time on this, can anyone help me out.

    There must be a way whereby this can be done.

    Please please help.

    Regards

    Trev

  2. #2
    Senior Member stoc's Avatar
    Join Date
    Nov 2001
    Location
    Romania, Arad
    Posts
    428
    has your server some serverside scripting language installed !?

    (do you need also the actionscript for reaching the functionality you described ?)
    Stoc Digital Studio - Web Applications Development
    http://www.stoc-studio.ro

  3. #3
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Shared Objects can save variables on the users computer to be retrieved later.
    http://www.kirupa.com/developer/mx/sharedobjects.htm

    For online use you have to use a serverside script like php or asp to save to a textfile.
    http://www.flash-db.com/Tutorials/saving/

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  4. #4
    Senior Member stoc's Avatar
    Join Date
    Nov 2001
    Location
    Romania, Arad
    Posts
    428
    ...or your application will run offline (will be an exe file)?
    Stoc Digital Studio - Web Applications Development
    http://www.stoc-studio.ro

  5. #5
    Member
    Join Date
    Sep 2003
    Location
    Crewe, Cheshire
    Posts
    93

    I am so down in the dumps please help me on this one.

    Well I cannot use sharedObjects, no cookies, because other people will use the program but on different machines etc. This would be great for one person but not for this.

    The flash file will be a projector yes, which loads external swf files. I have got most of it working, but I it will not save the xml modifications, I know its something small. Its gotten quite complex but I am so close. SO close.

    In regard to my previous question.

    The server will be running ASP, i have it all set up, but it just does not work, ahhhh please help.

    If you have an email address, I could send you it. In fact its a really neat system if I dare to say so, its just somethings not bloody right.

    Anyway I hope for some reply

  6. #6
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    The server will be running ASP, i have it all set up, but it just does not work, ahhhh please help.
    What does not work?Sending the variables? What actions do you use? If the server isnt currently running the asp, how can you test it?

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  7. #7
    Member
    Join Date
    Sep 2003
    Location
    Crewe, Cheshire
    Posts
    93
    Ok what my problem Is, and thanks for replying. When changes have been made on the map, using an input area. The user can then save the changes perfectly. and you can stray away to a different area and when you return the data is still stored fine indeed.

    Problem is that when you leave the application, the data has not actually been written to the xml, this has been tested using localhost, which Is why i know it does not work.

    I think there is something wrong with the asp, as this asp code I managed to get elsewhere, as I am not strong with asp.

    <%
    Dim xmlFlashData
    Dim objPI
    Dim fileLocation

    Response.write("test")

    Set xmlFlashData = Server.CreateObject("Microsoft.XMLDOM")
    xmlFlashData.async=False
    xmlFlashData.Load(Request)

    Set objPI = xmlFlashData.createProcessingInstruction("xml", "version='1.0'")
    xmlFlashData.insertBefore objPI, xmlFlashData.childNodes(0)
    Set objPI = nothing

    xmlFlashData.save "postcodes.xml"
    Set xmlFlashData = nothing

    %>

    This in effect should overwrite any changes to the xml file, as there are many nodes in the xml for each postal sector.

    I used the following code in flash to send the data

    code:


    xmlFile.send("saveXML.asp","_blank","GET");




    I used Get so I could see what was happening, all the postal code nodes are displayed after I click to sumbit so something is happening, its just not working.

    I have used POST, I mearly used GET to see what was going on.

    Any ideas, if you may think you know or can fix the problem, I will send the application to your email address directly. It has become very complex, but will be worth it if we can cross this barrier, which is defeating the purpose. Its so close

    Trev

  8. #8
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Im no good with xml or asp, so I can only give other pointers.

    Do you get a response from the asp file ( Response.write("test")
    ) ?

    If not you may have a path problem. The code suggest that the asp and swf is in the same folder, and the html also has to be there ( as links in Flash are relative to the html, not the Flash file ).

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  9. #9
    Member
    Join Date
    Sep 2003
    Location
    Crewe, Cheshire
    Posts
    93
    P, it was actually a permissions problem, XML has security issues, Creating a directory, and setting the permissions on that directory fixed the problem .

    Thx for your input.

    Do you have any other idea about the flag method I asked about. Where I have a colour key in the template, and the user could pul flasgs be it red, blue or gree and place them on the map, as indication.

    This of course would have to be saved in maybe a text file of some sort, what do you think about this plan P?

    Cheers for your replys this far

  10. #10
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    I thought it was that information you saved?

    If the flags are movieclips, they could be 3 frames long with a flag color in each frame and control what frame they go to with the color key ( button?).

    The first frame of the movieclip will ask which frame to go to depending on what variable is loaded.

    When saving to textfile you can make a for loop ( if instance names are sequential ) and save all flag movieclips locations ( x and y ) at once.

    The flags can have a onLoad action to check the loaded variables where to place themselves when the movie starts.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  11. #11
    Member
    Join Date
    Sep 2003
    Location
    Crewe, Cheshire
    Posts
    93
    Ouch! sounds great, but complicated, these will be extenal maps that are being loaded. P, if you would be so kind as to provide a sample that would be totally rad, I take it this would be stored in a seperate file, i.e txt file, I am not great with all this, but have until monday to do it and right now, I am not as familiar as i would like to be,

    so sample would be fab.

    If you can spend some time on that

    Thank you

    Trev

  12. #12
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Its a little bit tom much for me at the moment as it will also involve having either separate flag variable names for each map's flags ( if you use jut one textfile ) or use the same but with separate textfiles.

    These things often become more complex the more you get into the project ( its good in a way, as if you knew all the work initially , one would porobably not start the project =) ).

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center