|
|
Flash 5 question
|
|
|
|
Junior Member
Join Date: Aug 2002
Location: boston
Status:
Offline
|
|
I'm building a site in Flash 5, and I would like to link to a second .swf, but I would like to go to a specific scene/frame.
Is this possible? I couldn't figure out how to do this with loadMovie
|
|
|
|
|
|
|
|
|
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status:
Offline
|
|
I think this would work in flash5
in the main movie, on the main timeline:
Code:
loadMovieNum("whatever.swf",50);
_level50.gotoAndStop("SCENE",1);
Let us know if it works
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Aug 2002
Location: boston
Status:
Offline
|
|
thanks, I'll give that a try.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Aug 2002
Location: boston
Status:
Offline
|
|
I tried that code, but it didn't work. It just went to the beginning of the current .swf
Any other ideas?
|
|
|
|
|
|
|
|
|
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status:
Offline
|
|
weird. I use this code a lot. Try this:
in the main flash file
Code:
loadMovieNum("whatever.swf",50);
_level50.doStuff();
in the whatever.swf, on the main timeline:
Code:
function doStuff() {
gotoAndStop("SCENE",1);
}
this should definitely work!
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Aug 2002
Location: boston
Status:
Offline
|
|
thanks derbs, I appreciate the help.
I have one more quick question.
I have a simple xml file:
<item>
<date>4.22</date>
<news>text here</news>
</item>
How can I parse out the date and text so I can put them in a text box?
|
|
|
|
|
|
|
|
|
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status:
Offline
|
|
The flash XML parser is pretty complicated. Here goes
Code:
newsXML = new XML();
//make sure your file is in the same directory as the swf
newsXML.load("myxml.xml");
newsXML.onLoad = doParse;
newsXML.ignoreWhite = true;
function doParse() {
mainNode = newsXML.firstChild;
mainName = mainNode.nodeName;
newsNodes = mainNode.childNodes;
//this variable returns the date
dateText = newsNodes[0].childNodes[0].nodeValue;
//this variable returns the news text
newsText = newsNodes[1].childNodes[0].nodeValue;
//now fill your textboxes
textbox1.text=dateText;
textbox2.text=newsText;
}
If you have lots of news, you could use a for loop. I used a similar one on the news-ticker at www.webis.net. Let me know if you need help with that
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Aug 2002
Location: boston
Status:
Offline
|
|
thanks! got the xml to load ok.
Is there an easy way to get the text box to scroll using up/down buttons?
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
Originally posted by mr breaker:
Is there an easy way to get the text box to scroll using up/down buttons?
Upgrade to Flash MX.
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2002
Status:
Offline
|
|
on the up button:
your text box.scroll--;
on the down button:
your text box.scroll++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|