You can view the swf file here :-
http://shrineweb.in/other-files/other/seniorschool.swf
On the above link, the swf is not getting trimmed and plays fine. But when you download it and view in the flash player, it gets trimmed a little from all sides. You will notice that by seeing the half cut 'skip' button at top-right.
Does anyone have any idea why this is happening?
Your SWF file is published with stage dimensions of 800x650, make sure that your content doesn't exceed those bounds. If it does, change your stage size in your document properties.
Related
Please click on the below link
http://hpecp.vmokshagroup.com/videobook/html/homepage.html
When we click on "What is VideoBook" link we got some blank screen before starting the swf file due to video fetching from the server. We have to avoid blank screen.
We are facing a problem of fetching the video clips from the hosting server. I added two video clips in Flash (.swf)... one is from the beginning, another one is at the ending and in between some text animations.
While we are playing/calling .swf file in browser from hosting server, initially getting blank screen. It takes some time to fetching the video clip from server due to size. Starting of first video clip duration is about 3-6 seconds. While video is being loaded.. text animation is starting without playing first video clip. Same problem we are facing in second video at the ending.
Is there any option to incorporate video clips internally in Flash (.swf file) rather than calling from external server or external file path?
Any help would be appreciated.
This happens because of the JavaScript that you use - it actually makes the swf files (in)visible depending on the situation. What this does is that it actually loads the .swf files each time. You can check that in the Network tab of your debugger (I'm using Chrome).
So it first loads Video-01d.swf, or Video-02.swf. They take time to load, and just when the main file is loaded, it starts to load the video file (video1.flv).
All that causes delay, and it's pretty normal as you have all that things in separate files. If you want to, you can merge them into one - just import the flv inside your .swf file and it will work out well..
Of course, you will need to change all your logic for the flash files that you are playing. You will also need to change the JavaScript to call Flash functions in order to tell it to go to another "scene".
I will advise you to add a simple gif loader image (like this), put it as a background-image of the div, and put some color into that div. What the user will see is that the movie disappears, there is a black background with a loading symbol inside, and then the new video begins. It's a normal thing to see online - preloaders :) Good luck!
I'm writing an android app in flex as I need to display swf animations.
These swf files are larger than the mobile screen - they're advertisements used elsewhere.
I don't seem to be able to resize the loaded swf file. I've set height and width on the container, the loader everywhere I can think of and nothing changes the size of the swf.
It's frustrating, the swf is of a set size as they display full screen when used as advertisements, I just want to show a small preview within the app of what they will look like.
I'm beginning to think that it cannot be done? or am I missing something
I've seen similar questions asked here, but no answer that works for me.
There is only one stage, and the loaded swf probably resizes itself according to the stage dimensions, so it ignores the properties of the loader.
If you can modify the code of the loaded swf, you can:
either add it a method like setSize(width, height), and invoke it from the main swf:
yourSWFLoader.content.setSize(width, height);
or access to the loader dimensions from the loaded swf, using something like:
width = parent.parent.width;
height = parent.parent.height;
The second solution assumes the SWF is loaded from a trusted domain.
I made a .swf Application which goes automatic to the fullscreenmode with the functions
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
stage.scaleMode = StageScaleMode.NO_SCALE;
So what i wanted to do is to start a .flv video and in front of this .flv include, i want to have a Movieclip, which is in front of the .flv Video.
That doesn't work, in the Fullscreen mode. If i minimize the windwow. The Movieclip goes in front of the flv- included video.
So what i need is, to have something like a z-index function in the fullscreenmode.
Can anybody help me
Thanks
Flash Player: 11.4
Assuming you have a reference to every Display Object, you could use swapChildren to swap the depth or the z index:
var index1=this.getChildIndex(child1);
var index2=this.getChildIndex(child2);
this.swapChildren(index1,index2)
where child1 & child2 could be any display object including video player.
I'm not in front of Flash right now so I can't test the problem but I'm sure its considered bad practice to have an app that goes auto-fullscreen by itself on loading. Adobe considered it a security risk and they may have taken security steps that conflict with what you're doing... just a guess though.
"That doesn't work, in the Fullscreen mode. If i minimize the windwow.
The Movieclip goes in front of the flv- included video."
My advice is to make a button somewhere on the screen for going in/out of fullscreen. So when it looks okay in the window mode, click that button to go fullscreen again and then tell me if its okay now or is the problem still happening?
A) If its okay then you need to lose auto-fullscreen and just start with a button on stage. Give it text label like "Start App" or something like that so users know what to do (much better than just throwing them in fullscreen with some unexpected loud video etc).. Anyway when in fullscreen thats when your function should addChild the flv container MC and then your other MC. Use removeChild commands when F.S mode is exited. Make the "Start" button visible or hidden depending on screen mode (F.S is hidden, Window is visible etc).
B) If its not okay you have other problems.. I'm off to sleep but will check later if there's a reply. Peace..
I made my own solution :
var container:Sprite = new Sprite();
container.addChild(logo);
container.addChild(startVideo);
container.swapChildren(logo, startVideo);
this.addChild(container);
Whith this Sprite object it works fine.
I have a flash player I am working on (developing in AS3).
The stage (and player) size are 640x979.
At the bottom of the player I have a control-bar, with play-pause buttons etc.
Here is an image of the player (image).
So far so good.
Now - on most external SWFs that I load - they load OK.
But on some - if I try to load them using the Loader class - the player goes crazy !
The control bar dissappears, and the video is stretched in a funky way. You can see this in the attached image (image).
What is really strange here is - this happens even if I don't add the Loader object as a child !
I just do this :
public function PlayerCtor()
{
swfUrlLoader = new Loader();
swfUrlLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onSwfReceived);
swfUrlLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onSwfIOError);
swfUrlLoader.load(new URLRequest(swfUrl));
}
private function onSwfReceived(e:Event):void
{
swfUrlLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onSwfReceived);
swfUrlLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, onSwfIOError);
}
.
That's it ! I don't do anything else besides just loading the external SWF !
The only things that I can think about are:
maybe the 'bad' SWF files have some code-behind in them that causes this behavior to happen ?
the 'bad' banners are supposed to be 906x340. I have noticed that
they have animations flying in from 'outside' those boundries ... (I
found this out by decompiling the SWFs using 'Flash Decomplier'
trial).
Here are the SWF banners that are OK and don't do any problems:
Adom-Adom SWF
Mama Off SWF
Here are the 'bad' banners that make my player go crazy:
Cheese SWF
Emek Cheese SWF
Can anyone help me figure out how to prevent this from screwing up my player, please ?
Thank you for everyone who can help !
it sounds like some of the secondary loads are changing the stageAlign and/or the stageScaleMode. see if changing stage.stageAlign and stage.stageScaleMode to the values you expect after the load is complete fixes the problem
I have a simple expandable advertisement which loads an external SWF file. The external SWF file contains an embedded video.
Using the UILoader component, I have loaded the SWF, added it to the stage and the video displays and plays fine.
The main issue is that I have a close button, which should unload the video, and stop it, essentially returning to the default state of the advertisement.
To unload the SWF, I am doing the following:
myUILoader.unload();
removeChild(myUILoader);
When I do this, the video and UILoader disappear from the screen. However, you can still hear the sound in the background, and if I load the SWF again, it creates multiple tracks in the background. Any suggestions?
There are a couple of things that could cause this. One is that the content inside your UILoader is adding event listeners to outside of itself. You can fix this by not allowing it to touch anything outside itself. I believe you can do this by placing it either in its own ApplicationDomain, SecurityDomain, or both. Consult the help for more details.
If this is not feasible, you can try SoundMixer.stopAll(), which will stop the obvious symptom, but will not fix the memory leak you probably have in this situation.
Another possibility, as Ronnie has alluded to, is that you still have a reference to the content of the loader somewhere. If you don't clear that, it will stay in memory.
However, there is another problem that can also cause this, which is that if there is navigation in the movie that skips over a frame that contains a MovieClip with audio set to "stream," the MC will be created but not fully instantiated and will stay in memory with no way to get any control over it or release it. I don't think this is what is happening from your description. If it is, the fix is to make sure that you visit the frame that contains the sound, however briefly, on the way to the other frame. This is actually something you might want to consider even without sounds, because it does occur any time you skip frames in nested MovieClips (you just have no evidence unless you profile the swf), and over time this will create a memory leak.