Hi there g8z-ga,
Thank you for your question. As a Flash and Web developer, I find this
an exciting challenge. I believe I may have the solution you are
looking for. I was unable to go to the link you provided, but I think
I understand your objective well enough.
My solution involves the use of a movie clip, called ContentLoadPoint,
which is only a pixel in size, and located on the top left hand
corner. The Actionscript in the first frame calls loadMovie
accordingly :
ContentLoadPoint.loadMovie (path, 0);
I've also added another layer above the image layer, called
trans_button, and created a rectanglular Button that matches the size
of the entire document. I made this a Symbol, and set its Alpha value
to 0 so that it is transparent. The Actionscript assigned to this
object is as follows :
on (release) {
getURL("http://www.cnn.com", "_blank");
}
...where the URL is whatever you choose.
This in effect loads the JPG image into ContentLoadPoint, and then the
transparent button layer allows you to link to the URL.
Now I understand your problem when you try publishing it. Since the
loaded image size is variable, when you publish it, the movie will
retain the total document size of 360 X 360, or if you try modifying
this in your OBJECT and EMBED tags, then it will scale it down,
retaining the "whitespace" of the document and reducing (distorting)
the actual size of the image, which is not what you want.
The solution lies in your publishing properties. You want Javascript
(or, better yet, your server-side script) to dynamically set the
OBJECT and EMBED parameters to the image dimensions, AND you want to
set "scale=noscale" in the EMBED tag. This will prevent the image from
scaling. You will also want to align the movie to the left and top.
The complete OBJECT tag is as follows :
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="180" HEIGHT="138" id="loader" ALIGN="">
<PARAM NAME=movie VALUE="loader.swf"> <PARAM NAME=loop VALUE=false>
<PARAM NAME=quality VALUE=high> <PARAM NAME=scale VALUE=noscale>
<PARAM NAME=salign VALUE=LT> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED
src="loader.swf" loop=false quality=high scale=noscale salign=LT
bgcolor=#FFFFFF WIDTH="180" HEIGHT="138" NAME="loader" ALIGN=""
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
I have modified your files accordingly, and a working version can be
downloaded from : www.jobsvolution.ca/flashtest.zip . Try it!
If this does not solve your problem please post a Request For
Clarification and we'll try to figure out some other avenue. However
I'm pretty sure this will do the trick for you. I wish you all the
best of luck! Thank you for using Google Answers.
Best regards,
kyrie26-ga |
Request for Answer Clarification by
g8z-ga
on
01 May 2003 17:10 PDT
hi kyrie26-ga,
Thanks for the great answer! It appears to do what I want, except that
I can't seem to get it working in anything but Internet Explorer for
Win XP. I need to get it to work in Netscape 6.x, too.
I've implemented it at:
http://www.michael.humphries.com/pages/gallery.html
Since it works in IE, I would assume that there are no syntax errors,
but instead a Flash tag or Param, or perhaps a Javascript command,
that isn't supported in Netscape 6. I suspect that it's not my
Javascript, because I was able to get it working before (without the
getURL in the Flash movie), using the same Javascript that I have now.
So I'm thinking that there is some aspect to the Flash <object>
section that isn't supported.
Could you take quick peek at the code behind that page and let me know
if there's anything that I can do to make this work in Netscape 6?
Thanks,
Darren
|
Request for Answer Clarification by
g8z-ga
on
01 May 2003 18:37 PDT
hi kyrie26-ga,
As an experienced Flash developer, would you also be able to look at
this question that I posted:
http://answers.google.com/answers/main?cmd=threadview&id=197976
and let me know if it's:
a) doable and easy (I suspect not, but maybe I overlooked something
obvious?)
a) doable, but complex and may require that I offer more $ for a
solution, or
b) not doable, or at least no doable in a realistic amount of time or
$
- Darren
|
Clarification of Answer by
kyrie26-ga
on
01 May 2003 19:15 PDT
Hello Darren,
I am in the process of downloading and installing Netscape 6. In the
meantime, please have a look at this link :
http://www.htmlteacher.com/xhtml/elements/multimedia/elements/examples/object/objectexamples.shtml
It says "Netscape 4 & 6 and Opera 6 will ignore the <object> element
and read the <embed> element". That may be a possible clue.
Also, a quick look at current browser statistics (
://www.google.com/search?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=browser+statistics
) tells us that Netscape 6 is very much in the minority of browser
use, less than 1%. It may not be worth your time trying to make your
code compatible for it.
In any case, I will proceed with download, install and testing on
Netscape 6, and will let you know of my findings ASAP. Thanks for your
patience.
Regards,
kyrie26-ga
|
Request for Answer Clarification by
g8z-ga
on
01 May 2003 19:24 PDT
hi,
I'm tinkering with the Flash tags right now, but so far no luck. I
completely agree that Netscape 6 is not worth the trouble, but
unfortunately I'm in the unlucky situation whereby the person I've
been hired by has been using Netscape for a long time and refuses to
use anything else. :(
- Darren
|
Clarification of Answer by
kyrie26-ga
on
04 May 2003 19:01 PDT
Hi there Darren,
In response to your question on the Flash chat problem - I took a
quick look at it, and yes, the quick answer is, it IS doable, however
I would need to have a better idea of how the application works before
I can prescribe how to display graphical "emoticons" in your text. As
for implementing such a solution, it would definitely be worth more
than $10 for information on how to accomplish this. Some questions
would be, how is the text currently being generated (I'm sure there's
lots of Actionscript involved), how does it scroll, what kind of
objects are in place, etc etc. So yes, it is doable but takes quite a
bit of figuring out.
I am still working on getting the Flash image loader to work in
Netscape 6. Thanks for your patience.
kyrie26-ga
|
Clarification of Answer by
kyrie26-ga
on
05 May 2003 18:40 PDT
Hello again Darren,
After much tinkering, I wasn't able to get the Flash loader to work on
Netscape 6 either. I did some research and found that Netscape 6 does
not support communication between the HTML page and Flash objects.
This is why we are unable to "tell" the Flash loader what dimensions
to set. Apparently this has been corrected for version 6.2 and above.
From my experience Netscape 6 is very problematic and deviates from
published standards. Netscape 7 seems to be a whole lot better in
displaying things "correctly" (almost identical to MS-IE).
Have a look at the documentation I found :
+-----------------------------------------------------------------------------------+
Macromedia - Flash TechNotes FSCommand problems in Netscape 6 and
Mozilla
http://www.macromedia.com/support/flash/ts/documents/mozilla_fscommand.htm
" Macromedia Flash Player's FSCommand and JavaScript methods allow for
communication between a Macromedia Flash movie and a Web browser. In
Netscape browsers, this communication has been facilitated by
Netscape's LiveConnect technology.
Netscape 6, the latest version of Netscape's browser (as of April
2001), did not implement LiveConnect, and did not support Macromedia
Flash's FSCommand or JavaScript methods (see Netscape 6 Developer
Release Notes for information on Netscape 6's architecture.)
Update: Netscape 6.2 adds LiveConnect support. FSCommand or JavaScript
methods can now be used with Netscape 6.2 if Macromedia Flash Player 6
r40 (or later) is installed. "
+-----------------------------------------------------------------------------------+
Macromedia - Flash TechNotes Macromedia Flash Player 6 Update (release
79)
http://sdc.shockwave.com/support/flash/ts/documents/flashplayer_r40.htm
"XPConnect for Netscape 6.2
LiveConnect is a browser technology that allows Macromedia Flash
Player to communicate with the hosting HTML page. When the
architecture of LiveConnect changed with Netscape 6, this
functionality was lost in that browser. The new technology is called
XPConnect. Macromedia has modified the Macromedia Flash Player to
support XPConnect in both Netscape 6.2 and later and Mozilla 1.0 and
later, enabling use of features such as FSCommand and
javascript-to-Flash communication with these browsers."
+-----------------------------------------------------------------------------------+
For example, a visit to the official Flash site at
http://www.macromedia.com/software/flash/ will display a message "You
may not have everything you need to view certain sections of
macromedia.com". I've also seen other Flash sites (ie. www.moock.org)
where the Flash doesn't display properly using Netscape 6.
Clicking on the "recommended browsers" link from the Macromedia Flash
site will present several options, one of which is the latest Netscape
version (7.0). I have downloaded this and it runs your loader with no
problems at all.
Here is the link for Netscape 7.0 :
+-----------------------------------------------------------------------------------+
Netscape 7.0
http://channels.netscape.com/ns/browsers/download.jsp
+-----------------------------------------------------------------------------------+
My proposed solution is to put a browser sniffer in your code
(Javascript) and detect for Netscape 6 versions that do not support
LiveConnect (6.0, 6.1), and to provide a link to the Netscape download
page. There are plenty of Javascript browser sniffers out there :
+-----------------------------------------------------------------------------------+
Google Search : javascript detect browser version
://www.google.com/search?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=javascript+detect+browser+version
+-----------------------------------------------------------------------------------+
Alternatively you could use your current method (straight JPEGs) when
the detected browser is non-LiveConnect compliant. This should
represent only a very tiny minority of Web users, and I would not be
surprised if many Netscape 6 users have upgraded to 7 already.
Hope that helps! Let me know what you think.
Regards,
kyrie26-ga
|