Arrays Not Formatting Data - Smart Clip
I have a drop down menu smart clip that I need to populate with data from a product database. I can get the data fine, using ASP like this -
Code: <!-- #include file="includes/db.asp" --> <% dim rs, StrNewsResults, StrNewsTitleResults dim StrNewsID, StrNewsTitle set rs = conn.execute("SELECT newsid, title FROM news") While not rs.EOF StrNewsResults = StrNewsResults & """" & rs("newsid") & """," StrNewsTitleResults = StrNEwsTitleResults & """" & rs("title") & """," rs.movenext wend rs.close set rs = nothing
StrNewsResults = LEFT(StrNewsResults, LEN(StrNewsResults) -1) StrNewsTitleResults = LEFT(StrNewsTitleResults, LEN(StrNewsTitleResults) -1)
response.write "NewsID=" & StrNewsResults & "&NewsTitle=" & StrNewsTitleResults
%> Problem is, the data in flash isnt formating as an array, and keeps displaying as one big string -
"1","2","3","4"
Has anyone had any experience using the menu smart clip and populated it with external data? Let me know if you have any insight
- Brad
The code I'm using in flash is this -
[code] loadVariables ("test.asp", _level0.list);
onClipEvent (load) {
menuArray = new Array(_root.NewsID); this.items = menuArray;
function onMenu (item, label) { labelArray = new Array(_root.NewsTitle); val = labelArray[item]; _root.list.gotoAndStop(val); }
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-17-2001, 12:23 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Smart Clip Arrays
Hi All, or anyone.
Does anyone know if I can create a multi dimensional array for a smart clip.
I know how to do it on the movie clip with the onload but I want to try and get all the setup for the clip into a smart clip.
I know you can select values as Arrays but can you then include an array of these arrays in the clip setup window??
Thanks for any help.
Sorry I'f I'm not very clear.
Slarti
Is It Possible To Pass Arrays From Smart Clips?
I'm using a smart clip to gather data (name, tele #, etc...) into an array. I have it all bundled up neatly in a series of nested arrays all in one array. What I'm having trouble with it getting the variable holding the array to pass it to the main clip from the smart clip. I'm using the _root.xch variable to hold all the variables I'm passing, and they all pass except the array. Help!
Getting Arrays Together And Formatting Datestamp
Hi,
I've successfully loaded my xml and created three arrays to hold the news article date, title and text, using the following code:
[HTML]var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
if (success) {
publishNews(my_xml);
}
};
function publishNews(xml_doc) {
var newsdate = new Array();
var newstitle = new Array();
var newstext = new Array();
for (var n = 0; n<xml_doc.firstChild.childNodes.length; n++) {
newstext.push(xml_doc.firstChild.childNodes[n].firstChild.firstChild);
newstitle.push(xml_doc.firstChild.childNodes[n].firstChild.nextSibling.firstChild);
newsdate.push(xml_doc.firstChild.childNodes[n].firstChild.nextSibling.nextSibling.firstChild);
}
}
my_xml.load("http://217.174.252.10/sqlbank/methods.asmx/GetNewsData");
stop();[/HTML]
Here is my xml:
<NewDataSet>
<Table>
<pg_data>Lorem ipsum dolor sit amet</pg_data>
<pg_title>test title 1</pg_title>
<pg_timestamp>2005-10-20T00:00:00.0000000+01:00</pg_timestamp>
</Table>
<Table>
<pg_data>this is another news article</pg_data>
<pg_title>test title 2</pg_title>
<pg_timestamp>2005-10-21T00:00:00.0000000+01:00</pg_timestamp>
</Table>
</NewDataSet>
How do I firstly get my arrays into a textfield with the format date,<br> title,<br> story, and secondly how do I deal with that horrible datestamp to make a recognisable uk date?
Thanks in advance
P.
SMART CLIP
Hi
I have a smartclip with params. One of my param is a list type withe 5 values and i would like to select the value when i click in a button
How can i choose the value of a smartclip param from a button action ??
Thanks
Using A Smart Clip And Would Like Some Help
I have never used a smart clip before, but I think what i am looking to do would call for it. If anyone could take the time and kind of walk me through this, thanks in advance...
I have a timeline with about 40 buttons. I have not yet made them buttons, because i think i can use a smart clip instead? They are basically squares with the years date inside, for example 1990, 1991 etc.
I made another MC named "yearinfo" and on each frame is the info i would like to show up when the appropriate button is pressed.
My question is how would i use a smart clip to have the appropriate year info appear when that years button is pressed?
jhb
Smart Clip Help Plz
can some please tell me how i make a smart clip button that will jump to certain frame on main timeline to - the frame being the variable.
thanks in advance
Smart Clip?
Hi,
Is there any way I can put a variable name insted of the value in the clip parameters?
Thanks
Smart Clip
Im not to good at smart clips but i am trying to make 1 animation lets say like a door that will close, but i want to be able to drag the clip to the timeline and give it its own action script. I cant doit it now or it will chg the action script in all the duplicates of it. Does anyone know how to set this up as a smart clip? I have no idea how to set it up for a task like that. Thanks in advance..
nurv
Smart Clip?
ok first off i have a solution to my problem, but not a good one, basically i have a mc and inside the mc are a button and a text varible.
on the main time line i have 6 instances of this same button. now every thing works, the varibles load the relevent menu title in the relevent button. As it is the same button repeated i have a small file size. problem is how do i program each button indiviually. i though i could dulicate the mc 6 times for each link and the program the button in side of each diffierently, but this seems kida mes. i was wondering if any one out the could think of an alternative. i thought smart clips might be of some use but i havent a clue if and how they would work.
any ideas guys.
Smart Clip Help
i imported a "pause" smart clip to a movie i made recently
the smart clip is a button that pauses the movie and resumes it when clicked.
The pause function works fine but when i click to resume play i get this error message.
Target not found: Target="_root" Base="_level0.instance3"
I have nfi whether the target is a scene or what and wtf is a Base?
cmon gurus help me out here please
What Does Smart Clip Do?
Could anybody explain what smartclip does and what is the most common use of it other then preloaders?
Smart Clip
Hello,
I am trying to use some smart clip with the flash manager extension, everytime I want to install a smart clip menu, the extension manager pop up a message wich says tha flash mx does not support smart clip extension. Can somebody please help me?
Smart Clip Help
Hey i used this tutorial on smart clips for navigation but it didn't quite finish what i needed.
http://www.kirupa.com/developer/mx2...martclipnav.htm
Its a great tutorial but it doesn't tell you how you can like the buttons independantly to seperate scenes or external swf's. If someone can help me on this one i would really appricate it.
Thanks
Smart Clip Help
Hey i used this tutorial on smart clips for navigation but it didn't quite finish what i needed.
http://www.kirupa.com/developer/mx2...martclipnav.htm
Its a great tutorial but it doesn't tell you how you can like the buttons independantly to seperate scenes or external swf's. If someone can help me on this one i would really appricate it.
Thanks
Formatting XML Data
Whats the best way to format xml fields?
If I want a tag to be a heading for example, how should I go about this?
Code:
<month>January</month>
Do I do this inline:
Code:
my_txt.htmlText += myXML.childNodes[i].childNodes[i].childNodes[i];
or is there a way to apply styles to it to make it easier?
Thanks
Rich
Formatting Xml Data
Can anyone tell me how to format xml data and bring it into flash. I'm using Flash MX.
The code on frame 1 is:-
var newsXML = new XML();
newsXML.ignoreWhite = true;
newsXML.load("news.xml");
newsXML.onLoad = checkLoading;
function checkLoading (success) {
if (success == true)
gotoAndPlay(2);
}
The code on frame 2 is:-
stop();
dt.text = newsXML.firstChild.firstChild.firstChild.nodeValue;
The XML data is:-
<News>
<textbox1>This is some text</textbox1>
<textbox1>This is some more text</textbox1>
</News>
This loads "This is some text" into Flash. How do I format it using:-
font-family Verdana, Arial, Helvetica, sans-serif
font size 3
If someone could help, I would very much appreciate it.
Thanks in advance
Smart Clip And Clip's Name As Parameter ?
First excuse my english, i not so good....
I am really disappointed, i thought smart clip was so powerful but i realise it is impossible to use a parameter as a target...
My smart clip should control any other clip on the scene with the clip's name as parameter.
But it doesn't work.
For exemple if the parameter's name is myClip, it seems to be impossible to write something like this in the smart clip:
_parent.myClip._y = 45;
I think the reason is that myClip is a string (the default type parameter) and you probably can not put a string into a target.
I would be so glad if you said, it ok, there is a solution...
Thank U for help.
j
Smart Clip Parameters
I wonder if it is possible to set the value of a smart clip parameter with action script.
Let's say I duplicate a smart clip with a parameter called "loop". The new mc is called newmc. How can I set the loop value of newmc ?
I tried the following code but it doesn't work;
duplicateMovieClip (_root.mc, "newmc", 2);
newmc.loop=true;
Any help will be much appreciated. Thanks.
Smart Clip Trouble
Hiya all
I am making a smart clip with many properties, the problem I have is that when declaring clip parameters during design time, if I have a boolean that I want to give the value false, it treats false as a string "false" and not the value false. How can I get around this??
Cheers
Why Won't The Smart Clip Listen To Me?
Hello,
I have just started working with two separate smartclips in my movie. Now, I have two separate problems!
ONE : Using the 'easy popup window' smartclip, i managed
to get the popup window generated. to test the popup,
i entered a simple website address. then, i saved, published, and found a working popup (to my delight). next, i went to change the parameters, particularly the URL, to my own movie settings.
to my dismay, upon saving and publishing, the .swf only seems to contain the original parameter settings. the old parameter settings remain even when i change the URL to one i KNOW is valid. the new settings show up when i load the .fla file, but they do not seem to be active.
unchecking 'lock in instance' had no effect (though i am not sure its actual purpose).
does anyone know why the changed parameters do not become active?
TWO : Duplicating the 'text effects' smart clip, i ran into a similar problem. i wanted to change the parameter 'text' setting in each duplicate to another word string, so as to reuse the text effect. however, only the 'text' parameter of the original smart clip seems to have an effect on the 'text' parameter of ALL the duplicated smart clips.
does anyone know how to override this power of the original smart clip?
To me, these smart clips don't seem very smart.
thx,
Emceedeus
Accessing Value Of Smart Clip
This is kind of a repost. I did some testing and have made a little progress when using smartclips as form elements.
My goal is to create a smartclip Yes or No radio button. Assuming this works, I'm going to create a few more common form elements for use.
I want the value of my smart clip to get sent with a form. I thought that it might be good to set a global variable equal to the property of my smartclip every time someone releases the mouse button. Unfortunately, the value that is returned is always the default value.
If you go to http://www.bearfruit.org/flash/ you can see it and download the fla file. Clicking yes or no works just fine, but doing a trace("this.State") always returns the same thing. If you set the default value to Yes, it always says yes, if the default is no, it always says no.
I figured I could create an action in the clip that sets a global variable, but the problem is that I want to be able to use several of these on the same page.
I wondered if it's possible to send a second parameter to the smartclip that defines what global variable to use for storing the value. I could eval() it and set it in each named frame (yes or no).
What do you think?
Scroller Smart Clip
Hello,
I have a deadline coming up & I need some helpful guidance please... I have downloaded a smartclip from the web to use within my Flash website. Once I click on clip parameters, I need to set the DataURL to the path to external text file to pull info into the smartclip scroller. I am not sure how to type the relative path to my external text file. I have placed the text file in the same folder as my .fla. I think the path involves _root or something but not sure. If someone knows the correct format for typing the relative path to my text file to pull my data into my scroller, please let me know. Greatly appreciated!
Waht Is A Smart Clip?
I don't understand macromedia's explination. And I couldn't find an explination here at FK.
Can I use external files to make dynamic content with in flash with a smartclip?
What are some general examples of it's use?
Checkbox Smart Clip
I am trying to use the checkbox smart clip. But whatever I do, the user input doesnot get transmitted to the email. I have checked my asp code. Any suggestions? I followed the instructions on how to use the checkbox from Macromedia's site. Any help will be appreciated. Thanks a lot.
HELP With IKPreloader Smart Clip...
Hi,
I need your help please. I'm designing an e-card for my client's company (national). I'm using the IKPreloader smart clip by Ian Kelleigh (email: TheFHSource@home.com). I got his smart clip from Macromedia Exchange. Apparently, Ian's email address has been changed. Hopefully, Ian will show up here and help me... If not, I hope one of the actionscript-gurus can help me right away.
I changed Ian's animation to mine. I think I got the smart clip working, but when I check the streaming status at 28.8 baud, the percentage and the bar does not load until they show up at 78%. I would like to have percentage and the bar progress as soon as the Preload animation shows up and then go to the main scene. I am actionscript-shy. Can you help me?
Thank you,
Leigh-Anne
Smart Clip Custom UI
Hi
I was creating a smartclip ,and I made a Custom UI for it.
I linked the custom UI to it and when I selected the smartclip the Custom UI appeared allright ,then i wanted to test the movie , Flash crashed !!
Also when i tryed the FLA again,selected the smartclip,deselected it and then selected it again ,the same happens Flash crashes.
I don't know where the problem is ,but I know that i did Custom UIs before and they worked fine.
Has anyone saw something like that before?
Please tell me how to solve/prevent this?
thanx
Smart Clip Help Needed
Hi;
It's been a long week and I'm drawing a blank with what should be a very simple problem.
I'm using the sample menu smart clip that comes with Flash 5. I've changed the menu options to "Parts Set 1" Parts Set 2" and Parts Set 3" to test it. I want the movie to jump to labeled frames "tools1", "tools2" or "tools3" depending on which menu option is chosen.
I'm confused (big surprise) about *where* exactly I put the gotoAndStop(framelabel) code.
It's the first time I've used smart clips, and obviously they're smarter than I am. ;-)
Do I attach an actionscript to the smart clip?
The description for the smart clip even gives some coding hints, but it would really help if someone could either break it down very simply or point me to a URL that might fill in my blanks.
I know it's as obvious as can be, but I'm drawing a blank (par for the day, I'm afraid).
Bear with me; it's been a really, really long week. ;-)
-- Walt:confused;
Problem With Smart Clip
im using a smart clip to create popup windows, but i want to use diffrent buttons to open diffrent windows, when i change the code on a button it changes all of them, and im using a tell target to display the names of the diffrent buttons.
how can i sort this
Help With Smart Clip Buttons
Greetings
I am trying to make some buttons kinda like the ones in this tutorial:
http://www.flashkit.com/tutorials/Ac...83/more2.shtml
The difference is I want my smart buttons to jump to a labeled frame.
This is what I'm using:
on (release) {
gotoAndStop (frame);
}
but it doenst seem to work. Any ideas?
Thanks
Bapha
Door Smart Clip
just trying to find out if there is a way to make a door animation a smart clip.
Example:
U have 5 buttons, u want the same transition to each button (therefore 1 door animation movieclip), which will be loaded in sep. swf files. Is there a way to "call" the smart clip to go to the specified area?
What im trying to accomplish is the effect that most sites have, mainley 2a. when u click the buttons their tween moves on top of the background, then loads the next option. Hard to explain. Anyone?
nurv
Scroll Box Smart Clip?
Does anyone know wher ei can find a flash 4 scroll box smart clip?
any help appreciated.
thanks
Smart Clip Problem
Hi,
It's just a small problem though
I made a SmartClip that functions like a button with a caption. This all works fine, but there's one little glitch : It's generally a list starting with 1, going on till 10. For the first item I want it to start with 01 instead of just 1. Now, Flash interprets this as being 0.
I tried to put a period in front of it, but then it's interpreting as 0.01 ... Is there a way around this ?
Thanx in advance !
SMART CLIP MENU URL
How can I add URL in these cmart clip menus
using external text file stuff like this
http://www.macromedia.com/support/fl...p_ext_data.htm
[Edited by carface1980 on 06-20-2002 at 07:41 PM]
Smart Clip And Componement
smart clip and componement were first created to help people using good flash object, even macomedia created them. That's why macromedia integrated the manager extension.
A word of advice:
Conponement and smart clip are today both use in flash mx . go and see macromedia flash exchange.
Smart Clip And Databases
Howdy Folks,
I'm building a listing that displays content being pulled from a database (thanks to those who pointed me to the CF article that helpeed me solve the puzzle). My content is being displayed using a dynamic text field nested inside a movie clip. Is there a way for me to created a "smart clip" that can check see if there's data in the database and duplicate itself and display it below an existing movie clip?
Thanks in advance
123
Adapting Smart Clip
I have implemented smart clips as explained in the following tutorial
http://www.kirupa.com/developer/mx20...artclipnav.htm
I need to adapt the components so they display in the language the user has chosen. (meaning enlisch/german)
since the text boxes are within the component I am not sure if this is possible.
Any advice if this is possible with smart clips would be really helpful.
'windows' Smart Clip
Check this :
www.byngdesigns.co.uk/tek-tips/windows.html
www.byngdesigns.co.uk/tek-tips/windows.fla
it even changes the focus to the selected window!
Regards
David Byng
www.byngdesigns.co.uk
davidbyng@hotmail.com
while (Me < Drunk) {
Beer++
}
Help How Do I Unload A Smart Clip?
I have a flash movie that loads a smartclip in frame one of scene one. The smartclip has a volume up/down & off button, and it plays a song. At scene 2 of my movie, I need the vol. up/down & off buttons to be gone, and i need the music to stop. BUT i need the music to fade to a stop not abruptly stop. CAN ANYONE PLEASE HELP ME?
How To Decode Smart Clip
Hey guys, I have a scrolling smart clip and want to see how it was made so I can learn to make my own style of scrolling menus. Is there a way to break it apart so I can see the action script that was involved in making it.
Formatting Data From PHP Script
Hello,
Hope somebady can help me out;
I am trying to build a news page in Flash with data from a
PHP script driven database.
I want the latest news on top, with the older below it.
Is it possible to specify type-settings within flash from
data from a PHP script? There is a header, body and a
date. All have a another color an typesettings.
Also i want the body to have variable length; 2-9 lines.
A new paragraph starts after two empty lines with
date (red), header (blue)... new line body (another font
and color).
I really appreciate any help. Thank you.
FD
Help With Formatting Data In Binding
I have a combo box that i have data going into if i leave it alone i get the all the data listed in the correct order
item1,entry,id,....
item2,entry,id,....
item3,entry,id,....
if i use the formatter and do something like label=title
i get
item1
item1
item1
What have i messed up or what did i miss. Please help me out. Thanks
Formatting External Data
Is there a way to format external data in the text file. IE putting in links to e-mails? The only way that I have found to put links in is through a tutorial on this site, but you have to do it in the flash authoring environment
help on this would be much appreciated.
I also have MX 2004, but would rather use MX because that is what I am currently exporting as, and the Flash 7 plugin isn't widespread enough yet.
thanks
[MX] Calender Formatting Xml Data
Hi all - looking for a bit of help here. Am more stumped than a stumped thing.
I have a calender that dynamically loads text from an associated xml file. This xml file has one field, <menuitem> with a child item within of date=.
This image shows what I'm getting (static):
http://www.betsytaylor.co.uk/kirupa/what_Ive_got.jpg
This image shows what I want to get:
http://www.betsytaylor.co.uk/kirupa/what_I_want.jpg
The difference is the formatting of the displayed text. Does anyone know how I can do this?
Please, please help
Formatting External Data
Is there a way to format external data in the text file. IE putting in links to e-mails? The only way that I have found to put links in is through a tutorial on this site, but you have to do it in the flash authoring environment
help on this would be much appreciated.
I also have MX 2004, but would rather use MX because that is what I am currently exporting as, and the Flash 7 plugin isn't widespread enough yet.
thanks
Smart Clip C.i. Doesn't Work
Hi,
Does anyone have any experience creating a custom interface swf for the smart clip parameters box? Perhaps it is a mac problem? When I made the ci file, following all the instructions regarding the chx clip to a tee, nothing happens when I try to link to it in the default clip parameters box.
Thanks
Slow Smart Clip Text?
Hi all,
I've got a smart clip which, like a content management system, allows user-authors to enter text into pages of the clip. Problem is, the display of the text on each page when flicking through is slow to update. Any suggestions? I thought that as a variable it should be fast....
Smart Clip And Actionscript Question
Hi,
Okay, please try to imagine what I am trying to create:
1. I have a smartclip with a button inside it.
2. This smartclip has 3 parameters: url, caption, and level.
-url: will tell it which .swf file to load
-caption: will display text.
-level: will load the url into a specified level.
My goal is: Have a clean screen, perhaps use a holder MC, or maybe even one smartclip and use duplicatemovie, so that I can generate the 'url', 'caption', and 'level' from the a script. Is this even possible? If so, what do I have to do(use holder, or use duplicatemovie)? And also, what should my code tell Flash to do and how do I do it?
Right now I don't want an example that I can just copy/paste the code into my movie, what I want is to try to understand how it works and write my own code. This is for the benefit of learning, and not just getting the job done. Please help me out yet again.
Riki
|