LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 


Prev Previous Post   Next Post Next
  #1  
Old 09-07-2005, 11:48 AM
gd4 gd4 is offline
Registered User
 
Join Date: Sep 2005
Location: Stoke-on_trent - UK
Posts: 12
Rep Power: 0
gd4 is on a distinguished road
Rolleyes Active search list

AIM:To create a searchable list with words on so that when you click on that word it takes you to a screen with a picture of that words ie list apple, orange, pear, banana and when you type in o the list moved to orange then when you click on orange it shows you a picture of an orange.

I have a list which scrolls and i want to be able to click on a word in the list and go to either a)a different scene and to a named frame. Or b) to a html file (created in dreamweaver)

The goto and play doesnt seem to work with this list (not included in this script I have pasted here)... can anyone help?

There are three scripts within the one scene: (Please excuse the scripters comments but I didnt want to delete incase I accidentally took out something important)

FIRST SCRIPT (Containing the links section of which the links included dont work - syntax error?))


// ----------------------------------------------
// Variables
// ----------------------------------------------
minimum_search = 3;
case_sensitive = 0;
trailing_gap = "100";
indent = 0;
active_search = 1;
scroll_distance = 20;
alphabetize = 0;
button_spacing = 12;
// ----------------------------------------------
// WISH-LIST: I'd love to be able to get property or set property to a mask. Wow would that save a lot of hassles I've encountered over time. Maybe in the next version.
// ----------------------------------------------
// >>>>must be manually set:
first_link_yposition = 115;
mask_height = 223.5;
// >>>>determine how many items fit on screen so we can hide the scrollbars if fewer than this number are shown.
list_height = int(mask_height/button_spacing);
// ----------------------------------------------
// Define some links
// ----------------------------------------------
text1 = "CNN";
link1 = "www.cnn.com";
text2 = "MTV";
link2 = "www.mtv.com";
text3 = "Toyota Online";
link3 = "www.toyota.com";
text4 = "AltaVista Search Engine";
link4 = "www.altavista.com";
text5 = "Yahoo! Search Engine";
link5 = "www.yahoo.com";
text6 = "Health Information";
link6 = "www.webmd.com";
text7 = "Elle Magazine";
link7 = "www.elle.com";
text8 = "Coca-Cola Online";
link8 = "www.coca-cola.com";
text9 = "Pepsi Online";
link9 = "www.pepsi.com";
text10 = "Sony's Website";
link10 = "www.sony.com";
text11 = "The CIA are online too!";
link11 = "www.cia.gov";
text12 = "You want recipes?";
link12 = "www.recipes.com";
text13 = "WIRED magazine";
link13 = "www.wired.com";
text14 = "Reuters-the world's news";
link14 = "www.reuters.com";
text15 = "Disney Online";
link15 = "www.disney.com";
text16 = "Shockwave.com";
link16 = "www.shockwave.com";
text17 = "Some site or other";
link17 = "www.wine.com";
text18 = "Some other site";
link18 = "www.beer.com";
text19 = "Edmonton, Canada";
link19 = "www.edmonton.ab.ca";
text20 = "Canada.com";
link20 = "www.canada.com";
text21 = "Vancouver.com";
link21 = "www.vancouver.bc.ca";
text22 = "Nike";
link22 = "www.nike.com";
text23 = "Levis Jeans";
link23 = "www.levis.com";
text24 = "Visit the Maytag Man!";
link24 = "www.maytag.com";
text25 = "Pampers Parenting Institute";
link25 = "www.pampers.com";
text26 = "Um... www.com exists!";
link26 = "www.www.com";
text27 = "Microsoft Online";
link27 = "www.microsoft.com";
text28 = "Apple Computer";
link28 = "www.apple.com";
text29 = "Bungie's Web Site";
link29 = "www.bungie.com";
text30 = "Download Anything";
link30 = "www.download.com";
text31 = "Corel Online";
link31 = "www.corel.com";
text32 = "The Makers of QuarkXPress";
link32 = "www.quark.com";
text33 = "Adobe's Homepage";
link33 = "www.adobe.com";
text34 = "CBS Broadcasting Online";
link34 = "www.cbs.com/netshow/";
text35 = "MP3 homepage";
link35 = "www.mp3.com";
text36 = "Music Videos";
link36 = "video.launch.com/index.cfm";
text37 = "Universal Studios";
link37 = "www.universalstudios.com/showcase/";
text38 = "Only This is a Test";
link38 = "www.thisisatest.com";
text39 = "Onlinesoaps";
link39 = "www.onlinesoaps.com";
text40 = "Onlinaspirations";
link40 = "www.onlineaspirations.com";

SECOND SCRIPT

// ----------------------------------------------
// How many links?
// ----------------------------------------------
n = 1;
while (length (eval("link" add n))>1) {
n = Number(n)+1;
}
/:total = n-1;
// ----------------------------------------------
// Alphabetical Sort
// ----------------------------------------------
if (/:alphabetize) {
// ----------------------------------------------
// EXPLANATION: we need 2 counters for this sort. (c and d). We start at the first item. We check if it is greater than the one in the position after it. It it is, it's in the wrong place, and we swap the two items. We do this all the way to the end of the list. THEN, we go back and star again, but since we already know the last item in the list is in its correct place now, we don't check that one any more. Each time through the sort, one more item is in its correct place. So we sort through fewer and fewer items. As you can imagine, this leads to Thousands of calculations. Since Flash 4 has a built-in 200,000 limit, we run in to a problem at somewhere over 160 items...
// ----------------------------------------------
c = /:total;
while (Number(c)>1) {
c = c-1;
d = 0;
while (Number(d)<Number(c)) {
d = Number(d)+1;
if (eval("/:text" add d) gt eval("/:text" add (d+1))) {
// perform swap:
temp = eval("/:text" add d);
set("/:text" add d, eval("/:text" add (d+1)));
set("/:text" add (d+1), temp);
temp = eval("/:link" add d);
set("/:link" add d, eval("/:link" add (d+1)));
set("/:link" add (d+1), temp);
}
}
}
}

THIRD SCRIPT


/menu:active_links = /:total add " link(s) in list.";
/:active_links = /:total;
stop();
Attached Files
File Type: zip menu.zip (110.6 KB, 1 views)
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
List navigation and search engine optimization audiohominis Client Side 0 12-26-2008 06:52 AM
Problem with the Active Search List tutorial. georock Flash MX 5 11-01-2005 03:40 AM
Please Review ZapMeta - New Search Engine khn Site Check 6 07-03-2003 09:44 AM
active search list stony Flash 5 Actionscript 1 03-13-2001 11:22 AM
Active Search Tutorial probs' Any Ideas ? Av Flash 5 Actionscript 2 11-18-2000 10:53 PM




All times are GMT. The time now is 05:57 PM.