Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / July 2008



Tip: Looking for answers? Try searching our database.

loading external swf games

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nice dice - 26 Jul 2008 15:26 GMT
Hi all,
I'm trying to load  9 external swf games into my site and play them through my
site, my problem is that some work and some don't. I'm guessing that it may
have something to do with what version they are published in but is there any
code to make them  work?
I'm calling them in with loadMovie("game1.swf", "games");   I also have a
lock._root on my main timeline in the first frame - if it helps??!!
Thanks for any input.
D
kglad - 26 Jul 2008 21:01 GMT
that's not the correct code to lock the _root of your external swfs.  show the code you used on each of your external swfs to enable the _lockroot property.
nice dice - 26 Jul 2008 21:10 GMT
Hi Kglad,
It's the code you gave me on a previous thread - this._lockroot = true;
Does this conflict with the loadMovie? or am I right in thinking it's
something to do with the version they are published in?
Cheers,
D
kglad - 27 Jul 2008 00:43 GMT
that doesn't conflict with loadMovie().  but that _lockroot code wouldn't be in the swf with the loadMovie() code, it would be in the target swf(s) that are loaded.
nice dice - 27 Jul 2008 01:24 GMT
hi - I can't break into the game swf's as they are downloaded!! Any ideas?
cheers
D
kglad - 27 Jul 2008 01:26 GMT
then load them into a _level (other than 0) or open them in another browser window (using getURL() ).
nice dice - 30 Jul 2008 16:19 GMT
Hi - I'm trying to load the  games into an 'old skool' style arcade screen, so
I can't load them in another browser window. Although it would be a lot easier!
I've successfully loaded them in using:
loadMovieNum("GML/crazycube.swf", 1);
And all of the features work but this creates another problem - the swf loads
in above the screen.
The screen is made up from a few different layers including a mask layer to
restrict the shape of the screen and a layer with alpha adjustments to create
the glass effect.
Is there any way to bring the screen (including mask) above the loaded swf ie.
_level2 - to gain the effect I'm after??
Cheers,
D
nice dice - 31 Jul 2008 02:09 GMT
I've managed to side step the problem by creating the  screen and a cut out of
the masked area into another swf and loaded that in  using the same method but
on level2, so it appears above the game swf.
Only problem now is that the  position of the game is wrong ie ie. x=0 y=0 -
how do I correct the position of the level?
I've tried using:
_level1._x = 150;
_level1._y = 150;
But obviously doesn't work!
Any helpers anyone??  I know it will be an obvious solution but I've been
going round in circles for 8 hours on this one. Done in!!
Cheers
D
kglad - 31 Jul 2008 07:40 GMT
when loading is complete you can use reference the _x and _y etc properties of _level1.
nice dice - 31 Jul 2008 16:45 GMT
I've tried placing the code:
_level1._x = 150;
_level1._y = 150;
On a different  layer but on the same frame 2 - as each frame is a different
game. But it won't work still, please excuse my stupidity but how would I go
about changing the level properties after the game has loaded?
I can't break into the game swf's as I don't have the fla's to place any code
into them.
Any hints?
Cheers,
D
nice dice - 31 Jul 2008 16:56 GMT
sussed it! - viewed a few posts on another site and came up with this:
loadMovieNum("GML/crazycube.swf", 1);
this.onEnterFrame = function() {
    if (_level1._x != 50 || _level1._y != 50) {
        _level1._x = 50;
        _level1._y = 50;
    } else {
        delete this.onEnterFrame;
    }
};

Works a treat!
Cheers for all the help kglad, until next time.
D
kglad - 31 Jul 2008 20:57 GMT
you're welcome.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.