Any snippet that can type all that ugly code for me? I tried dragging the .swf into my html like you do with images but that just wrote some *really* ugly code (binary data). Do I actually have to fire up - gag - cough - choke - Dreamweaver to do this?
Sean
:::: DataFly.Net :::: Complete Web Services http://www.datafly.net
On 29/6/2006, at 2:54, Sean Schertell wrote:
Any snippet that can type all that ugly code for me? I tried dragging the .swf into my html like you do with images but that just wrote some *really* ugly code (binary data). Do I actually have to fire up - gag - cough - choke - Dreamweaver to do this?
Image dragging etc. for HTML files are handled using drag commands:
http://macromates.com/textmate/manual/drag_commands
You can setup one to insert whatever code is required when dragging in an .swf file.
Thanks for your reply Allan!
Are there plans to implement .swf insertion natively in future? I love the fact that TM allows me to add new functionality but it would be nice if some of the basic things were built-in. For example:
- Shortcut based image tag insertion (browse to file, auto inserts height/width) - Same as above but for Flash / Quicktime / etc - A shortcut based built-in color-picker. When editing style sheets, I'd like to choose my color from a palette.
These things are pretty standard fare for most code editors no? Just wondering if they'll eventually become native to TM too.
Sean
On Jun 29, 2006, at 10:04 AM, Allan Odgaard wrote:
On 29/6/2006, at 2:54, Sean Schertell wrote:
Any snippet that can type all that ugly code for me? I tried dragging the .swf into my html like you do with images but that just wrote some *really* ugly code (binary data). Do I actually have to fire up - gag - cough - choke - Dreamweaver to do this?
Image dragging etc. for HTML files are handled using drag commands:
http://macromates.com/textmate/manual/drag_commands
You can setup one to insert whatever code is required when dragging in an .swf file.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
:::: DataFly.Net :::: Complete Web Services http://www.datafly.net
On 29/6/2006, at 4:00, Sean Schertell wrote:
Are there plans to implement .swf insertion natively in future?
When you put it like that, no, I presently have no plans of doing that.
As for language specific features, these are not native, but stored in language specific bundles -- I generally only collect contributions for these bundles, as I don’t know the first thing about flash development, how to extract dimensions from a swf file, or let alone how the tag to insert needs to look.
Coincidentally I do believe that I know how a QuickTime tag needs to look, as there is already an Insert Movie snippet, and I see that I can query QuickTime Player for movie dimensions, so here is a drag command for dropping a .mov file into your HTML document:
Just double click it to install -- this will also show the source of the command.
If this is useful, I can add it to the HTML bundle.
I love the fact that TM allows me to add new functionality but it would be nice if some of the basic things were built-in.
TextMate ships with more than a thousand bundle items -- so I do think some of the basic things are in fact “built-in.”
- Shortcut based image tag insertion (browse to file, auto inserts
height/width)
I wrote such a command for you some time ago:
http://lists.macromates.com/pipermail/textmate/2006-May/010562.html
- Same as above but for Flash / Quicktime / etc
Should be possible to modify the command to also work with Flash / QuickTime / etc.
If you don’t know how to do this, you’re more than welcome to ask here.
- A shortcut based built-in color-picker. When editing style
sheets, I'd like to choose my color from a palette.
The CSS bundle has an Insert Color… You can assign a shortcut to it in the bundle editor.
These things are pretty standard fare for most code editors no? Just wondering if they'll eventually become native to TM too.
They might be standard for IDE’s which focus on web-development. TextMate focus on being extensible, and it wouldn’t take many minutes to create your commands, but I personally have no interest in replicating all the commands of some web IDE -- though if web developers find certain commands useful, I am generally willing to add them to the HTML bundle and I also offer my help wrt writing them.
Thanks again Allan for your helpful response. My 2 cents: Since *lots* of folks use TM for web development, I hope you'll consider adding those fancy commands you shared with me into the default HTML bundle that ships with TM.
Cheers, Sean
On Jun 29, 2006, at 2:13 PM, Allan Odgaard wrote:
On 29/6/2006, at 4:00, Sean Schertell wrote:
Are there plans to implement .swf insertion natively in future?
When you put it like that, no, I presently have no plans of doing that.
As for language specific features, these are not native, but stored in language specific bundles -- I generally only collect contributions for these bundles, as I don’t know the first thing about flash development, how to extract dimensions from a swf file, or let alone how the tag to insert needs to look.
Coincidentally I do believe that I know how a QuickTime tag needs to look, as there is already an Insert Movie snippet, and I see that I can query QuickTime Player for movie dimensions, so here is a drag command for dropping a .mov file into your HTML document:
<Insert QuickTime Movie.tmDragCommand>
Just double click it to install -- this will also show the source of the command.
If this is useful, I can add it to the HTML bundle.
I love the fact that TM allows me to add new functionality but it would be nice if some of the basic things were built-in.
TextMate ships with more than a thousand bundle items -- so I do think some of the basic things are in fact “built-in.”
- Shortcut based image tag insertion (browse to file, auto inserts
height/width)
I wrote such a command for you some time ago:
http://lists.macromates.com/pipermail/textmate/2006-May/010562.html
- Same as above but for Flash / Quicktime / etc
Should be possible to modify the command to also work with Flash / QuickTime / etc.
If you don’t know how to do this, you’re more than welcome to ask here.
- A shortcut based built-in color-picker. When editing style
sheets, I'd like to choose my color from a palette.
The CSS bundle has an Insert Color… You can assign a shortcut to it in the bundle editor.
These things are pretty standard fare for most code editors no? Just wondering if they'll eventually become native to TM too.
They might be standard for IDE’s which focus on web-development. TextMate focus on being extensible, and it wouldn’t take many minutes to create your commands, but I personally have no interest in replicating all the commands of some web IDE -- though if web developers find certain commands useful, I am generally willing to add them to the HTML bundle and I also offer my help wrt writing them.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
:::: DataFly.Net :::: Complete Web Services http://www.datafly.net
On Jun 29, 2006, at 12:39 AM, Sean Schertell wrote:
Thanks again Allan for your helpful response. My 2 cents: Since *lots* of folks use TM for web development, I hope you'll consider adding those fancy commands you shared with me into the default HTML bundle that ships with TM.
Might I suggest having it as a separate bundle, perhaps called "WebDev" or something?
Cheers, Sean
Haris
Another two cents: If you're going to add a snippet/command/whatever to make it easier to include swfs in your HTML, then you might want to look into using something like SWFObject (blog.deconcept.com/swfobject). For one, it's just much easier to deal with than the traditional <object>/<embed> tags. For two, it has nice benefits like allowing some SEO-friendly content to live on the page and built-in version detection and expressInstall. And for the big one, it side-steps the ActiveX issue from the update forced out of the EOLAS patent lawsuit, which, if you haven't seen it, deactivates your Flash content in IE until you click on it, meanwhile sticking a big ugly border around it. The way around it to use an external JS file to write your <object> tags to the page...which is exactly how SWFObject works.
Anyway, whether it's on an individual-by-individual basis, or if Allan can actually roll it into an official release (I know SWFObject is freely available, but I'd be surprised if product-endorsement is going to fly), I'd highly recommend using SWFObject over using actual <object> tags.
Dru
On 6/28/06, Charilaos Skiadas cskiadas@uchicago.edu wrote:
On Jun 29, 2006, at 12:39 AM, Sean Schertell wrote:
Thanks again Allan for your helpful response. My 2 cents: Since *lots* of folks use TM for web development, I hope you'll consider adding those fancy commands you shared with me into the default HTML bundle that ships with TM.
Might I suggest having it as a separate bundle, perhaps called "WebDev" or something?
Cheers, Sean
Haris
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 30/6/2006, at 18:44, Dru Kepple wrote:
[...] I'd highly recommend using SWFObject over using actual <object> tags.
The problem is that using SWFObject introduces a dependency on an 8 KB javascript which needs to be included from the page and thus likely also be uploaded to the target server.
It is however possible to get an SWF drag command to optionally insert the script which use SWFObject e.g. when the option modifier key is held (during the drop), and then leave it up to the user to do the proper thing with swfobject.js.
On 6/30/06, Allan Odgaard throw-away-1@macromates.com wrote:
The problem is that using SWFObject introduces a dependency on an 8 KB javascript which needs to be included from the page and thus likely also be uploaded to the target server.
Do you mean "problem" as in "a problem with buliding the drag command" or "problem" as in "I don't like dependencies on 8 KB javascript files?" I understand the former, and didn't think it entirely realistic that SWFObject could be seamlessly integrated into the TextMate workflow (although it sounds like it's more reasonable than I imagined), but I disagree with the latter. Sure, I'm biased; I make a living doing Flash. Feel free to hate me... (I say with tongue firmly planted in cheek).
On 1/7/2006, at 2:29, Dru Kepple wrote:
Do you mean "problem" as in "a problem with buliding the drag command" or "problem" as in "I don't like dependencies on 8 KB javascript files?"
Mostly the latter. I mean, what do you want it to insert?
The <script> part, and a <script src="swfobject.js"> and hoping the user will figure out how to upload this to the server, his blog, or wherever he is posting the HTML in which he dragged in the SWF file?
No, I would use a drag command more for writing the
var so = new SWFObject("blah.swf", etc); so.write("somediv")
stuff... and I would expect the developer to be smart enough to enter their own script include as well as making sure the file is present. Although I suppose a drag command could work well for the script include, as well. If you're making a point to use SWFObject, you probably understand the need to also upload the js file, if it's not already present on your site.
But, as you noted, I think there are enough gotchas, like getting the dimensions of the .swf, that it starts to become not worth it. The whole point of SWFObject is to make it easier to put those <object>/<embed> tags on your page...Most of the SWFObject code one would write is highly variable.
Again, though, my whole point was that SWFObject is an overall better way to put Flash on your HTML page, especially in light of the whole EOLAS thing, and one might be wasting one's time doing drag commands for hard-coded <object>/<embed> tags, when SWFObject is available, and even recommended by Adobe.
But...to each his own. I suppose the developers who use Flash minimally are less concerned about that than I am, as I spend my time making whole sites in Flash or with a large amount of Flash.
At any rate, I think the discussion has gone beyond the scope of a TextMate mailing list, so this will be the last I speak of it.
Dru
On 6/30/06, Allan Odgaard throw-away-1@macromates.com wrote:
On 1/7/2006, at 2:29, Dru Kepple wrote:
Do you mean "problem" as in "a problem with buliding the drag command" or "problem" as in "I don't like dependencies on 8 KB javascript files?"
Mostly the latter. I mean, what do you want it to insert?
The <script> part, and a <script src="swfobject.js"> and hoping the user will figure out how to upload this to the server, his blog, or wherever he is posting the HTML in which he dragged in the SWF file?
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 6/30/06, Allan Odgaard throw-away-1@macromates.com wrote:
The problem is that using SWFObject introduces a dependency on an 8 KB javascript which needs to be included from the page and thus likely also be uploaded to the target server.
It is however possible to get an SWF drag command to optionally insert the script which use SWFObject e.g. when the option modifier key is held (during the drop), and then leave it up to the user to do the proper thing with swfobject.js.
I put a drag command together that does what you guys wanted.
- juan
On 13/8/2006, at 2:42, Juan Anorga wrote:
It is however possible to get an SWF drag command to optionally insert the script which use SWFObject e.g. when the option modifier key is held (during the drop), and then leave it up to the user to do the proper thing with swfobject.js.
I put a drag command together that does what you guys wanted.
Thanks, I will add that to the HTML bundle!