|
#1
|
||||
|
||||
|
loading image froma list box problem
hello..
im using an example i found on here where i preload a listbox from a defined folder of jpg images.. when i select one of the list it should load a resized version on the page however it seems to be giving me an error no matter what i do .. please help? many thanks ---------------------------------------------------------- LB = "ListBox1"; -- Get the selected items tSelected = ListBox.GetSelected(LB); -- Because we are not allowing multiple select in the -- ListBox object, we are only concerned with tSelected[1] if tSelected then -- If there is an item selected, get its data sFile = ListBox.GetItemData(LB, tSelected[1]); -- file attributes nSize = File.GetSize (sFile); tFileAtt = File.GetAttributes (sFile); sFileCreated = tFileAtt.CreationDate; sFileLastAccess = tFileAtt.AccessDate; sFileLastWritten = tFileAtt.WriteDate; -- get original image attributes tImage = Image.GetFileInfo(sFile); OriWidth = tImage.Width; OriHeight = tImage.Height; -- set information paragraph Paragraph.SetEnabled("Para_FileProps", true); sParaText = "File Path : "..sFile.."\r\nFile Size : "..nSize.." bytes | Created : "..sFileCreated sParaText = sParaText.."\r\nOriginal Image Size : Width = "..OriWidth.." pixels | Height = "..OriHeight.." pixels"; sParaText = sParaText.."\r\nLast Access : "..sFileLastAccess.." | Last Written : "..sFileLastWritten; Paragraph.SetText("Para_FileProps", sParaText); Paragraph.SetEnabled("Paragraph2", true); -- set button properties Button.SetEnabled("Button_DeleteItem", true); Label.SetEnabled("Label_DeleteNote", true); -- set resize and image position. So change as you like -- set your size choice for the photo maxWidth = 375; maxHeight = 333; --x position from left of screen xPos = 15; --y position from left of screen yPos = 8; --View this function in the global area ResizeImage("Image3", sFile, maxWidth, maxHeight,xPos,yPos); else -- Display an error message Dialog.Message("Error", "There is no item selected."); end ------------------------------------------------------- The error says : On select Line 47: Attempt to call global 'ResizeImage' (a Nil Value) |
|
#2
|
||||
|
||||
|
yaaay i fixed it thanks anyway
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FreePlugin: Splash Image Transition Engine DLL | RizlaUK | AutoPlay Media Studio 6.0 | 43 | 03-26-2008 09:41 AM |
| Loading List Box - Slow Crawl Problem | Animl | AutoPlay Media Studio 6.0 | 3 | 08-15-2006 06:24 PM |
| List Box problem | TonyTJ | AutoPlay Media Studio 6.0 | 3 | 02-25-2006 08:22 AM |
| HOWTO: Set up an MP3 Playlist | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-24-2002 12:57 PM |
| HOWTO: Display Conditional Text Based Upon a List Box Selection | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-15-2002 11:54 AM |
All times are GMT -6. The time now is 08:07 PM.








Linear Mode

