Jump to content

ember

Members
  • Posts

    35
  • Joined

  • Last visited

About ember

  • Birthday 01/18/1984

Profile Information

  • Location
    Portugal

ember's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. could someone please help me with this? i still haven't found a solution for this
  2. Hello everyone, i've got myself in a pickle here, and to be honest i don't know how to solve this.This is how it goes: I have a main movie that will comprise 3 other movies loaded with the loadMovieNum function.each of those movies has a little intro animation before going to their main area, and i created a menu that should allow me to access each one of the other two movies, skipping this animation.putting it in a simpler form - inside movie A are movies B, C and D. i want to be able to go from B to C without passing through A.is it possible?i suppose anything is possible in flash but i honestly don't know how to achieve this.i'd really apreciate if someone could help me with this!best regards,bruno
  3. thanks for your fast reply :)yes, i've saved the file as UTF-8.however, i don't know where to change the MIME type setting... is it on the flash file or on the xml?best regards,ember
  4. Hello everyone,i have a flash project in wich i use a XML database to load the menu, but i don't know why, it doesn't work correctly when using special characters (Ç, À, ã, etc...)i need to use those characters because in my native language some words that use those characters don't make sense without them...i've already tried to create the xml file as UTF-8, and also adding System.useCodepage = true; to the actionscript.any ideas on how to solve this?best regards,ember
  5. thanks, it's working perfectly!
  6. thanks, it's working great!just another thing: how can i change the text in the toggle map area so that what the map is closed it says "open" and when the map is open it says close?thanks again for the help!
  7. well, here are some examples of what i need:here is the section before opening the image:and here it is after opening it:any ideas? best regards, ember
  8. hello everyone, i need a little help on creating something on a webpage, that inside a table, there is some text, and on the side of it there is a button where you can click to display a little picture that can assist you at understanding the text better. something like the viamichelin.com page, where you can create a travel route, and near the driving directions, there is a button where you can click to display the map of the indicated area. the problem is that i don't know how this can be done. and in this case, the data is static, not like in viamichelin, where it is influenced by the route you create.can anyone help me on this?best regards, ember
  9. well, i was already expecting a hard task about that... do you know any documentation where i can get some ideas and learn how to accomplish this?thanks,ember
  10. i see what you mean, but in that case the user, when loading the page, will get the results already filtered, is that correct? because what i need is that the users are allowed to filter the results after they're displayed.
  11. I don't know what happened, but a part of the code was eaten over there!i'll try to post it again: <%' In this demo, at least, we don't allow user to change directories...' Change the DIRECTORY to point to any virtual directory of your choice.CONST DIRECTORY = "/" ' relative path in virtual directories 'These consts are only valid for default file-folders 'virtual folders may have their own ids! Const FILE_NAME = 0 CONST FILE_SIZE = 1 CONST FILE_TYPE = 2 CONST FILE_MODIFIED = 3 Const FILE_CREATED = 4 Const FILE_ACCESSED = 5 Const FILE_OWN = 8 Const FILE_AUT = 10 ' get requested sort order, if not first time here...' (forward by name is default)req = Request("sortBy")If Len(req) < 1 Then sortBy = 0 Else sortBy = CInt(req)req = Request("priorSort")If Len(req) < 1 Then priorSort = -1 Else priorSort = CInt(req)'' did user ask for same sort? to reverse the order?' but if so, then zap priorSort so clicking again will do forward!If sortBy = priorSort Then reverse = true priorSort = -1Else reverse = false priorSort = sortByEnd If' now start the *real* code...'Dim path Dim sh Dim oShellFolder Dim theFiles Dim info path = Server.MapPath( DIRECTORY ) Set sh = CreateObject("Shell.Application") Set oShellFolder = sh.Namespace( path ) theFiles = getItemsInfo(oShellFolder) For Each info in theFiles Next Function getItemsInfo (oShF) Dim ######em Dim currentSlot Dim p Dim fname Dim fext Dim ftype Dim fcreate Dim fmod Dim faccess Dim fsize Dim fauthor Dim fowner ReDim theFiles(oShF.Items.Count-1) currentSlot = -1 For Each ######em in oShF.Items fname = ######em.Name p = instrrev(fname,".") If (p> 0) Then fext = Mid(fname, p+1,len(fname)) Else fext = fname ftype = oShF.GetDetailsOf(######em, FILE_TYPE) fsize = oShF.GetDetailsOf(######em, FILE_SIZE) fmod = oShF.GetDetailsOf(######em, FILE_MODIFIED) fcreate = oShF.GetDetailsOf(######em, FILE_CREATED) faccess = oShF.GetDetailsOf(######em, FILE_ACCESSED) fauthor = oShF.GetDetailsOf(######em, FILE_AUT) fowner = oShF.GetDetailsOf(######em, FILE_OWN) currentSlot = currentSlot + 1 theFiles(currentSlot) = Array(fname, fext, ftype, fsize, fmod, fauthor, fowner) Next getItemsInfo = theFiles '' files are now in the array...'' As noted, it is actually an ARRAY *OF* ARRAYS. Which makes' picking the column we will sort on easier!'' ...size and sort it...fileCount = currentSlot ' actually, count is 1 more, since we start at 0ReDim Preserve theFiles( currentSlot ) ' really not necessary...just neater!' First, determine which "kind" of sort we are doing.' (VarType=8 means "string")'If VarType( theFiles( 0 )( sortBy ) ) = 8 Then If reverse Then kind = 1 Else kind = 2 ' sorting strings...Else If reverse Then kind = 3 Else kind = 4 ' non-strings (numbers, dates)End If'' A simple bubble sort for now...easier to follow the code...'For i = fileCount TO 0 Step -1 minmax = theFiles( 0 )( sortBy ) minmaxSlot = 0 For j = 1 To i Select Case kind ' which kind of sort are we doing? ' after the "is bigger/smaller" test (as appropriate), ' mark will be true if we need to "remember" this slot... Case 1 ' string, reverse...we do case INsensitive! mark = (strComp( theFiles(j)(sortBy), minmax, vbTextCompare ) < 0) Case 2 ' string, forward...we do case INsensitive! mark = (strComp( theFiles(j)(sortBy), minmax, vbTextCompare ) > 0) Case 3 ' non-string, reverse ... mark = (theFiles( j )( sortBy ) < minmax) Case 4 ' non-string, forward ... mark = (theFiles( j )( sortBy ) > minmax) End Select ' so is the current slot bigger/smaller than the remembered one? If mark Then ' yep, so remember this one instead! minmax = theFiles( j )( sortBy ) minmaxSlot = j End If Next ' is the last slot the min (or max), as it should be? If minmaxSlot <> i Then ' nope...so do the needed swap... temp = theFiles( minmaxSlot ) theFiles( minmaxSlot ) = theFiles( i ) theFiles( i ) = temp End IfNext' Ta-da! The array is sorted!'%> i don't know why, but a part of the code was munched when i pasted it!so here comes the first part, and in the next reply will be the second.here comes the second part: <FORM Name="doSort" Method="Get"><INPUT Type=Hidden Name=priorSort Value="<% = priorSort %>"><INPUT Type=Hidden Name=sortBy Value="-1"></FORM><script Language="JavaScript">function reSort( which ){ document.doSort.sortBy.value = which; document.doSort.submit( );}</SCRIPT><CENTER><b></b><FONT class=normal bgColor=#cecfce width="100%"><font face="Arial" size="4"></b></FONT></font><p> </p><p><FONT class=normal bgColor=#cecfce width="100%"><font face="Arial" size="4"> Showing <% = (fileCount+1) %> files from directory <% = path %></FONT></p><P></P><P></P><p> </p><p> </p><TABLE Border=0 CellPadding=3><TR> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(0);">File name</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(1);">Extension</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(2);">Type</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(3);">Size</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(4);">Last modified</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(5);">Author</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(6);">Owner</A></TH></TR><%'With the array nicely sorted, this part is a piece of cake!For i = 0 To fileCount Response.Write "<TR class=normal>" & vbNewLine For j = 0 To UBound( theFiles(i) ) Response.Write " <TD><a href= """ & path & "/" & fname & """ >"& theFiles(i)(j) & "</a></TD>" & vbNewLine Next Response.Write "</TR>" & vbNewLineNextEnd Function%> about the filters, the user should be able to filter the results on every item that appears. i'm a little stuck with this, it's in these time that i realise how little i know about ASP =/thanks everyone,ember
  12. sure, here it goes <%' In this demo, at least, we don't allow user to change directories...' Change the DIRECTORY to point to any virtual directory of your choice.CONST DIRECTORY = "/" ' relative path in virtual directories'Option Explicit 'These consts are only valid for default file-folders 'virtual folders may have their own ids! Const FILE_NAME = 0 CONST FILE_SIZE = 1 CONST FILE_TYPE = 2 CONST FILE_MODIFIED = 3 Const FILE_CREATED = 4 Const FILE_ACCESSED = 5 Const FILE_OWN = 8 Const FILE_AUT = 10 ' get requested sort order, if not first time here...' (forward by name is default)req = Request("sortBy")If Len(req) < 1 Then sortBy = 0 Else sortBy = CInt(req)req = Request("priorSort")If Len(req) < 1 Then priorSort = -1 Else priorSort = CInt(req)'' did user ask for same sort? to reverse the order?' but if so, then zap priorSort so clicking again will do forward!If sortBy = priorSort Then reverse = true priorSort = -1Else reverse = false priorSort = sortByEnd If' now start the *real* code...'Dim path Dim sh Dim oShellFolder Dim theFiles Dim info path = Server.MapPath( DIRECTORY ) Set sh = CreateObject("Shell.Application") Set oShellFolder = sh.Namespace( path ) theFiles = getItemsInfo(oShellFolder) 'dump result, replace WSH.Echo for ASP For Each info in theFiles 'WSH.Echo join(info ,"*") Next 'WSH.StdIn.ReadLine() ' Function getItemsInfo (oShF) Dim ######em Dim currentSlot Dim p Dim fname Dim fext Dim ftype Dim fcreate Dim fmod Dim faccess Dim fsize Dim fauthor Dim fowner ReDim theFiles(oShF.Items.Count-1) currentSlot = -1 For Each ######em in oShF.Items 'if ######em.isFolder Then ######em.GetFolder fname = ######em.Name p = instrrev(fname,".") If (p> 0) Then fext = Mid(fname, p+1,len(fname)) Else fext = fname ftype = oShF.GetDetailsOf(######em, FILE_TYPE) fsize = oShF.GetDetailsOf(######em, FILE_SIZE) fmod = oShF.GetDetailsOf(######em, FILE_MODIFIED) fcreate = oShF.GetDetailsOf(######em, FILE_CREATED) faccess = oShF.GetDetailsOf(######em, FILE_ACCESSED) fauthor = oShF.GetDetailsOf(######em, FILE_AUT) fowner = oShF.GetDetailsOf(######em, FILE_OWN) currentSlot = currentSlot + 1 theFiles(currentSlot) = Array(fname, fext, ftype, fsize, fmod, fauthor, fowner) 'end ifNext getItemsInfo = theFiles 'End Function '' files are now in the array...'' As noted, it is actually an ARRAY *OF* ARRAYS. Which makes' picking the column we will sort on easier!'' ...size and sort it...fileCount = currentSlot ' actually, count is 1 more, since we start at 0ReDim Preserve theFiles( currentSlot ) ' really not necessary...just neater!' First, determine which "kind" of sort we are doing.' (VarType=8 means "string")'If VarType( theFiles( 0 )( sortBy ) ) = 8 Then If reverse Then kind = 1 Else kind = 2 ' sorting strings...Else If reverse Then kind = 3 Else kind = 4 ' non-strings (numbers, dates)End If'' A simple bubble sort for now...easier to follow the code...'For i = fileCount TO 0 Step -1 minmax = theFiles( 0 )( sortBy ) minmaxSlot = 0 For j = 1 To i Select Case kind ' which kind of sort are we doing? ' after the "is bigger/smaller" test (as appropriate), ' mark will be true if we need to "remember" this slot... Case 1 ' string, reverse...we do case INsensitive! mark = (strComp( theFiles(j)(sortBy), minmax, vb script:reSort(0);">File name</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(1);">Extension</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(2);">Type</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(3);">Size</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(4);">Last modified</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(5);">Author</A></TH> <TH bgcolor=#CECFCE class=normal align=center><A HREF="java script:reSort(6);">Owner</A></TH></TR><%'With the array nicely sorted, this part is a piece of cake!For i = 0 To fileCount Response.Write "<TR class=normal>" & vbNewLine For j = 0 To UBound( theFiles(i) ) Response.Write " <TD><a href= """ & path & "/" & fname & """ >"& theFiles(i)(j) & "</a></TD>" & vbNewLine 'End Function Next Response.Write "</TR>" & vbNewLineNextEnd Function%> i still have some tweaking to do, that's to make the script also scan folders inside the root folder, and where it displays the name of the file for it to have a link to the file.thanks everyone!
  13. yep, filtering, the page already has a sort function in it.the main problem is that the index has to be dynamic, so you don't have to be changing it each time you add or modify a file in the directory...maybe if i show you the code you can see the main idea better?thanks again
×
×
  • Create New...