Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

LERsince1991

macrumors 65816
Original poster
Jul 24, 2008
1,245
37
UK
How would one go about embedding an audio track into a swf flash based digital brochure?

Also how can I set the swf file to scale itself as default to 'Show all'. Like in the flash based online brochure if I set the scale to fit a 15" monitor it will be very small on a 24" sort of thing and the quality wont be that great..

Thanks!
Luke.
 
Audio can be loaded from the library.
This embeds the sound into the SWF (increases the overall filesize of the SWF)
For example, an audio file with class linkage of "Guitar":
Code:
var snd:Sound = new Guitar();
snd.play();

The fitting of content to the browser window can be set using properties of the StageScaleMode and StageAlign classes.
For example, the following script would cause the SWF to scale up or down proportionally to fit the browser window.
Code:
import flash.display.StageScaleMode;
import flash.display.StageAlign;
import flash.events.Event;
stage.scaleMode = StageScaleMode.SHOW_ALL;
stage.align = StageAlign.TOP_LEFT;

The following script will prevent scaling of the SWF:
Code:
import flash.display.StageScaleMode;
import flash.display.StageAlign;
import flash.events.Event;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
 
Great thanks,

Could I add these changes to an existing swf file created from InDesign? If so how would I do this? (I have all adobe programs)

Could I alter the settings in InDesign?

This is the website wil the flash file I would like to alter
http://Novanta.Design-Is.co.uk

Thanks again
 
I have no clue how do to alter the code within SWF files exported from InDesignCS4.
(I use CS3 design premium)

Scripts are usually either written on frame1 of the timeline in a Flash FLA, or stored in external classes that are referenced when the SWF is compiled.

So, if you have FlashCS4 , you could in theory create a container SWF and load the exported SWF.
The stage properties and audio could then be set on frame1 of the container SWF.

gotoandlearn.com has very good video tutorial on preloading in AS3.
This tutorial contains all of the information you need to construct the container SWF and load the SWF exported from ID.
 
thanks snickelfritz I tried to follow the tutorial but it went over my head when he started writing scripts/actions or something. Never used flash before. :eek:

Don't know if you could be able to but could you have a quick go for me and just try to do that preloader or whatever needed doing just to proportionally scale the content to the users resolution. Leave out the music as that was just a thought but the scaling was the real problem.

I have exported a high res swf file of my brochure from InDesign if this is what you would need could you send me your email via a PM and i'll reply fairly quickly with the swf file. Its about a 1.4Mb file.

Cheers.
Luke
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.