Flash, flash, flash…
- Started
- Last post
- 33 Responses
- ian
My noggin hurts like a bastard.
Trying to figure out how to do a news box something like this.
http://www.attik.com/main.html
Basically I want to display text from an XML doc in flash with a date, content then a link which will jump to the portfolio section and load a swf.
Any tutorials out there?
I can load the XML ok, display the text but not sure how to get the link displayed. Hmmm.
- milo0
shouldn't be too hard - gotoandlearn & kirupra have some very good xml beginner tute's
- ian0
Hi milo,
I've been on to the kirupa site, learning how to get the XML into the flash movie, that bits ok (kinda!) but its formatting it and adding the interactivity that proving tough.
I have a menu set up already using XML, I could in a pinch just tweak that and reuse but I'd prefer if it could handle different volumes of text like the attik site.
Does that even make sense?
- ian0
A little help here?
- joyride0
if you're getting the text and stuff in, I don't see the problem. The link should just be a variable in the node that you push into the onRelease inside flash. When the onRelease runs. BAM there you go
- ian0
Aye joyride, I can do that if I use the menu I already have. Problem is its a fixed size. So do I just say that, for instance, all news storys must contain 4 lines of text.
I can forsee a problem with run-on etc. There's gotta be a way to make a text field, populate it with as much or little text as it wants and have it linked up so clicking on it loads a movie.
Seems pretty straightforward, but it aint happening!
- shandy0
I find these classes really useful when working with XML and Flash:
Once you've got your XML data into your Flash array/s you can use the link variable as a loadMovie parameter, targeting the movie clip in your portfolio. (Use an onRelease event on your link to fire the function that jumps to the portfolio section and loads your image/content...)
- TrueHell0
to allow for your text to size accordingly to whatever is parsed in from the xml just use the textfield.autosize property. ex. my_txt.autoSize = true and the textfield will adjust to fit the content.
- ian0
Ive found a tute that lets me build the text box with the different headings etc which is fine.
Its using HTML text to attach a 'href'to one of the nodes like so:
content += ""+lead+"
"+body+"
"+more+"";
However, I would like to change it to a load Movie command. Any suggestions?
Can it be done here or do I have to attach a button onto this too with an onRelease? And if so, how do I do that?
- PonyBoy0
argh... ian...
... :)
... stop hard coding, first...
... second... you're going to need to build a 'module' of sorts that Flash will use repetitively... for each new news story.
This module will have a number of conditional statements in it that react to the new data being passed to it from your xml...
... I realize it's confusing... :)... which is why i'm willing to send you the fla to my lousy one-page website...
... it's basically a big news feed.... each 'module' is the same module... just filled w/the data from the xml (which has images, URLs and info)...
As I'm not entirely sure I'm reading you right... take a look at my site: http://www.arcademedia.net ... let me know if you think it'll help and I'll dig it up and post it.
- joyride0
yeah, for loops are your friend in this case. Same mc, just different data pushed into it. Once the data is in it, the internal functions take over to size it, set the links, etc.
Exactly what ponyboy said...
hayley call you yet? I told her you would by her dinner
- PonyBoy0
Exactly what ponyboy said...
hayley call you yet? I told her you would by her dinnerjoyride
(May 22 07, 11:56)
---
... oh shit... I almost forgot...... I need to go wake her!
:D
- joyride0
wake or untie?
;)
- PonyBoy0
....
both? :D
- joyride0
*high five
- PonyBoy0
hahahahaha!!!
- ian0
ok...
after those last couple of posts not sure if I wanna know what that was all about ;)
pony,
first up, Im not hard coding, as that wouldv'e been a bigger pain in the ass. Although at this stage, I would've had the thing done hours ago!
secondly, great site and any help is mucho appreciated!
basically I gone through this tute:
http://www.communitymx.com/conte…and its pretty much what I need, just need to change the href to a go to and a load Movie command.
Don't think Im esplainin' myself too clearly! Cos Ive really confused myself now too.
- ian0
Pony,
http://www.maverick-design.com/
This is exactly the thing Im trying to do, on the news page, scroll down to august and bam! Thats what Im trying to achieve, right below the text (which im assuming is being populated from an XML/TXT file) is a 'view project' link which does exactly what it says on the tin! How the bloody hell do I do that?
- PonyBoy0
hahaha... I could be cocky and say... 'dude... EASY!!'...
... AND I WILL!
DUDE.. EASY!!!!
;D
I'm going to send you those exact files for that news feed on Maverick (he won't care... he didn't exactly... 'pay for it'... :D)...
... check your email in about 10 mins.
- ian0
Then I shall respond with a
DUDE, SWEET!
lovley work by-the-by, not exactly the 'lousy one-page website' I was expecting!
That maverick site is cool, as is the vivify one. See, I can do (as in just about scrape by) some coding but nothing like that...
- PonyBoy0
pffttt... about 2 years ago I was... 'scraping by'....
... it'll come to you. :)
check your email.