SWFAddress
- Started
- Last post
- 21 Responses
- ********
Anyone have experience working with SWFAddress in Flash? I've gotten roped into using it on a Flash site that's constructed dynamically from XML, and started wondering if there's any best practices in terms of hooking all this together.
On one hand, it sort of makes sense to begin the code (dynamically constructing the page) by parsing the URL in each section of the site. But wonder to what extent you can really rely on the SWFAddress JS to Flash communication working on a wide range of browsers and devices. Or is there a better solution available now?
- ********0
No one huh? Is Flash finally dead?:)
- dijitaq0
nah... just too hungover to think
- ********0
I know Boz is out there, somewhere...
- boz is more of a platform evangelist though, does he actually use flash?kingsteven
- hahaha...I'm pretty sure he does********
- At least I hope so********
- you never know on here :-Dkingsteven
- squidbrains0
no best practicies. in the case of swfaddress, just update the swfaddress.onchange to manage navigation related events (assuming your navbar (or whatever) button clicks were routed through a centralized handling function.) in other words, your navbar button clicks will come from swfaddress.onchange rather than mynavbutton.onRelease functions. hope that makes sense.
- instrmntl0
HI!
- instrmntl0
altho my config.xml got too long, and my site is going to super dynamic and anyone can update anything via xml, so i'm cutting my config.xml to a config, data, and styles xml. config houses those and flash assets. it's not hidden per se, but will take an extra step to follow.
- instrmntl0
<?xml version="1.0" encoding="UTF-8"?>
<data>
<subloads
mainUrl="flash/swf/Main.swf"
assetsUrl="flash/swf/MainAssets.swf"
stylesURL="flash/xml/styles.xml"
contentURL="flash/xml/content.xml"
vignetteURL="flash/images/vignette.jpg"
/>
</data>- doh, i need to standardize my naming convention. well, u can see what i added because of it.instrmntl
- ********0
Yeah I am working on something similar in terms of trying to make everything dynamic. So probably best would be to read in the XML files upon page/SWF initialization and then check the URL segment, match that to an array of URLs, and route the user accordingly. Am I on the right track?:)
- ********0
And of course reroute upon hash tag URL change or button being clicked.
- For some reason I feel like this would all be easier if I was really high.********
- For some reason I feel like this would all be easier if I was really high.
- instrmntl0
so, pass the xml through flash parameters. also, have the path as a const just in case that fails. from there, load the xml, parse it, make ur model to store eveything, then build ur site.
Here's my Shell.as
- ********0
Thanks instrumntl, this gives me some things to consider.
- By which I mean, I'm going to rip every last bit of your code********
- JUST KIDDING. I wouldn't do that.********
- Seriously though, nice work. Love the grid integration:)********
- I might rip that part********
- Dude, go for it. I made a grid, in which my nav conforms to it. you can turn it on and off thru the xml for visuals.instrmntl
- By which I mean, I'm going to rip every last bit of your code
- ********0
Have you ever tried hooking Flash up to a CMS? I was thinking with the modular aspect it would interesting to throw together something with Python or PHP to write to the XML.
- I've created full CMSs in Flash, using PHP to write the flash compiled xml to a database...kingsteven
- then populating the front end with the xml (with deep linking) ...kingsteven
- i guess it depends how much they're paying, i wouldn't do it again for what i charged... :)kingsteven
- Ah...see this would amount to an extension of the current project.********
- If I can sell them on it, that is. I've been messing with EE and Django for the past while so it should be pretty easy really.********
- well, this was 2007 and the client still loves the CMS so it worked out... but it suited the job...kingsteven
- i've never been able to use the CMS as portfolio though!kingsteven
- Sounds rad kingsteven.instrmntl
- instrmntl0
<grid
totalColumns="6"
totalRows="1"
gutterWidth="10"
gutterHeight="10"
topMargin="0"
rightMargin="0"
bottomMargin="0"
leftMargin="0"
workNavItemHeight="220"
padding="4"
fillColor="0x12a1fc"
lineColor="0x000000"
gridAlpha=".25"
isVisible="false"
/>- Nice bro, nice.********
- I'm not done yet, bt everything is customizable thru xmlinstrmntl
- http://jasontighe.co…instrmntl
- tighe shit!********
- Haha, yeah. It's an uncompleted Death Star at the moment. At some point it will graduate to my homepage.instrmntl
- This is before splitting the xml, but fuck with it and u can see how I'm using it for values.
http://jasontighe.co…instrmntl
- Nice bro, nice.
- kingsteven0
instrmntl, are you setting a grid independently of the content there? or what's the craic.
- instrmntl0
I'm making a grid and the work menu sets to it. If you change the total columns, the work menu items will adjust. eventually the project pages will to, but for now theyre hard coded in the xml.
- Ideally I wanted to make a dynamic grid that would change when the stage changed, and the content would adhere.instrmntl
- instrmntl0
My problem was I didnt have a design for anythign, but needed to build something. I kept designing shit, then changing it, and finally realized I needed to at least make something and design it later. Thats the reason why pretty much every text etc is customizable thru the xml. Usually you'd wouldn't do to this extent. I zipped up my deliverables, so if you change the vaules in the xml, you'll see what it does. The xml is too big tho, so I cut it up, but that portion is local and I haven't coded it in yet. The zip is the all in one config.xml xml.
- ********0
I'm the same way, I can't help trying to modularize and abstract as much as possible. Until there is nothing left:)
I really like the Flash grid idea. So I guess each movieclip would just have column and row properties which could then be adjusted via the overall structure?
- until you try to implement typographic grids dynamically... then you're fucked.kingsteven
- Could you keep checking the textHeight, so that if theres too much text, you go down a pt size and recheck? Rinse repeat.instrmntl
- been there :) it's all well for column-splitting and TDR style labeling...kingsteven
- wordinstrmntl
- kingsteven0
ah, i've never had the frequency of flash work to warrant putting something like this together. nice.
- instrmntl0
Yeah, Initially I wanted everything. to be fullscreen, with the same grid. If would adjust on scale, and if it scaled too small, it would keep subtracting columns. Maybe later I'll get to it. I'm a designer too and always love grids, so it just seemed right. It's fun to turn it on and off. Also, I was going to make a column amount attribute, so, first, say for a textfield, it would check if theres a column span amount. If so, it make it that wide. Then, it'd check for a width value. If both weren't there, it'd default to one column width.