Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Getting info from a Global

    Attempting to load an image from a file that a global function finds:


    function GetCityInfo(cityname)
    --Remove the Button text from the end of the button name
    local strCityName = String.Replace(cityname, " Button", "", false);
    -- Check to see if a text file exists within that folder
    local bCityFound = File.Find("AutoPlay\\citys\\"..strCityName, strCityName..".txt", false, false, nil);
    -- If it exists then jump to the citys page and return the string with the City Name
    if bCityFound then
    --Page.Jump("citys");
    return strCityName, "citys";
    else
    return strCityName, "false";
    end
    end


    Now, I need to pull up a pic called citypic.png that’s in the folder that the global function had already found. Here’s what I attempted to use:


    Image.Load("city_Image", "AutoPlay\\citys\\".. strCityName .."citypic.png");

    I’m sure I jacked this up!

  2. #2
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    So does this:

    Image.Load("city_Image", "AutoPlay\\citys\\".. strCityName .."citypic.png");

    look correct? [sheepish grin]

  3. #3
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Well offhand if strCityName is a folder then maybe it should be

    Image.Load("city_Image", "AutoPlay\\citys\\".. strCityName .."\\citypic.png");

  4. #4
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    Yep that was it! (\\) Thanks for your help Corey. Thanks Tigg.

Similar Threads

  1. Tip: Access Global Functions Without Closing Action Editor
    By Corey in forum AutoPlay Media Studio 5.0 Examples
    Replies: 15
    Last Post: 12-16-2004, 09:04 PM
  2. Global Function "Loads of fun"
    By Bruce in forum AutoPlay Media Studio 5.0
    Replies: 15
    Last Post: 01-23-2004, 04:22 PM
  3. INFO: Visual FoxPro 8.0 SP1 Runtime Notes
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 11-28-2003, 08:14 AM
  4. Global Lists
    By pjborg in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 10-29-2003, 12:36 AM
  5. Global Lists and Build Time
    By TJ_Tigger in forum AutoPlay Media Studio 4.0
    Replies: 15
    Last Post: 04-28-2003, 12:08 PM

Posting Permissions

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