This content has been marked as final. Show 21 replies
anyone? I'm really struggling with this, there must be a well known solution ... :(
I think its easier to post a link to your website showing the problem, because I took a look at your post and didn't quite 'get it'. Sometimes its easier to explain things by showing them... or maybe its just me.
I wasn't clear whether your problem was related to html alignment settings or stage alignment settings or both.
do you get it now? :))
sorry for confusion.
Now you should see the two problems I have:
1. - tiny lines avournd the flash object inside html
2. - instead of the flash window to be centered to the middle, all is in one mc which is centered to the middle (very stupid, memory demanding and all just because I couldn't get the pattern to work properly).
Thanks for your time.
Sorry, I didn't see your earlier post, I'll take a look now.
I didn't see the tiny lines you mentioned. Unless you mean the edges where you shadows got "cut off' at the edges of the stage.
I'm still not 100% clear what the other issue is I'm afraid.
If you're having trouble laying things out in the browser itself, you could always use CSS and wrap your flash elements in DIV tags with an Id or class that you reference in your CSS.
But if you want to lay things out inside flash according to browser dimensions/size changes to the stage when its 100% then you use Stage.onResize instead of onEnterFrame
yes thats what I'm talking about, the edges!
I know that probably the best way how to do it would be to use CSS but I've never used it before so don't know how ...is there any chance you would link me to an example or so?
The problem is actually the content inside the flash as well. Like positioning to the center, in case you change the browser window. If I try the Stage.onResize, it gives an error saying there is no such property.
The 100% example of I'm trying to achieve is when you publish anything with Flash size property set to 100%, just WITHOUT the mentioned edges.
See the example: http://blog.deconcept.com/swfobject/fullpage.html
There is also a tutorial for it but I have no clue how will I link the HTML file and the CSS file..
Sorry, trying to get my stuff finished too.
For the edges... because they're a filter effect that extends outside the size of the movieclip you're applying it to, you need to make allowance for empty Stage space around you clip.
The Stage.onResize is actually implemented via a listener, like this:
//this is where you put your code that checks Stage.width and Stage.height and does the layout.
I guess this has nothing to do it with movieclips at all since if you right click the edges, you get a HTML reply, not FLASH..so it's rather positioning FLASH inside HTML I'm trying to get sorted.
Will try the listener on Resize too, but that's different matter.
EDIT: Hm, the tryied to copy the code you posted and gives me error right on the first frame ... as far as I'm concerned you can't actually right something like var something and then ._attribute since it's expecting a variable type isn't it?
Yeah, that's what I meant earlier (sort of). But the clipping is related to movieclips/Stage size
The Stage edge is cutting off your filter effect. You must be applying a filter to a movieclip inside that rests against the edge of the stage. You need to either make the stage bigger and leave some space around the movie clip. Or scale the clip to take up less vertical space (initially and onResize) so you can centre it and have the filter effect appear above and below without being cutoff.
If it were me doing it I would make it 100% flash vertical and horizontal so there's no html above and below. And then use the stage size to position and size the internal clip. Iniatially - just with regular timeline code and then onResize via the listener.
as for your last comment - YES that's how I want to do it!
however, if you apply 100% flash while publishing, you still do get these edges.
The site is actually supposed to be this way, only that it's sticked to the top of the browser window, rather than having the HTML edge between the flash object and the browser window (i.e. technically the flash is not 100% but like 95 or so...)
Do you get me now?
Sorry for my English as I'm not a native speaker... ;)
OK, I think I got it, try this then:
<body bgcolor="#182c37" style="margin-top: 0px; margin-bottom: 0px;">
yes that works, well not quite.
Only works for Firefox, in IE I still do get the edges....
As for the listener I made up this code but it still doesn't work although it listens (you can trace the changing width etc.) properly, any ideas why?
Your code works fine for me. Perhaps you forgot to give your test movieclip the correct name.
Re the IE thing, I'll take a look later on, I can't do it now sorry. But its CSS/HTML related and nothing to do with flash as far as I can see.
Yes, that's what I was trying to explain to you the whole time...
anyway, I don't know what was wrong but the onResize listener works fine now, so that's one thing sorted. Now just the HTML/CSS placement.
There's a simple way to check that. Use the browser's view source option for the html/css in some other sites that already do it to see how its done.
yes, it's on the site example I posted earlier
I know the CSS style is like this but don't think simple implementing among text in notepad will work will it? ..you do need an actuall CSS file as well no?
No clue how CSS works....
You can do it inline or external I think. There's two different ways I've seen to put external css in the site. Different tags: style is one of them, but I think it has something unusual @import inside the node... may be wrong, I think the link tag is the other one. Or it should work inline.
I'm not a website designer, I just focus on flash... but I think it's better design to have it separate, in terms of functionality it shouldn't make a difference. Notepad should work if you haven't got another editor. There's also plenty of free opensource editors that are better than notepad if you don't have Dreamweaver.
ok, I will try something and hopefully post here how I did it.
Thanks for your time man.
Finally, putting this in to HTML file does the job very well.