Solved

Reduce the size of the Flash SWF file it executes

Posted on 2014-03-07
12
424 Views
Last Modified: 2014-04-05
Hello,

I have created an SWF file with the dimensions of 750x530.  After it plays/executes I want it to reduce to something like 300x110.

Using Flash CS5.5, Action Script 3, CCS 3, PHP

Any ideas?

Have a great weekend,

Don
0
Comment
Question by:GEMCC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39913532
The aspect ratios don't line up.
750 x 530 = Aspect Ratio of 1.415
300 x 110 = Aspect Ratio of 2.727

But that aside, here is what I would do.  Create two versions of the SWF file - the large one and the small one.  In the web page that plays the large SWF file, set a long-life cookie.  Your scripts can detect this cookie and know that it's time to load the small SWF file.  Conceptually this is similar to having a one-time "splash" page in front of a web site.  This article describes the concept.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_3314-How-to-Show-an-Introductory-Web-Page-Once-Using-PHP.html
0
 

Author Comment

by:GEMCC
ID: 39913746
Hello,

I don't think we are on the same page.  I have a session variable to show Flash the first time a visitor comes to the site.

What I am saying is yes the starting size is 750x530 and yes after the SWF is executed, I want the size to be reduced down to 300x110.  I am using z-index so the SWF file is "above" the rest of the page which means the links underneath it are not accessible.

I hope this clarifies what I am attempting to do.

Have a great weekend,

Don
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39913885
Maybe if would help if we could see a site that does something like this.  Are there any links you can show us with "prior art?"
0
Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

 

Author Comment

by:GEMCC
ID: 39913928
Yahoo.com is currently rotating an ad for a movie called Mr. Peabody and Sherman that starts almost over the compete screen and finishes over on the right.  During the full-screen, the links under it are not  accessible.
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39913976
OK, thanks for the link.  I saw that.  It's really two separate videos.  They spent a lot of money to make it look seamlessly integrated (but they can afford that - their stock has nearly doubled in the last year).

Can you please show us any code that you've tried?  And tell us a little more about where you're getting to sticking points? Thanks.
0
 

Author Comment

by:GEMCC
ID: 39913981
I haven't tried anything because I don't know what to do.

As mentioned, I am trying to make it so the links "under" Flash are accessible after the SWF has executed.  If there is a trick so this can happen, great, if it involves two different SWF's, great, otherwise, I do not know how to get it done.

Have a great day,

Don
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39965559
I think what you are talking about is a modal.  I use bootstrap and that is already baked in.  There are a lot of options from jquery ui http://jqueryui.com/dialog/ to a pure js modal http://jsmodal.com/docs/usage.php or http://getbootstrap.com/javascript/#modals

You can program the page to load with the modal.  After your script is done, you can programmatically via js close the modal.

If you are just doing this to show some content, I would avoid locking people out until your movie is played or you will turn people away.  Most modals allow you to click off the modal or an X to close.  You can also program to not close too.  

Sites that rely on ads and have the ability to force you to wait can get a way with this.  Like youtube as example.  Many ads have the little banner that you can click or make you wait 5 seconds before offering to let you skip. Very few have the power to make you sit throgh the 20 or 30 seconds.  

Check out the different modal scripts, I think that should get what you want.
0
 
LVL 81

Expert Comment

by:David Johnson, CD, MVP
ID: 39965582
there is no trick to make the links accessible.. What you do is reduce the display dimensions of the flash so that the video doesn't cover them up.  or change the z-index after it has played.
0
 

Author Comment

by:GEMCC
ID: 39965627
Scott,

I have to admit, I do not understand the modal stuff.

David,

With regards to changing the z-index, this makes sense to me, but do not know how to get it done. Would this work?  If I change the z-index won't that move everything else around?  Please advise.

Have a great day guys,

Don
0
 

Accepted Solution

by:
GEMCC earned 0 total points
ID: 39968262
OK, so here is what I did:

<script type="text/javascript">
      setTimeout(function(){window.document.getElementById("flash").style.visibility = "hidden";window.document.getElementById("logo").style.visibility = "visible";},30000);
</script>

Basically I hid the actual flash file and made the logo visible.

Thank you for your responses,

Don
0
 

Author Closing Comment

by:GEMCC
ID: 39979836
Resolved my issue.
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will learn how to dynamically set the form action using jQuery.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question