PDA

View Full Version : help editing flash gallery i purchased it exports different.


welchyboy
09-17-2008, 10:07 PM
Hello I just bought a flash gallery and it works great but I need to have to on my site. Which means that I need to go into the .fla file and change the action script. The only action script that is in the .fla file is the include framecode.as The xml and all of that is separate and is included in the .as file. The only way i think i could have two instances of this on my page and located on the main directory of my web server is to have two framecode.as but with different names. Have one swf with the framdecode.as and within that have it point to preferences.xml then make another swf with framecode2.as and have it point to preferences2.xml The problem is that whenever I edit the .fla file i get extremely small font and everything is just weird. I figured ok i might have messed something up. So i opened the original in flash cs3 and didn't change nothing just exported the file as the default which is flash 7. Still the same thing. So my issue is being able to export the file to look the same. Anyone know what the problem is. If more information is needed please let me know and I will see what i can do. Thanks

atomic
09-17-2008, 10:35 PM
First, the .as files are used at compile time, not at runtime on the server...

So no point in having different .as files on the server.

Second, templates are usually very poorly coded, and editing them is usually a pain...

You would have to provide access to the original .fla & original .html, for someone to be able to help you out on this...

No files, no help!

I think the problem mainly concernsthe .html you are using to embed the .swf...

welchyboy
09-19-2008, 05:27 PM
LOL OK calm down i can give you some files don't worry Ill hook you up...after all I am wanting some help I will do what i can to help you or anyone else so that they can help me.

You can download the files here.

http://www.wpc-consulting.com/~stxmill/testgallery.rar

The FrameCode.as is as follows;



// 2005 | (c) Michael "Antares" Klishin, flash@novemberain.com
// Version: Draft.Jan.05

/*
* Some notes:
*
* This Picture Gallery can be easily embed into any existing project, just load result SWF file into
* your movie and place related files (pics folder, thumbnails folder) accordingly to data in XML file.
* XML file with preferences must be exactly in the same directory as SWF file.
*
*/

//debug function
_global.dbg = function(obj, level)
{
if(level == undefined) level = 0;
if(level > 5) return;
for(var v in obj)
{
var o = ""
for(i=0;i<level;i++)o+="\t";
trace(o+"obj["+v+"]=>" + obj[v]);
if( typeof(obj[v]) == "object" )
{
dbg(obj[v],level+1);
}
}
}

Stage.scaleMode = "noScale";
var myGallery:Gallery = new Gallery(this, "Preferences.xml", "Preloadertext.xml", 550, 600);



Please if you could help me that would be great. Let me know if there is anything else i can give you to help out. You can see the gallery in action here

http://www.wpc-consulting.com/~stxmill/index.php?main_page=about_us

I also have the same gallery on the history page
http://www.wpc-consulting.com/~stxmill/index.php?main_page=history

I would like to have the same gallery with different pictures. Just need to figure out how to get two different xml files or something working. Thanks for all your help!!

atomic
09-20-2008, 05:04 AM
Your font size problem is most likely due to the fact that the pixel font used and which is included in your files package, was most likely not installed on your system before opening the .fla. You need to install that font on your system, and then when opening the .fla, Flash will be able to use it... Otherwise if that font is not found on your system, Flash defaults to another supposedely somewhat similar font on your system, which most likely caused that size problem...

As for your other question, if I understand you correctly, you wish to have 2 different galleries with 2 different set of pictures, right?

If so, would each of these separate galleries be embedded in the same or different .html pages on the server?

welchyboy
09-20-2008, 10:52 PM
They will be on different pages. Different html pages. However I would prefer the files to be able to be in the same directory on the server

atomic
09-21-2008, 02:51 AM
Did you try to install the font, and test out the .fla?

Is that font size problem solved or not?

atomic
09-21-2008, 03:54 AM
As for your other problem, here's what you could do...

Make 2 new copies of your Gallery.fla... Gallery1.fla & Gallery2.fla

Also make 2 copies of the FrameCode.as... FrameCode1.as & FrameCode2.as

In FrameCode.as, change the last line to point to Preferences2.xml, rather than Preferences.xml...

var myGallery:Gallery = new Gallery(this, "Preferences2.xml", "Preloadertext.xml", 550, 600);

Make a copy of the Preferences.xml... And name it Preferences2.xml

In Preferences2.xml, at the bottom change the set of pictures' names to the second set of your pictures' names...

In Gallery1.fla change the line to point to #include "FrameCode1.as"

In Gallery2.fla change the line to point to #include "FrameCode2.as"

Compile both movies...

Embed each one on the appropriate .html page...

All .xml and picture files can remain in the same directory/folder...

welchyboy
09-22-2008, 03:43 PM
Yes thank you for that I figured that part out the only problem was it wasn't compiling right because of the stupid font. MAN YOU ROCK!! Thanks so much you are a life saver!!!

atomic
09-22-2008, 04:39 PM
Grrrrrrrreat! ;)

welchyboy
09-22-2008, 07:36 PM
HOLD ON LOL not done yet. Got one more quick question. Can you figure out how to change the caption text color. Sounds simple i know but for a newbie like me it is some task. I looked through the preference.xml and the preloadertext.xml which does have the preloader text size. I then looked through the class folder with the other .as files and just couldn't find where to do it at. I am thinking it is in the Gallery.as fiile or the thumbnail.as file because i see lots of stuff in there with captionmc ["caption_txt"] with different things but it is just way to much. I am needing to change the size and color if possible. AGAIN thanks for the HELP THUS FAR

chemicaluser
09-22-2008, 08:21 PM
does your .fla fille have a dynamic text field (empty) which will desplay the loader text?.... if so that is where you change it.. you simply select the text field... and in the preferences menu select the size / color as you would in other applications.

welchyboy
09-22-2008, 09:40 PM
I looked in the .fla but i didn't see anything like that. I can look again but I do have the source files available if you would like to see for your self. I could be missing it this is very likly lol.

http://www.wpc-consulting.com/~stxmill/testgallery.rar

atomic
09-22-2008, 09:42 PM
You can most likely change the color of the caption text and the category text in the preferences.xml files, by changing the hexadecimal values in these lines...

<fonts
imgCaption="0xffff00"
categoryCaption="0xffffff" />

You could (but I wouldn't since a pixel font is usually used at size 8...)
change the size of the font in the Gallery.as, line #1351...

var captionTF:TextFormat = new TextFormat("pixelfont", 8, SelfRef.captionFontColor);

If you make the size bigger, the font will most likely look blockish... Decision is your's!

welchyboy
09-23-2008, 12:55 AM
The color change did work man I totally missed it I was looking everywhere. About the size I tried to take it to 9 but for some reason it didn't work. I changed all the pixelfont", 8, to 9 LOL just to test and still nothing. I would like to at least see what it looks like. The people that I am making the site for would like it bigger if possible.

atomic
09-23-2008, 01:29 AM
Seems to work for me if I change all the 8's for 14's in the Gallery.as (there are far more than the only line I posted above...)...

atomic
09-23-2008, 01:31 AM
9 would not make that much difference, try 12 or 14...

And have you saved the Gallery.as, with those changes, before re-compiling the .fla?

welchyboy
09-23-2008, 05:57 AM
Awesome...I actually had to change the thumbnail pixelfont from 8 to 12 as well to get it to work completely. Thanks again for all your help. You are definately a life saver!!!

atomic
09-23-2008, 06:17 AM
Grrrrrrrreat! ;)

welchyboy
09-26-2008, 05:09 PM
Got another problem which will hopefully be quick and painless...Is there any way to change the background where teh caption is. It is a grey is there a way to make that a solid color to make the text stand out a little more?

The gallery is still up on my site if you need to download it and I have it working on this page

http://www.wpc-consulting.com/~stxmill/index.php?main_page=history

atomic
09-26-2008, 06:09 PM
In Gallery.as, line 762 & 771, change the 2 red parameters for the black bolded...

FROM:
this.drawRect(textHolder, 0, 0, this.baseWidth * 0.9, this.baseHeight * 0.05, this.imgAreaBgColor, this.imgAreaBgAlpha, this.imgAreaBorderColor, this.imgAreaBorderAlpha);

TO:
this.drawRect(textHolder, 0, 0, this.baseWidth * 0.9, this.baseHeight * 0.05, 0x000000, 100, this.imgAreaBorderColor, this.imgAreaBorderAlpha);

The above will change the caption text's color to black and set it's alpha to 100... Change them to suit your taste... Color or alpha values...

welchyboy
09-26-2008, 10:02 PM
I see no difference. Not sure if i am doing something wrong. Here is what my lines 756 to 774 is



// Draw it's background and border accordingly to gallery's layout then position it.
if (this.layout == 1)
{
this.drawRect(imgArea, 0, 0, int(SelfRef.mainMcWidth), int(SelfRef.mainMcHeigth), this.imgAreaBgColor, this.imgAreaBgAlpha, this.imgAreaBorderColor, this.imgAreaBorderAlpha);
this.imgHolder._x = this.imgArea._x = int(SelfRef.mainMcAreaX);
this.imgHolder._y = this.imgArea._y = int(SelfRef.mainMcAreaY);
this.drawRect(textHolder, 0, 0, this.baseWidth * 0.9, this.baseHeight * 0.05, 0x000000, 100, this.imgAreaBorderColor, this.imgAreaBorderAlpha);
this.textHolder._x = this.baseWidth * 0.05;
this.textHolder._y = this.baseHeight * 0.73 + 1;
}
else
{
this.drawRect(imgArea, 0, 0, int(SelfRef.mainMcWidth), int(SelfRef.mainMcHeigth), this.imgAreaBgColor, this.imgAreaBgAlpha, this.imgAreaBorderColor, this.imgAreaBorderAlpha);
this.imgArea._x = int(SelfRef.mainMcAreaX);
this.imgHolder._y = this.imgArea._y = int(SelfRef.mainMcAreaY);
this.drawRect(textHolder, 0, 0, this.baseWidth * 0.9, this.baseHeight * 0.05, 0x000000, 100, this.imgAreaBorderColor, this.imgAreaBorderAlpha);
this.imgHolder._x = this.textHolder._x = this.baseWidth * 0.05;
this.textHolder._y = this.baseHeight * 0.2 + 1;
}

atomic
09-27-2008, 01:59 AM
Well it works for me in the original file...

Did you save the Gallery.as after the changes?

Sure you're editing and compiling with the same Gallery.as?

welchyboy
09-28-2008, 09:40 PM
So sorry I keep forgetting after making that change I need to recompile. It works great. One more thing please I am sorry to keep asking more and more questions. I am thinking this will probably be the last one. For some reason on the history page I get a really white background while loading but on the about us page it matches the background. Any chance I can get this changed? Not sure why one is different than the other everything is pretty much the same except the preference.xml and the only things different in there should be the captions. I use the same class files for both. This isn't that big of deal because it loads pretty quick but would be nice to have them matching. Again thanks so much for your help. I have no idea how you are able to get this figured out so quick with all of that code. You are a GENIUS and I thank you for helping out. Much Appreciated!!

atomic
09-29-2008, 12:00 AM
Grrrrrreat! ;)

I'l try to have a look into your new - and hopefully - last problem...

atomic
09-29-2008, 01:06 AM
Most likely because in the history page .html, you're missing the wmode tag, in the object and Embed tags, as you have them in the about us page .html...


<div><script type="text/javascript" src="includes/templates/arch_shoppe/js/swfobject.js"></script>
<div id="flashcontent">
<center>
<object height="600" width="530" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" id="A-Gallery1">
<param name="movie" value="A-Gallery1.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#FFFFFF" />
// WMODE TRANSPARENT MISSING HERE //
<embed height="600" width="530" name="A-Gallery1" src="A-Gallery1.swf" quality="high" WMODE TRANSPARENT MISSING HERE bgcolor="#FFFFFF" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" />

</object>
</center>
<script language="JavaScript" type="text/javascript" src="Brochure/jscript/NoIEActivate.js"></script>
</div>


Curiously though, in the about us page .html object and Embed tags, where you do have those WMODE tags...


<div><script src="includes/templates/arch_shoppe/js/swfobject.js" type="text/javascript"></script>
<div id="flashcontent">
<center>
<object height="600" width="550" id="A-Gallery" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param value="A-Gallery.swf" name="movie" />
<param value="high" name="quality" />
<param value="#FFFFFF" name="bgcolor" />
<param value="transparent" name="wmode" />
<embed height="600" width="530" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" menu="false" wmode="transparent" bgcolor="#FFFFFF" quality="high" src="A-Gallery.swf" name="A-Gallery" />

</object>
</center>
<script src="Brochure/jscript/NoIEActivate.js" type="text/javascript" language="JavaScript"></script>
</div>


... you have the name and value parameters switched...
It should be the name parameter first and the value paremeter second...

You should correct that!

welchyboy
09-29-2008, 06:44 PM
Man oh man what would I do without you lol. I believe that is it. Thank you for all the help!! The gallery really turned out to be great and I owe it to you. Great job!

Actually customers are wanting one more thing. Is there a way to change the font of the caption text?

atomic
09-29-2008, 09:11 PM
Grrrreat! ;)

Yes. Double-click the A Pixelfont in the Gallery.fla's Library, and change the font in the Font box.

welchyboy
09-30-2008, 02:52 PM
I was in deed able to change the font but for some reason I guess the default font is set to be much "higher" than the others. What I mean is when I change the font you notice it the difference if you test the video but for some reason the text is much lower. Like the 'P' on crop will be cut off a little and stuff. But the text isn't larger than the default text it is actually much smaller which is ok i can change the size later thanks to you but is there a way to maybe move up the positioning of the text or make the text box larger so it doesn't get cut off? I think the font is OK to me but they find it a little hard to read. Which if you can get it figured out that is OK I am happy with it and they should too lol. But if it is not too much work that would be awesome to know. Thanks again for your help and by the way I love your profile picture everytime i see it, it just makes me grin lol.