Creative TextFX v2 Forum


box Creative TextFX v2
With Creative TextFX v2 you can create stunning text effects in FLASH. This Flash component gives you access to more than 300 predefined text effects that are customizable from the user interface or directly with ActionScript elements - properties, methods, constructor parameters and events - thoroughly documented in the complete product manual or in the Contextual Help.

Find out more about Creative TextFX v2

Thread: loading swf using creative fx v2, into other swf

title left
User Details
message
title right
Lee

post date:
2009-09-10 10:37:59
hellornrni have created a swf using the creative fx v2 package which works fine. i now need to load this swf into another. this causes the error:rnrnTypeError: Error #1009: Cannot access a property or method of a null object reference.rn at xtd.textFX_v2::TextFXMain()rn at test_ad_4_fla::MainTimeline/frame1()rnrnany ideas?
Lee

post date:
2009-09-10 10:41:42
hello

i have created a swf using the creative fx v2 package which works fine. i now need to load this swf into another. this causes the error

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at xtd.textFX_v2::TextFXMain()
at test_ad_4_fla::MainTimeline/frame1()

any ideas?

- edit not sure where formatting went
Lee

post date:
2009-09-10 10:55:39
even using your example file (http://www.extendstudio.com/documentation/creative-textfx-v2/documentation/tutorials/how-to-configure-creative-textfx-from-as.html) i still get the error.

my test loading script is as follows:

var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("test_ad.swf" + "?" + Math.random());
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.load(mRequest);

function onCompleteHandler(loadEvent:Event) {
addChild(loadEvent.currentTarget.content);
}
Andrei Rinciog [Extend Studio]

post date:
2009-09-10 12:43:34
Hello,

If you run the swf that is loaded it doesn't give you that error ? Just when you do the load operation ?

Could you please send me an archive with the swf that you are trying to load ?

You can send it at support at extendstudio.com

If you could add the main FLA file as well, that would be great.

Regards,
Andrei
Lee

post date:
2009-09-10 13:55:08
the file i am downloading is the example one in your documentation: http://www.extendstudio.com/documentation/creative-textfx-v2/documentation/tutorials/how-to-configure-creative-textfx-from-as.html

this file resides on my testing server

it is then downloaded using the following code:

var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest(my_site_url + "test_ad.swf" + "?" + Math.random());
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.load(mRequest);

function onCompleteHandler(loadEvent:Event) {
addChild(loadEvent.currentTarget.content);
}

i stripped it down to this bare minimum to make sure it was not my code causing the problem.
Lee

post date:
2009-09-11 03:53:55
morning, any ideas on this?
Lee

post date:
2009-10-08 10:39:30
hello

any news on this problem?
Andrei Rinciog [Extend Studio]

post date:
2009-10-08 11:55:54
Hello,

Yes, actually we just found a solution yesterday. Sorry it took so long but we started in a wrong direction. We thought that there is a problem with the component and tried to find a fix in our code.

However, the problem was with the loaded swf file. It didn’t receive a stage reference from the moment it loaded and that’s why it gives a null object reference error.

Open the FLA file that has the TextFX component on it. Select all the frames and shift them with 1 frame so that the first frame remain empty. In that first frame add this code:

stop();

function startPlaying(e:Event) {
this.gotoAndPlay(2);
}

if (this.stage) {
this.startPlaying(null);
} else {
this.addEventListener(Event.ADDED_TO_STAGE, startPlaying);
}


This code will stop the execution in that swf until you it receives a stage reference. After that it allows the code to run and the error is bypassed.

If you have any questions, feel free to ask.

Regards,
--
Andrei Rinciog
Extend Studio - Support Engineer