Skip to main content
Known Participant
January 29, 2013
Answered

how do i link a class to only one scene in the fla file ?

  • January 29, 2013
  • 1 reply
  • 6123 views

hi

so am running a project on flash cs5 contain 4 scene

scene 4 is a a flash game with 2 classes

after finishing the game codes and testing and work fine

i found that the hole document using  the class of the game

so when testing movie many errors appears

is there any way to link this class to the game scene only ?

or any another solution makes the project work ????

This topic has been closed for replies.
Correct answer kglad

I'm Sorry I'm Biggner

i meant

before i faced this problem i tried to create a scene including the game swf but its not working

i need to know the way to create the scene that load swf and work correctly

am i supposed to import the swf into stage and nothing else

or there a working way that i dont know about


no, don't import the swf, load the swf:

on scene4:

var loader:Loader=new Loader();

addChild(loader);

loader.load(new URLRequest("game.swf"));  // assuming you created game.swf as suggested in message 1.

1 reply

kglad
Community Expert
Community Expert
January 29, 2013

create a new fla, assign your game class to the document class of the new fla and publish a game swf.  then load that game swf in scene 4.

Known Participant
January 29, 2013

well i had a problem adding swf to my main project ( i made the game 3 times because of that ) !

can u tell me how to add swf to my scene

what i want in my main project

i need the use when going into scene 3 click on the button and go to scene 4 and play the game ?

Known Participant
January 29, 2013

any help !!