Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / June 2005



Tip: Looking for answers? Try searching our database.

xml display issue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
billburg - 23 Jun 2005 00:41 GMT
I have a problem with XML data not displaying when the flash playhead goes
backward in the timeline. Is this a bug or is there something that needs to be
set or scripted to make sure this works correctly? Either way, can anyone
suggest a workaround?

Here is the situation, for the most part it is very simple:
-The flash file is one scene with different sections, the user clicks a button
to go to a specific frame in the timeline to see different info, etc.
-There is one static XML file with all data, all Flash has to do is receive
the data and display it.
-Flash uses the XML component and all data is diplayed by using a text area
component.
-There are multiple text areas to each display a certain node from the XML
file, the user navigates to whatever area to view whichever block of text.
-(Since it seems that XML components need to start at the first frame, I
experimented with different approaches and finally settled on using layer masks
to hide all text areas except for the desired one for each area of the timeline)
-I doublechecked all of the settings for each object, and the first frame has
the this.main.trigger(); script

It seems to work fine, but only if you navigate in order of where each section
appears on the timeline. (If you click on a button to view a section at frame
10, then navigate to the section at frame 20, etc. everything shows up fine. If
you click on the button to go back to the section at frame 10, then the field
is empty and everywhere else you go from that point is empty as well.) It seems
like somehow going backwards makes flash forget all of the XML data. I tried
making the data reload at each desired frame by inserting this.main.trigger();
but that had no effect.

Other notes: This is using Flash Pro and the current version of flash player.
I tried doing test movies as well as publishing full projectors. I have tried
publishing for different versions of flash, actionscript, etc. all with same
results.

Does anyone have any ideas? Thanks.
LuigiL - 23 Jun 2005 15:50 GMT
Well, without seeing any code, it's difficult to say where the error is. But
using layer masks is probably not the best way to go since the components offer
options to do this more efficiently. How did you bind the data? Code or
visually? Do the text area components all have unique instance names? If you
can post your fla or attach code I might be able to help you.
billburg - 24 Jun 2005 21:11 GMT
There isn't any special code, it is all done using the built-in xml components,
with different text areas on different layers. The tutorial for the Bike Trips
here served as a model, except without the pull down options menu:
http://www.macromedia.com/devnet/mx/flash/articles/xmlconnector.html

Like I said, everything works fine with the masks, etc. as long as you don't
go backwards. If there is a better way to do it I would be open to suggestions.
billburg - 24 Jun 2005 21:13 GMT
A follow up:
Should there be more than 1 XML compnent in the Timeline? Just a thought but it seems unnecessary since there is only 1 XML source.

Thanks...
LuigiL - 25 Jun 2005 10:44 GMT
Once you load the xml the data is available throughout the movie by accessing
the created xml-object (moving forward works as expected). My guess is that the
layer masks are the problem. Unfortunately I didn't use layer masks that much
so I can't identify the problem (if any). I recently finished a company
presentation which required going backwards too. I used the XML class.
Basically, I used a text field and attached it dynamically and filled it by
running a function and passing it the correct node in the XML-file. Moving
backward involved 'clearing memory' by removing the text field and setting the
content to empty and running the function again - meaning, to Flash you are not
returning to a previous frame but you're there for the first time.

How to identify the problem or an alternative approach:
Well, since this involves 'visibility' I would try to achieve the same effect
by using the visible property of the text area component. Copy your fla and
save it with a new name. Initialize all Text Area Components as invisible:
myTextAreaA.visible=false; on frame 1 of the fla in your layer 'code'. Remove
the layer masks and attach actions on the frames where you need the changes in
visibility: myTextAreaB.visible=true;
And let's see what happens then.
billburg - 25 Jun 2005 21:27 GMT
Damn, that seems to work fine now. I wasn't aware of the visibility option and
that did make things much simpler. Before using masks I had also tried just
covering up text areas with the layers above it but that had the same problem.
Thanks for your help!
LuigiL - 26 Jun 2005 10:17 GMT
You're welcome. Good luck!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.