Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Flash 5 question

Flash 5 question
Thread Tools
Junior Member
Join Date: Aug 2002
Location: boston
Status: Offline
Reply With Quote
May 3, 2004, 01:56 PM
 
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
Reply With Quote
May 4, 2004, 05:05 AM
 
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
Reply With Quote
May 4, 2004, 10:04 AM
 
thanks, I'll give that a try.
     
Junior Member
Join Date: Aug 2002
Location: boston
Status: Offline
Reply With Quote
May 5, 2004, 01:34 PM
 
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
Reply With Quote
May 6, 2004, 04:39 AM
 
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
Reply With Quote
May 6, 2004, 10:10 AM
 
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
Reply With Quote
May 6, 2004, 10:26 AM
 
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
Reply With Quote
May 8, 2004, 09:24 PM
 
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
Reply With Quote
May 9, 2004, 04:45 AM
 
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
Reply With Quote
May 10, 2004, 08:58 PM
 
on the up button:
your text box.scroll--;

on the down button:
your text box.scroll++;
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:28 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2