how to reduce Flash CS5 swf file size after adding button - flash-cs5

i don't work on Flash much but i've made a small banner ad for a client...
its a simple banner with 3 images in it and a button with some actionscript linking to an external campaign monitor.
the target file size is about 70kb.
image compression is turned on in the publish settings.
without the button the file size is fine.
when i add a basic button in with a an event listener and about 5 lines of code the published swf size jumps up to over 200kb...
i've tried deleting the button and it drops back to 70kb...
anyone know what i can do to include a button but also keep the file size reasonably small?
cheers
dog

Are you using text in your button and have you embedded the font? That can really bloat an swf.
What you can try is either break the text apart so you don't need to embed the font (but it makes editing a lot of work)
Or you embed only the characters you have actually typed in the button.
If that is not the problem, please post any more details you can think of, including the code.

Check if you have any images in Flash Library that has Linkage id assigned to it. Remove the linkage id and publish swf.

well, it looks like it was a bug in CS5... i tried opening the banner in flash CS6 and did the same procedure of creating the button and giving it an action... published it and it was now approx 40kb...
very odd.

Related

how to customise elementor functionality(how do I find the right bit of code?)

I'm trying to make a web page formatted similar to that of Netflix. Where a list of videos are displayed in a div with two arrows in either direction on each side. When the number of videos are more than the width of the window clicking the arrows moves the displayed videos in the corresponding direction by one video.
And(key part), when a video is clicked, the clicked video gets displayed on another div(main part of the screen) with a text of introduction and an excerpt of the video playing in the background of that section, plus a "play" button to start the video.
I would probably be able to sort it out with vanilla code. But this page is managed by WordPress so I would have to plug in my code with wordpress.
My assumption is that hacking the existing elementor code for the video widget would be the quickest way to do it. But I don't know how to find the code corresponding to the functionality I need to modify to customize it to do what I want. I can locate the video-widget file, but still, it's a huge file with lots of code. How do I find the functionality I need specifically to import into my own code?
Thank you and sorry for the verbose phrasing.

set window icon tkinter macosx

This line works fine for my Windows program.
When i run this same file on the Mac OS X, I get a blank page instead of my icon.
Here is the windows line:
self.iconbitmap("Boss.ico")
I have searched relentlusly for an answer I want this icon to work on both platforms. self is the root Tk window if your wondering if it's root or not.
Note: I have tried using icns, .xbm , .gif by loading a photo image and setting thru window attributes all produce the same blank page on the mac.
After 5 days of searching, and this post having been viewed at least 15 times I went directly to the tk/tcl documentation. If I understand this correctly, apparently there is no way to properly set the icon for mac OS X without using special library or other sort of hacks. It would be nice if there were a mac specific documentation for the tkinter library but alas there isn't that I have found. here is the part of the documentation I found:
wm iconphoto window ?-default? image1 ?image2 ...? Sets the titlebar
icon for window based on the named photo images. If -default is
specified, this is applied to all future created toplevels as well.
The data in the images is taken as a snapshot at the time of
invocation. If the images are later changed, this is not reflected to
the titlebar icons. Multiple images are accepted to allow different
images sizes (e.g., 16x16 and 32x32) to be provided. The window
manager may scale provided icons to an appropriate size. On Windows,
the images are packed into a Windows icon structure. This will
override an ico specified to wm iconbitmap, and vice versa.
On X, the images are arranged into the _NET_WM_ICON X property, which
most modern window managers support. A wm iconbitmap may exist
simultaneously. It is recommended to use not more than 2 icons,
placing the larger icon first.
On Macintosh, this currently does nothing.
if anyone has a working solution please post this. I want to accomplish this so that any system can open a freshly installed python and run my application without installing any additional library.
#GarryHurst This is not a solution but I sort of get the idea now:
On Mac, TK decided that the icon will never appear on the window title bar.
Instead, it shows up as the app's Dock icon.
It's most probably a by-design or won't fix issue on their side.
It is showing the icon of the file you are putting in the directory so setting the file to be an app will set the window icon to be the icon of that app.
for example:
root.iconbitmap("/Users/homedir./Desktop/Test apps/Clicker.app")
tk window with icon
I have a coup. Why not change mind, like this.
The emoji library is enough to choose a good-looking icon.
We can do that.:-D
Code
Effect

Strange LWUIT Dialog behaviour while using Dialog.showPacked() with BorderLayout.CENTRE positioning

I am using LWUIT for series 40 for making my J2ME app and I have noticed a strange behavior of the LWUIT-Dialog while using the showPacked() method, the dialog being positioned with BorderLayout.CENTER.
This happens especially in touch phones.
I have attached an image in order to describe my situation.
Initially the dialog appears as shown in the first part of the image.However,it expands in the next few seconds to become like the one shown in the second part of the image.
Future calls to display the dialog using showPacked appears like the third one.I am clueless as to why this is happening.I want my dialog to appear like the one shown in the first half of the image all the time.Where have I gone wrong?
Note : The content of the Dialog is a an animated label.
I have no idea what the guys did there but I'm guessing they reflow the UI too aggressively. Try setting Dialog.setAutoAdjustDialogSize(false) and see if it solves your problem.
You can remove the title and background et al. with the code below, it makes only your animated GIF show with the dimmed dialog background :
setTitle(" ");
setUIID("Null");
setDialogUIID("Null");
getStyle().setBgTransparency(0);
getSelectedStyle().setBgTransparency(0);
getUnselectedStyle().setBgTransparency(0);
getPressedStyle().setBgTransparency(0);
getDialogStyle().setBgTransparency(0);

Spotify 0.8.2.527 disables #font-face in apps

Was reading the blog post; http://www.spotify.com/uk/blog/archives/2012/02/23/spotify-now-with-gapless-playback-crossfade/
Downloaded the preview and now font face is disabled. We've tried eot, woff, ttf, svg. In the network panel, only SVG loads in, but in the preview tab and on page it renders as Times New Roman. It was working before, but now doesn't work with our current implementation or a stock font-squirrel implementation. Any ideas, it worked fine in 0.8.10.3
EDIT - SVG works, but not .woff or .ttf as before. All of them work in 0.8.10.3
This has been temporarily disabled in the new version due to memory leaks and unexpected crashes of the client.
We'll enable it again when we upgrade to a newer version of Chromium Embedded Framework.
That's not all that doesn't work. Now, gapless playback, crossfade and even the repeat function are stuck on (the last intermittently as my playlist sometimes repeats and sometimes does not, though the repeat annunciator remains off). The boxes for gapless and crossfade are unchecked. If I check them, close the client, start it again, uncheck them, close the client and start it again, the boxes remain unchecked, but the ferstunkener build 572 still messes-up the transitions, truncating up to five seconds or so from the start of each cut.

Text based site for mobile phones?

I tested my site on a mobile device and it loaded pretty quickly. However i had to scroll right to see all of the text. The text was pretty big as well.
How can i redesign my site so i dont need to do any scrolling and have smaller text? I know i I seen this before but i cant remember what site did it.
i removed my css and the device scrolled right until the end of my largest div. So i need css to solve this? What css do i need to make the text not big and not cause the user to scroll (horz) no matter how small his screen is?
Also do i detect the user agent in .NET and link an alternative css file or do i detect which css to use elsewhere?
yes you should design an own css-file for the mobile version of your website. either you check the useragent if it's a handheld or you work with the css media type handheld (which is not supported by older browsers) to load the different css-file.
edit:
with css you can also replace images with text

Resources