\n<cfset x = 1>
\n<cfoutput query=\"qDates\" maxrows=\"5\">
\n&eventDate#x#=#DateFormat(qDates.EventDate,'dd mmm')#
\n&eventTitle#x#=#qDates.Subject#
\n&eventTime#x#=#TimeFormat(qDates.Time,'HH:mm')#
\n<cfset x = x+1><\/cfoutput>
\n<\/code><\/p>\nThe qDates query is the one that queries the database in order to pull the events I want. The maxrows attribute is how many events to return. If I only wanted three, I would change the \u00e2\u20ac\u01535\u00e2\u20ac\u009d to \u00e2\u20ac\u01533\u00e2\u20ac\u009d.<\/p>\n
What the above code does is creates a very long variable line that includes the date, title and time of five events.<\/p>\n
Now, we switch gears into ActionScript.<\/p>\n
I took the ActionScript on the container movie clip in Dennis\u00e2\u20ac\u2122 example and modified it to run another loop.<\/p>\n
onClipEvent(data) {
\n\ttotal = \"\";
\n\tfor(i=1; i<6; i++) {
\n\t\teventDate = eval(\"eventDate\" + i);
\n\t\teventTitle= eval(\"eventTitle\" + i);
\n\t\teventTime = eval(\"eventTime\" + i);
\n\t\ttotal += eventDate + \" - \" + eventTitle + \", \" + eventTime;
\n\t}
\n}<\/code><\/p>\nYou will also noticed that I assign the variables to the container clip instead of the root. In addition, I needed to evaluate the three variables because of the addition of the use of the loop\u00e2\u20ac\u2122s index variable. If I had left it as eventDate = \"eventDate\" + i;<\/code> for example, it would not have recognised \"eventDate\" + i<\/code> as a variable.<\/p>\nFinally, I set the variable on my text field to be _root.mContainer.total<\/code> so that it will import the values from the container\u00e2\u20ac\u2122s (in my case, I renamed container to mContainer) variables.<\/p>\nThere you go, a simple way to import multiple records from a database into Flash.<\/p>\n","protected":false},"excerpt":{"rendered":"
Dennis\u00e2\u20ac\u2122 solution was exactly what I needed. Well, actually, not quite what I needed. His solution worked for getting the data from the database and importing it to Flash. That was the biggest hurdle. What it did not do was allow for importing separate records. So I modified it.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[1],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4NkW7-l","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/siever.ca\/kim\/wp-json\/wp\/v2\/posts\/21"}],"collection":[{"href":"https:\/\/siever.ca\/kim\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/siever.ca\/kim\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/siever.ca\/kim\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/siever.ca\/kim\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":0,"href":"https:\/\/siever.ca\/kim\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"wp:attachment":[{"href":"https:\/\/siever.ca\/kim\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/siever.ca\/kim\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/siever.ca\/kim\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}