Solved

Reduce the size of the Flash SWF file it executes

Posted on 2014-03-07
12
427 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
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 

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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

690 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