I'm authoring Flash content to work with an RR CGI script, written by another programmer who's currently too busy to update the code himself. I'd like to take a stab at modifying it.
The other programmer's CGI generates a page with a list of possible SWF files to open. When a SWF file is selected in a list, the SWF is presented in a thumbnail size (it is the actual SWF, just reduced).
The user can then click a button to launch a new window with the SWF presented in a dynamically-generated HTML page.
We want the SWF to be presented at its actual size, so we turn off scaling in the embed and object code. However, since we don't know what each SWF's dimensions are, we've given the embed and object codes a large arbitrary number; which sort of works, except that you can have a small SWF floating in the middle of a massive embed/object area.
What I would like to do is change the RR code somehow to get the actual dimensions of the SWF and write them into the dynamically-generated HTML page's embed/object tags to perfectly fit. I've read that PHP has a function called "getimagesize" that works with SWFs. Does RR have something similar?
Getting Flash SWF Dimensions in RR CGI?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Dear hsthompson,
Set the filename of a player object to the path to your flash movie and get the formattedWidth and formattedHeight of the player object.
Best,
Mark
Set the filename of a player object to the path to your flash movie and get the formattedWidth and formattedHeight of the player object.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 10
- Joined: Fri Mar 14, 2008 8:13 pm
Dear hsthompson,
If you created a player object and the CGi server can deal with it, there is a player object :-) Sorry, I can't really help you with that.
Perhaps you could put some exif information or ID3 tags into your flash files. Easier would probably be to have your flash files accompanied by a simple text file with the necessary information and have that read by Rev or php.
Best,
Mark
If you created a player object and the CGi server can deal with it, there is a player object :-) Sorry, I can't really help you with that.
Perhaps you could put some exif information or ID3 tags into your flash files. Easier would probably be to have your flash files accompanied by a simple text file with the necessary information and have that read by Rev or php.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Hi,
Revolution doesn't have any way of dealing with SWF natively at the moment. If you want to get at the info for a SWF file you have to parse the file header yourself and grab the data.
Depending on how important this feature is to you it may or may not be worth the effort to write your own library. Parsing the SWF header isn't terribly difficult if you are familiar with binary and have the SWF spec in hand but you do have to account for ZLib compression in SWF files that are compressed. That can be a little trickier.
If you do want to do this and need help there is a developer named Dar Scott who is very knowledgable in this area. It would be worth contacting him.
Revolution doesn't have any way of dealing with SWF natively at the moment. If you want to get at the info for a SWF file you have to parse the file header yourself and grab the data.
Depending on how important this feature is to you it may or may not be worth the effort to write your own library. Parsing the SWF header isn't terribly difficult if you are familiar with binary and have the SWF spec in hand but you do have to account for ZLib compression in SWF files that are compressed. That can be a little trickier.
If you do want to do this and need help there is a developer named Dar Scott who is very knowledgable in this area. It would be worth contacting him.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder