Closed deividbinev12 closed 4 months ago
Still not working. Direct SWF: https://media1.newcp.net/play/v2/client/club_penguin.swf
Right now, it's erroring with Error dispatching event EventObject(EventObject { type: "addedToStage", class: flash.events::Event, ptr: 0xb78470 }) to handler FunctionObject(FunctionObject { ptr: 0xb77fb0 }) : RustError("Attempted to call \"\" with 1 arguments (more than 0 is prohibited)")
With #9647, this errors on ERROR ruffle_core::avm2::activation: ReferenceError: Error #1069: Property * not found on XMLList and there is no default value.
.
Now errors: Error: MainContext could not determine the locale for the specified langauge. Make sure that 'null' has been added to the switch.
.
Now errors:
Error: MainContext could not determine the locale for the specified langauge. Make sure that 'null' has been added to the switch.
.
This is related to flashvars not being provided (e.g. lang=en)
I investigated this and made some progress, but got stuck at some point with something related to contextView
. This game really needs a lot of stuff. What I've found:
-Plang=en
as @AllinolCP saiddecodeURI
ExternalInterface.call("window.location.href.toString")
URLRequest.requestHeaders
This URL works for the page: https://play.newcp.net/eng/index.html#/login
Current errors:
Error dispatching `addedToStage` event : TypeError: Error #1009: Cannot access a property or method of a null object reference. (accessing field: getAVMBridge)
at com.clubpenguin.main.overlays.mediator::MultipleOverlayViewMediator/onRegister()
at org.robotlegs.base::MediatorBase/preRegister()
at org.robotlegs.base::MediatorMap/registerMediator()
at org.robotlegs.base::MediatorMap/createMediatorUsing()
at org.robotlegs.base::MediatorMap/onViewAdded()
at flash.display::DisplayObjectContainer/flash::display::DisplayObjectContainer::addChild()
at com.clubpenguin.main::MainContext/startup()
at org.robotlegs.mvcs::Context/checkAutoStartup()
at org.robotlegs.mvcs::Context()
at org.robotlegs.mvcs::SignalContext()
at com.clubpenguin.main::MainContext()
at com.clubpenguin.main::Main/init()
at com.clubpenguin.main::Main/onAddedToStageHandler()
Error dispatching `addedToStage` event : TypeError: Error #1009: Cannot access a property or method of a null object reference. (accessing field: addChild)
at com.clubpenguin.main.command::StartupCommand/execute()
at org.robotlegs.base::SignalCommandMap/routeSignalToCommand()
at MethodInfo-392()
at org.osflash.signals::Signal/dispatch()
at com.clubpenguin.main::MainContext/startup()
at org.robotlegs.mvcs::Context/checkAutoStartup()
at org.robotlegs.mvcs::Context()
at org.robotlegs.mvcs::SignalContext() at com.clubpenguin.main::MainContext()
at com.clubpenguin.main::Main/init()
at com.clubpenguin.main::Main/onAddedToStageHandler()
I would guess that the first error is because in the declaration
[Inject]
public var _model:MainModel;
The [Inject]
isn't working correctly. (It should be handled by org.robotlegs
, see https://www.oreilly.com/library/view/actionscript-developers-guide/9781449311193/ch04.html).
for context Club Penguin uses robotlegs 1.4.0 amd swift suspenders 1.5.1
@AllinolCP pointed out on Discord that this is caused because of undocumented behavior in flash.utils.describeType
, as describeType
should also return <metadata>
tags inside <variable>
tags (if there is metadata). Example:
...
<variable name="mc" type="flash.display::MovieClip">
<metadata name="tag">
<arg key="" value="value"/>
</metadata>
<metadata name="someOtherTag"/>
<metadata name="tag">
<arg key="dat" value="abcd"/>
</metadata>
</variable>
...
Which is returned by the property:
[tag("value")]
[someOtherTag]
[tag(dat = "abcd")]
public var mc:MovieClip;
According to Allinol, NCP loads a ZIP file and decompresses it, which takes some time in Ruffle. Next, it needs to load a file; that file is unforunately missing.
So a list of PRs that need to be merged for this:
has this been fixed? i have been waiting a long time but the only thing that is showing is a white screen.
It still has problem with some language related stuff
ERROR core/src/avm2/events.rs:424 Error dispatching event EventObject(EventObject { type: "addedToStage", class: flash.events::Event, ptr: 0x127b638 }) to handler FunctionObject(FunctionObject { ptr: 0x127b130 }) : Error: MainContext could not determine the locale for the specified langauge. Make sure that 'null' has been added to the switch.
@DarkReaper231 You need to run it directly through the site, it uses flashvars. See https://github.com/ruffle-rs/ruffle/issues/8330#issuecomment-1475094475 @elmemeee If you bump the execution timeout, it gets as far as it would get on Flash. For some reason one of the necessary asset files is missing from the NewCP server.
The next issue seems to be that NCP calls External Interface with (function() { ... })
(or something similar, don't exactly remember what) as the argument. Ruffle doesn't support that yet.
The next issue seems to be that NCP calls External Interface with
(function() { ... })
(or something similar, don't exactly remember what) as the argument. Ruffle doesn't support that yet.
Is there a PR for implementation of it?
@Lord-McSweeney What's the current status? All PRs that have been waiting for merge have been merged but the game still does not work.
Visiting through https://play.newcp.net/eng/index.html#/login instead of https://newcp.net/plays?force=true#/login no longer solves the issue with missing start_module
.
Regarding the missing start_module
, I was told this:
the game would normally load world.swf instead of start module, however since the file does not exist the game will refuse to continue, it's programmed this way not a fault by ruffle
And just to be clear, if Ruffle was to support AS3 -> AS2 LocalConnection
communication and ExternalInterface
fully, this would go away, I assume.
So when you first load up the game, it runs ExternalInterface
(which isn't fully implemented) to get the URL's #path, where normally for world swf it has to be #/login, however since that failed it goes to a fallback which loads start_module.swf
Also seems like ExternalInterface
spoofing is merged, idk what it means but yeah.
With LocalConnection (WIP local branch), this progresses but still doesn't get past a blue screen.
I can see that it's trying to show a login screen, but it just isn't :(
This isn't directly related to NewCP, but just thought it was worth pointing out. With the recent updates, I figured I'd test another CPPS that uses the AS3 client (https://play.cpimagined.net)
It does, in fact, get all the way to the login screen, but shows an error after a few seconds when trying to login, which I suppose was to be expected.
yes, because CPImagined would have to set up the WS proxy, the error shown was just shown to macOS users for some reason
With #16834 newcp.net works (assuming that someone sets up the WS proxy). Please open individual issues for any further bugs you find (or other sites if they have issues too, ofc)
Describe the bug
https://user-images.githubusercontent.com/80902993/196750362-eb8831bc-c234-41c8-aa41-40d783b669d0.mp4
it's not working, because this is multi files, this is actionsupport 3.0 i know ruffle player multiplayer is not working
Expected behavior
you know ''Download'' and ''Launch NewCP App'' it's can work with flash player, his server it's working
Affected platform
Browser's extension
Operating system
Windows 11
Browser
Edge
Additional information
from https://newcp.net/en/