Cold Fusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingCold Fusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 15th, 2003, 10:55 AM
whitskay whitskay is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 whitskay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
dynamic text problem!

Ok here is my problem….i have created a banner in flash, I have connected it to a database with cold fusion. Now I have my banner displaying all my dynamic text that you can click on and it will take you to that url. The text is displayed ex. Every 5 seconds there is a new text displayed; now here is what my problem is. I am using an auto number in my database for the newsid field. Say I get to my 4th item in my database that is being displayed; it is the 4th item and has the newsid of 4 as well. Now say I want to display the 5th item, it has the newsid of 9, it would take ex. 12 seconds to display the text because newsid still has to count until it finds item # 5 so it will count 4,5,6,7,8,9 and then it will display it because it has counted to the next newsid. How would I make it so that my flash movie can still receive the information but it doesn’t count the newsid and slow my movie down??? Now another problem is that whatever flashid is set to in the flash movie is how many items it displays, if the flashid is set to 6 (which it is) it will only display items that have a newsid of six and lower….now how can I change this without changing the database which pretty much can not be changed? This is still part of problem one and with figuring out problem one problem 2 should be simple.
Ok so when my movie is complete this is what I am trying to achieve. I would like to have a movie that displays text every 5 seconds with no breaks in between text that loops forever.

Here is my cold fusion code: and I will give you my code on my flash movie. I have also attached a SWF file and my database.


COLDFUSION CODE:


code:--------------------------------------------------------------------------------
<cfsetting enablecfoutputonly="Yes">

<cfquery name="ListResults" datasource="whats_new">
SELECT *
FROM Newsitems
WHERE appletflag = 1 AND newsid=#form.flashid#

<cfoutput query="ListResults">
<align="center">&title=<a href="#ListResults.url#" target="_new">#title#</a>&url=#url#

loaded=1
</cfoutput>
--------------------------------------------------------------------------------


FLASH CODE:


FRAME ONE

flashid = 1;


FRAME TWO

loadVariablesNum ("query.cfm", 0, "POST");

FRAME FOUR
if (loaded=="1") {
play();
} else {
gotoAndPlay(4);
}


THE LAST FRAME

loaded = 0;
flashid=flashid+1;
if ( flashid==6 ) {
stop();
} else {
gotoAndPlay (2);
}

PLEASE HELP!

Thank you so much for ALL your help! It is greatly appreciated!

Reply With Quote
  #2  
Old October 17th, 2003, 01:11 PM
d0rk d0rk is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 2 d0rk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hrmm...

i don't know much about the flash part...

i'm guessing you just have infinite loop in the flash that calls the cf page.

here's how i would approach it..

i would add another query to the cf code.

select newsid
from newsitems
where appletflag = 1;
order by newsid
(or is it sort by? might want to look into caching this query if it's a problem)


from this you should have all the newsids ordered.
now create a list or an array out of this.


then you want to avoid ur 2nd problem:

<cfset index = form.flashid mod (queryabove.recordcount+1)>
it should cycle once it hits the last record

modify existing query:

SELECT *
FROM Newsitems
WHERE appletflag = 1 AND newsid=#listgetat(index,listcreatedfromquery)#


there's probably alot syntax errors etc.. but as long as you get the idea.


let me know how it goes

Reply With Quote
  #3  
Old October 17th, 2003, 01:21 PM
d0rk d0rk is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 2 d0rk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
actually u can avoid coverting it to another list or array...

since it's already an array

queryfromabouve.newsid[index]

or somthing like that

Reply With Quote
  #4  
Old October 20th, 2003, 02:51 PM
whitskay whitskay is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 whitskay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hey Dork, thank you so much for your reply! I was just hoping that you would be able to explain to me in a little more detail if you wouldnt mind it would be greatly appreciated!


thanks ,

Karyn

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > dynamic text problem!


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap